Esempio n. 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);
        }
Esempio n. 2
0
 partial void OnCopy(SmartCampaignSuggestServiceSettings existing);
Esempio n. 3
0
 private SmartCampaignSuggestServiceSettings(SmartCampaignSuggestServiceSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     SuggestSmartCampaignBudgetOptionsSettings = existing.SuggestSmartCampaignBudgetOptionsSettings;
     OnCopy(existing);
 }
Esempio n. 4
0
 partial void OnConstruction(SmartCampaignSuggestService.SmartCampaignSuggestServiceClient grpcClient, SmartCampaignSuggestServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
Esempio n. 5
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));
        }