private CustomAudienceServiceSettings(CustomAudienceServiceSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     GetCustomAudienceSettings     = existing.GetCustomAudienceSettings;
     MutateCustomAudiencesSettings = existing.MutateCustomAudiencesSettings;
     OnCopy(existing);
 }
        /// <summary>
        /// Constructs a client wrapper for the CustomAudienceService service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="CustomAudienceServiceSettings"/> used within this client.</param>
        public CustomAudienceServiceClientImpl(CustomAudienceService.CustomAudienceServiceClient grpcClient, CustomAudienceServiceSettings settings)
        {
            GrpcClient = grpcClient;
            CustomAudienceServiceSettings effectiveSettings = settings ?? CustomAudienceServiceSettings.GetDefault();
            gaxgrpc::ClientHelper         clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetCustomAudience = clientHelper.BuildApiCall <GetCustomAudienceRequest, gagvr::CustomAudience>(grpcClient.GetCustomAudienceAsync, grpcClient.GetCustomAudience, effectiveSettings.GetCustomAudienceSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetCustomAudience);
            Modify_GetCustomAudienceApiCall(ref _callGetCustomAudience);
            _callMutateCustomAudiences = clientHelper.BuildApiCall <MutateCustomAudiencesRequest, MutateCustomAudiencesResponse>(grpcClient.MutateCustomAudiencesAsync, grpcClient.MutateCustomAudiences, effectiveSettings.MutateCustomAudiencesSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callMutateCustomAudiences);
            Modify_MutateCustomAudiencesApiCall(ref _callMutateCustomAudiences);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
 partial void OnCopy(CustomAudienceServiceSettings existing);
 partial void OnConstruction(CustomAudienceService.CustomAudienceServiceClient grpcClient, CustomAudienceServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
        /// <summary>
        /// Creates a <see cref="CustomAudienceServiceClient"/> 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="CustomAudienceServiceSettings"/>.</param>
        /// <returns>The created <see cref="CustomAudienceServiceClient"/>.</returns>
        internal static CustomAudienceServiceClient Create(grpccore::CallInvoker callInvoker, CustomAudienceServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            CustomAudienceService.CustomAudienceServiceClient grpcClient = new CustomAudienceService.CustomAudienceServiceClient(callInvoker);
            return(new CustomAudienceServiceClientImpl(grpcClient, settings));
        }