示例#1
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);

            _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);
        }
示例#2
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>
        internal static AdGroupExtensionSettingServiceClient Create(grpccore::CallInvoker callInvoker, AdGroupExtensionSettingServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            AdGroupExtensionSettingService.AdGroupExtensionSettingServiceClient grpcClient = new AdGroupExtensionSettingService.AdGroupExtensionSettingServiceClient(callInvoker);
            return(new AdGroupExtensionSettingServiceClientImpl(grpcClient, settings));
        }
示例#3
0
 partial void OnConstruction(AdGroupExtensionSettingService.AdGroupExtensionSettingServiceClient grpcClient, AdGroupExtensionSettingServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);