Example #1
0
        /// <summary>
        /// Constructs a client wrapper for the CampaignCustomizerService service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="CampaignCustomizerServiceSettings"/> used within this client.
        /// </param>
        public CampaignCustomizerServiceClientImpl(CampaignCustomizerService.CampaignCustomizerServiceClient grpcClient, CampaignCustomizerServiceSettings settings)
        {
            GrpcClient = grpcClient;
            CampaignCustomizerServiceSettings effectiveSettings = settings ?? CampaignCustomizerServiceSettings.GetDefault();
            gaxgrpc::ClientHelper             clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callMutateCampaignCustomizers = clientHelper.BuildApiCall <MutateCampaignCustomizersRequest, MutateCampaignCustomizersResponse>(grpcClient.MutateCampaignCustomizersAsync, grpcClient.MutateCampaignCustomizers, effectiveSettings.MutateCampaignCustomizersSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callMutateCampaignCustomizers);
            Modify_MutateCampaignCustomizersApiCall(ref _callMutateCampaignCustomizers);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Example #2
0
        /// <summary>
        /// Creates a <see cref="CampaignCustomizerServiceClient"/> 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="CampaignCustomizerServiceSettings"/>.</param>
        /// <returns>The created <see cref="CampaignCustomizerServiceClient"/>.</returns>
        internal static CampaignCustomizerServiceClient Create(grpccore::CallInvoker callInvoker, CampaignCustomizerServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            CampaignCustomizerService.CampaignCustomizerServiceClient grpcClient = new CampaignCustomizerService.CampaignCustomizerServiceClient(callInvoker);
            return(new CampaignCustomizerServiceClientImpl(grpcClient, settings));
        }
Example #3
0
 partial void OnConstruction(CampaignCustomizerService.CampaignCustomizerServiceClient grpcClient, CampaignCustomizerServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);