Пример #1
0
        /// <summary>
        /// Constructs a client wrapper for the CustomerExtensionSettingService service, with the specified gRPC client
        /// and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">
        /// The base <see cref="CustomerExtensionSettingServiceSettings"/> used within this client.
        /// </param>
        public CustomerExtensionSettingServiceClientImpl(CustomerExtensionSettingService.CustomerExtensionSettingServiceClient grpcClient, CustomerExtensionSettingServiceSettings settings)
        {
            GrpcClient = grpcClient;
            CustomerExtensionSettingServiceSettings effectiveSettings = settings ?? CustomerExtensionSettingServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetCustomerExtensionSetting = clientHelper.BuildApiCall <GetCustomerExtensionSettingRequest, gagvr::CustomerExtensionSetting>(grpcClient.GetCustomerExtensionSettingAsync, grpcClient.GetCustomerExtensionSetting, effectiveSettings.GetCustomerExtensionSettingSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetCustomerExtensionSetting);
            Modify_GetCustomerExtensionSettingApiCall(ref _callGetCustomerExtensionSetting);
            _callMutateCustomerExtensionSettings = clientHelper.BuildApiCall <MutateCustomerExtensionSettingsRequest, MutateCustomerExtensionSettingsResponse>(grpcClient.MutateCustomerExtensionSettingsAsync, grpcClient.MutateCustomerExtensionSettings, effectiveSettings.MutateCustomerExtensionSettingsSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callMutateCustomerExtensionSettings);
            Modify_MutateCustomerExtensionSettingsApiCall(ref _callMutateCustomerExtensionSettings);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
Пример #2
0
        /// <summary>
        /// Constructs a client wrapper for the CustomerExtensionSettingService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="CustomerExtensionSettingServiceSettings"/> used within this client </param>
        public CustomerExtensionSettingServiceClientImpl(CustomerExtensionSettingService.CustomerExtensionSettingServiceClient grpcClient, CustomerExtensionSettingServiceSettings settings)
        {
            GrpcClient = grpcClient;
            CustomerExtensionSettingServiceSettings effectiveSettings = settings ?? CustomerExtensionSettingServiceSettings.GetDefault();
            gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetCustomerExtensionSetting = clientHelper.BuildApiCall <GetCustomerExtensionSettingRequest, gagvr::CustomerExtensionSetting>(
                GrpcClient.GetCustomerExtensionSettingAsync, GrpcClient.GetCustomerExtensionSetting, effectiveSettings.GetCustomerExtensionSettingSettings)
                                               .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"resource_name={request.ResourceName}"));
            _callMutateCustomerExtensionSettings = clientHelper.BuildApiCall <MutateCustomerExtensionSettingsRequest, MutateCustomerExtensionSettingsResponse>(
                GrpcClient.MutateCustomerExtensionSettingsAsync, GrpcClient.MutateCustomerExtensionSettings, effectiveSettings.MutateCustomerExtensionSettingsSettings)
                                                   .WithCallSettingsOverlay(request => gaxgrpc::CallSettings.FromHeader("x-goog-request-params", $"customer_id={request.CustomerId}"));
            Modify_ApiCall(ref _callGetCustomerExtensionSetting);
            Modify_GetCustomerExtensionSettingApiCall(ref _callGetCustomerExtensionSetting);
            Modify_ApiCall(ref _callMutateCustomerExtensionSettings);
            Modify_MutateCustomerExtensionSettingsApiCall(ref _callMutateCustomerExtensionSettings);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }