/// <summary> /// Constructs a client wrapper for the ExperimentArmService service, with the specified gRPC client and /// settings. /// </summary> /// <param name="grpcClient">The underlying gRPC client.</param> /// <param name="settings">The base <see cref="ExperimentArmServiceSettings"/> used within this client.</param> public ExperimentArmServiceClientImpl(ExperimentArmService.ExperimentArmServiceClient grpcClient, ExperimentArmServiceSettings settings) { GrpcClient = grpcClient; ExperimentArmServiceSettings effectiveSettings = settings ?? ExperimentArmServiceSettings.GetDefault(); gaxgrpc::ClientHelper clientHelper = new gaxgrpc::ClientHelper(effectiveSettings); _callMutateExperimentArms = clientHelper.BuildApiCall <MutateExperimentArmsRequest, MutateExperimentArmsResponse>(grpcClient.MutateExperimentArmsAsync, grpcClient.MutateExperimentArms, effectiveSettings.MutateExperimentArmsSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId); Modify_ApiCall(ref _callMutateExperimentArms); Modify_MutateExperimentArmsApiCall(ref _callMutateExperimentArms); OnConstruction(grpcClient, effectiveSettings, clientHelper); }
partial void OnCopy(ExperimentArmServiceSettings existing);
partial void OnConstruction(ExperimentArmService.ExperimentArmServiceClient grpcClient, ExperimentArmServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
private ExperimentArmServiceSettings(ExperimentArmServiceSettings existing) : base(existing) { gax::GaxPreconditions.CheckNotNull(existing, nameof(existing)); MutateExperimentArmsSettings = existing.MutateExperimentArmsSettings; OnCopy(existing); }
/// <summary> /// Creates a <see cref="ExperimentArmServiceClient"/> 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="ExperimentArmServiceSettings"/>.</param> /// <returns>The created <see cref="ExperimentArmServiceClient"/>.</returns> internal static ExperimentArmServiceClient Create(grpccore::CallInvoker callInvoker, ExperimentArmServiceSettings settings = null) { gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker)); grpcinter::Interceptor interceptor = settings?.Interceptor; if (interceptor != null) { callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor); } ExperimentArmService.ExperimentArmServiceClient grpcClient = new ExperimentArmService.ExperimentArmServiceClient(callInvoker); return(new ExperimentArmServiceClientImpl(grpcClient, settings)); }