private CustomerExtensionSettingServiceSettings(CustomerExtensionSettingServiceSettings existing) : base(existing) { gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); GetCustomerExtensionSettingSettings = existing.GetCustomerExtensionSettingSettings; MutateCustomerExtensionSettingsSettings = existing.MutateCustomerExtensionSettingsSettings; OnCopy(existing); }
/// <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); }
partial void OnConstruction(CustomerExtensionSettingService.CustomerExtensionSettingServiceClient grpcClient, CustomerExtensionSettingServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
partial void OnCopy(CustomerExtensionSettingServiceSettings existing);
/// <summary> /// Creates a <see cref="CustomerExtensionSettingServiceClient"/> 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="CustomerExtensionSettingServiceSettings"/>.</param> /// <returns>The created <see cref="CustomerExtensionSettingServiceClient"/>.</returns> internal static CustomerExtensionSettingServiceClient Create(grpccore::CallInvoker callInvoker, CustomerExtensionSettingServiceSettings settings = null) { gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); grpcinter::Interceptor interceptor = settings?.Interceptor; if (interceptor != null) { callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); } CustomerExtensionSettingService.CustomerExtensionSettingServiceClient grpcClient = new CustomerExtensionSettingService.CustomerExtensionSettingServiceClient(callInvoker); return(new CustomerExtensionSettingServiceClientImpl(grpcClient, settings)); }