/// <summary> /// Constructs a client wrapper for the CustomizerAttributeService service, with the specified gRPC client and /// settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings"> /// The base <see cref="CustomizerAttributeServiceSettings"/> used within this client. /// </param> public CustomizerAttributeServiceClientImpl(CustomizerAttributeService.CustomizerAttributeServiceClient grpcClient, CustomizerAttributeServiceSettings settings) { GrpcClient = grpcClient; CustomizerAttributeServiceSettings effectiveSettings = settings ?? CustomizerAttributeServiceSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callMutateCustomizerAttributes = clientHelper.BuildApiCall <MutateCustomizerAttributesRequest, MutateCustomizerAttributesResponse>(grpcClient.MutateCustomizerAttributesAsync, grpcClient.MutateCustomizerAttributes, effectiveSettings.MutateCustomizerAttributesSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId); Modify_ApiCall(ref _callMutateCustomizerAttributes); Modify_MutateCustomizerAttributesApiCall(ref _callMutateCustomizerAttributes); OnConstruction(grpcClient, effectiveSettings, clientHelper); }
partial void OnCopy(CustomizerAttributeServiceSettings existing);
private CustomizerAttributeServiceSettings(CustomizerAttributeServiceSettings existing) : base(existing) { gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); MutateCustomizerAttributesSettings = existing.MutateCustomizerAttributesSettings; OnCopy(existing); }
partial void OnConstruction(CustomizerAttributeService.CustomizerAttributeServiceClient grpcClient, CustomizerAttributeServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
/// <summary> /// Creates a <see cref="CustomizerAttributeServiceClient"/> 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="CustomizerAttributeServiceSettings"/>.</param> /// <returns>The created <see cref="CustomizerAttributeServiceClient"/>.</returns> internal static CustomizerAttributeServiceClient Create(grpccore::CallInvoker callInvoker, CustomizerAttributeServiceSettings settings = null) { gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); grpcinter::Interceptor interceptor = settings?.Interceptor; if (interceptor != null) { callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); } CustomizerAttributeService.CustomizerAttributeServiceClient grpcClient = new CustomizerAttributeService.CustomizerAttributeServiceClient(callInvoker); return(new CustomizerAttributeServiceClientImpl(grpcClient, settings)); }