private GatewayServiceSettings(GatewayServiceSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     GetResourceSettings    = existing.GetResourceSettings;
     PostResourceSettings   = existing.PostResourceSettings;
     DeleteResourceSettings = existing.DeleteResourceSettings;
     PutResourceSettings    = existing.PutResourceSettings;
     PatchResourceSettings  = existing.PatchResourceSettings;
     OnCopy(existing);
 }
        /// <summary>
        /// Constructs a client wrapper for the GatewayService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="GatewayServiceSettings"/> used within this client.</param>
        public GatewayServiceClientImpl(GatewayService.GatewayServiceClient grpcClient, GatewayServiceSettings settings)
        {
            GrpcClient = grpcClient;
            GatewayServiceSettings effectiveSettings = settings ?? GatewayServiceSettings.GetDefault();
            gaxgrpc::ClientHelper  clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callGetResource = clientHelper.BuildApiCall <ga::HttpBody, ga::HttpBody>(grpcClient.GetResourceAsync, grpcClient.GetResource, effectiveSettings.GetResourceSettings);
            Modify_ApiCall(ref _callGetResource);
            Modify_GetResourceApiCall(ref _callGetResource);
            _callPostResource = clientHelper.BuildApiCall <ga::HttpBody, ga::HttpBody>(grpcClient.PostResourceAsync, grpcClient.PostResource, effectiveSettings.PostResourceSettings);
            Modify_ApiCall(ref _callPostResource);
            Modify_PostResourceApiCall(ref _callPostResource);
            _callDeleteResource = clientHelper.BuildApiCall <ga::HttpBody, ga::HttpBody>(grpcClient.DeleteResourceAsync, grpcClient.DeleteResource, effectiveSettings.DeleteResourceSettings);
            Modify_ApiCall(ref _callDeleteResource);
            Modify_DeleteResourceApiCall(ref _callDeleteResource);
            _callPutResource = clientHelper.BuildApiCall <ga::HttpBody, ga::HttpBody>(grpcClient.PutResourceAsync, grpcClient.PutResource, effectiveSettings.PutResourceSettings);
            Modify_ApiCall(ref _callPutResource);
            Modify_PutResourceApiCall(ref _callPutResource);
            _callPatchResource = clientHelper.BuildApiCall <ga::HttpBody, ga::HttpBody>(grpcClient.PatchResourceAsync, grpcClient.PatchResource, effectiveSettings.PatchResourceSettings);
            Modify_ApiCall(ref _callPatchResource);
            Modify_PatchResourceApiCall(ref _callPatchResource);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
 partial void OnCopy(GatewayServiceSettings existing);
 partial void OnConstruction(GatewayService.GatewayServiceClient grpcClient, GatewayServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
        /// <summary>
        /// Creates a <see cref="GatewayServiceClient"/> 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="GatewayServiceSettings"/>.</param>
        /// <returns>The created <see cref="GatewayServiceClient"/>.</returns>
        internal static GatewayServiceClient Create(grpccore::CallInvoker callInvoker, GatewayServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            GatewayService.GatewayServiceClient grpcClient = new GatewayService.GatewayServiceClient(callInvoker);
            return(new GatewayServiceClientImpl(grpcClient, settings));
        }