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

            _callUploadConversionAdjustments = clientHelper.BuildApiCall <UploadConversionAdjustmentsRequest, UploadConversionAdjustmentsResponse>(grpcClient.UploadConversionAdjustmentsAsync, grpcClient.UploadConversionAdjustments, effectiveSettings.UploadConversionAdjustmentsSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callUploadConversionAdjustments);
            Modify_UploadConversionAdjustmentsApiCall(ref _callUploadConversionAdjustments);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
예제 #2
0
        /// <summary>
        /// Constructs a client wrapper for the ConversionAdjustmentUploadService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="ConversionAdjustmentUploadServiceSettings"/> used within this client </param>
        public ConversionAdjustmentUploadServiceClientImpl(ConversionAdjustmentUploadService.ConversionAdjustmentUploadServiceClient grpcClient, ConversionAdjustmentUploadServiceSettings settings)
        {
            GrpcClient = grpcClient;
            ConversionAdjustmentUploadServiceSettings effectiveSettings = settings ?? ConversionAdjustmentUploadServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);

            _callUploadConversionAdjustments = clientHelper.BuildApiCall <UploadConversionAdjustmentsRequest, UploadConversionAdjustmentsResponse>(
                GrpcClient.UploadConversionAdjustmentsAsync, GrpcClient.UploadConversionAdjustments, effectiveSettings.UploadConversionAdjustmentsSettings)
                                               .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"customer_id={request.CustomerId}"));
            Modify_ApiCall(ref _callUploadConversionAdjustments);
            Modify_UploadConversionAdjustmentsApiCall(ref _callUploadConversionAdjustments);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
예제 #3
0
 partial void OnConstruction(ConversionAdjustmentUploadService.ConversionAdjustmentUploadServiceClient grpcClient, ConversionAdjustmentUploadServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
예제 #4
0
        /// <summary>
        /// Creates a <see cref="ConversionAdjustmentUploadServiceClient"/> 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="ConversionAdjustmentUploadServiceSettings"/>.</param>
        /// <returns>The created <see cref="ConversionAdjustmentUploadServiceClient"/>.</returns>
        internal static ConversionAdjustmentUploadServiceClient Create(grpccore::CallInvoker callInvoker, ConversionAdjustmentUploadServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            ConversionAdjustmentUploadService.ConversionAdjustmentUploadServiceClient grpcClient = new ConversionAdjustmentUploadService.ConversionAdjustmentUploadServiceClient(callInvoker);
            return(new ConversionAdjustmentUploadServiceClientImpl(grpcClient, settings));
        }