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

            _callGetSharedCriterion = clientHelper.BuildApiCall <GetSharedCriterionRequest, gagvr::SharedCriterion>(grpcClient.GetSharedCriterionAsync, grpcClient.GetSharedCriterion, effectiveSettings.GetSharedCriterionSettings).WithGoogleRequestParam("resource_name", request => request.ResourceName);
            Modify_ApiCall(ref _callGetSharedCriterion);
            Modify_GetSharedCriterionApiCall(ref _callGetSharedCriterion);
            _callMutateSharedCriteria = clientHelper.BuildApiCall <MutateSharedCriteriaRequest, MutateSharedCriteriaResponse>(grpcClient.MutateSharedCriteriaAsync, grpcClient.MutateSharedCriteria, effectiveSettings.MutateSharedCriteriaSettings).WithGoogleRequestParam("customer_id", request => request.CustomerId);
            Modify_ApiCall(ref _callMutateSharedCriteria);
            Modify_MutateSharedCriteriaApiCall(ref _callMutateSharedCriteria);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
 partial void OnCopy(SharedCriterionServiceSettings existing);
 partial void OnConstruction(SharedCriterionService.SharedCriterionServiceClient grpcClient, SharedCriterionServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
        /// <summary>
        /// Creates a <see cref="SharedCriterionServiceClient"/> 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="SharedCriterionServiceSettings"/>.</param>
        /// <returns>The created <see cref="SharedCriterionServiceClient"/>.</returns>
        internal static SharedCriterionServiceClient Create(grpccore::CallInvoker callInvoker, SharedCriterionServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            SharedCriterionService.SharedCriterionServiceClient grpcClient = new SharedCriterionService.SharedCriterionServiceClient(callInvoker);
            return(new SharedCriterionServiceClientImpl(grpcClient, settings));
        }