Exemple #1
0
 /// <summary>
 /// Creates a <see cref="AdGroupExtensionSettingServiceClient"/> which uses the specified call invoker for remote operations.
 /// </summary>
 /// <param name="callInvoker">The <see cref="grpccore::CallInvoker"/> for remote operations. Must not be null.</param>
 /// <param name="settings">Optional <see cref="AdGroupExtensionSettingServiceSettings"/>.</param>
 /// <returns>The created <see cref="AdGroupExtensionSettingServiceClient"/>.</returns>
 public static AdGroupExtensionSettingServiceClient Create(grpccore::CallInvoker callInvoker, AdGroupExtensionSettingServiceSettings settings = null)
 {
     gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
     grpccore::Interceptors.Interceptor interceptor = settings?.Interceptor;
     if (interceptor != null)
     {
         callInvoker = grpccore::Interceptors.CallInvokerExtensions.Intercept(callInvoker, interceptor);
     }
     AdGroupExtensionSettingService.AdGroupExtensionSettingServiceClient grpcClient = new AdGroupExtensionSettingService.AdGroupExtensionSettingServiceClient(callInvoker);
     return(new AdGroupExtensionSettingServiceClientImpl(grpcClient, settings));
 }
        /// <summary>
        /// Constructs a client wrapper for the AdGroupExtensionSettingService service, with the specified gRPC client
        /// and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="AdGroupExtensionSettingServiceSettings"/> used within this client.
        /// </param>
        public AdGroupExtensionSettingServiceClientImpl(AdGroupExtensionSettingService.AdGroupExtensionSettingServiceClient grpcClient, AdGroupExtensionSettingServiceSettings settings)
        {
            GrpcClient = grpcClient;
            AdGroupExtensionSettingServiceSettings effectiveSettings = settings ?? AdGroupExtensionSettingServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetAdGroupExtensionSetting = clientHelper.BuildApiCall <GetAdGroupExtensionSettingRequest, gagvr::AdGroupExtensionSetting>(grpcClient.GetAdGroupExtensionSettingAsync, grpcClient.GetAdGroupExtensionSetting, effectiveSettings.GetAdGroupExtensionSettingSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetAdGroupExtensionSetting);
            Modify_GetAdGroupExtensionSettingApiCall(ref _callGetAdGroupExtensionSetting);
            _callMutateAdGroupExtensionSettings = clientHelper.BuildApiCall <MutateAdGroupExtensionSettingsRequest, MutateAdGroupExtensionSettingsResponse>(grpcClient.MutateAdGroupExtensionSettingsAsync, grpcClient.MutateAdGroupExtensionSettings, effectiveSettings.MutateAdGroupExtensionSettingsSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callMutateAdGroupExtensionSettings);
            Modify_MutateAdGroupExtensionSettingsApiCall(ref _callMutateAdGroupExtensionSettings);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemple #3
0
        /// <summary>
        /// Constructs a client wrapper for the AdGroupExtensionSettingService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="AdGroupExtensionSettingServiceSettings"/> used within this client </param>
        public AdGroupExtensionSettingServiceClientImpl(AdGroupExtensionSettingService.AdGroupExtensionSettingServiceClient grpcClient, AdGroupExtensionSettingServiceSettings settings)
        {
            GrpcClient = grpcClient;
            AdGroupExtensionSettingServiceSettings effectiveSettings = settings ?? AdGroupExtensionSettingServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetAdGroupExtensionSetting = clientHelper.BuildApiCall <GetAdGroupExtensionSettingRequest, gagvr::AdGroupExtensionSetting>(
                GrpcClient.GetAdGroupExtensionSettingAsync, GrpcClient.GetAdGroupExtensionSetting, effectiveSettings.GetAdGroupExtensionSettingSettings)
                                              .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"resource_name={request.ResourceName}"));
            _callMutateAdGroupExtensionSettings = clientHelper.BuildApiCall <MutateAdGroupExtensionSettingsRequest, MutateAdGroupExtensionSettingsResponse>(
                GrpcClient.MutateAdGroupExtensionSettingsAsync, GrpcClient.MutateAdGroupExtensionSettings, effectiveSettings.MutateAdGroupExtensionSettingsSettings)
                                                  .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"customer_id={request.CustomerId}"));
            Modify_ApiCall(ref _callGetAdGroupExtensionSetting);
            Modify_GetAdGroupExtensionSettingApiCall(ref _callGetAdGroupExtensionSetting);
            Modify_ApiCall(ref _callMutateAdGroupExtensionSettings);
            Modify_MutateAdGroupExtensionSettingsApiCall(ref _callMutateAdGroupExtensionSettings);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Exemple #4
0
 partial void OnConstruction(AdGroupExtensionSettingService.AdGroupExtensionSettingServiceClient grpcClient, AdGroupExtensionSettingServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);