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

            _callGetBillingSetup = clientHelper.BuildApiCall <GetBillingSetupRequest, gagvr::BillingSetup>(grpcClient.GetBillingSetupAsync, grpcClient.GetBillingSetup, effectiveSettings.GetBillingSetupSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetBillingSetup);
            Modify_GetBillingSetupApiCall(ref _callGetBillingSetup);
            _callMutateBillingSetup = clientHelper.BuildApiCall <MutateBillingSetupRequest, MutateBillingSetupResponse>(grpcClient.MutateBillingSetupAsync, grpcClient.MutateBillingSetup, effectiveSettings.MutateBillingSetupSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callMutateBillingSetup);
            Modify_MutateBillingSetupApiCall(ref _callMutateBillingSetup);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
        /// <summary>
        /// Constructs a client wrapper for the BillingSetupService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="BillingSetupServiceSettings"/> used within this client </param>
        public BillingSetupServiceClientImpl(BillingSetupService.BillingSetupServiceClient grpcClient, BillingSetupServiceSettings settings)
        {
            GrpcClient = grpcClient;
            BillingSetupServiceSettings effectiveSettings = settings ?? BillingSetupServiceSettings.GetDefault();
            gaxgrpc::ClientHelper       clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetBillingSetup = clientHelper.BuildApiCall <GetBillingSetupRequest, gagvr::BillingSetup>(
                GrpcClient.GetBillingSetupAsync, GrpcClient.GetBillingSetup, effectiveSettings.GetBillingSetupSettings)
                                   .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"resource_name={request.ResourceName}"));
            _callMutateBillingSetup = clientHelper.BuildApiCall <MutateBillingSetupRequest, MutateBillingSetupResponse>(
                GrpcClient.MutateBillingSetupAsync, GrpcClient.MutateBillingSetup, effectiveSettings.MutateBillingSetupSettings)
                                      .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"customer_id={request.CustomerId}"));
            Modify_ApiCall(ref _callGetBillingSetup);
            Modify_GetBillingSetupApiCall(ref _callGetBillingSetup);
            Modify_ApiCall(ref _callMutateBillingSetup);
            Modify_MutateBillingSetupApiCall(ref _callMutateBillingSetup);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }