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

            _callSuggestSmartCampaignBudgetOptions = clientHelper.BuildApiCall <SuggestSmartCampaignBudgetOptionsRequest, SuggestSmartCampaignBudgetOptionsResponse>(grpcClient.SuggestSmartCampaignBudgetOptionsAsync, grpcClient.SuggestSmartCampaignBudgetOptions, effectiveSettings.SuggestSmartCampaignBudgetOptionsSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callSuggestSmartCampaignBudgetOptions);
            Modify_SuggestSmartCampaignBudgetOptionsApiCall(ref _callSuggestSmartCampaignBudgetOptions);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Beispiel #2
0
        /// <summary>
        /// Creates a <see cref="SmartCampaignSuggestServiceClient"/> 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="SmartCampaignSuggestServiceSettings"/>.</param>
        /// <returns>The created <see cref="SmartCampaignSuggestServiceClient"/>.</returns>
        internal static SmartCampaignSuggestServiceClient Create(grpccore::CallInvoker callInvoker, SmartCampaignSuggestServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            SmartCampaignSuggestService.SmartCampaignSuggestServiceClient grpcClient = new SmartCampaignSuggestService.SmartCampaignSuggestServiceClient(callInvoker);
            return(new SmartCampaignSuggestServiceClientImpl(grpcClient, settings));
        }
Beispiel #3
0
 partial void OnConstruction(SmartCampaignSuggestService.SmartCampaignSuggestServiceClient grpcClient, SmartCampaignSuggestServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);