/// <summary>
        /// Creates a <see cref="TemplatesServiceClient"/> 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="TemplatesServiceSettings"/>.</param>
        /// <returns>The created <see cref="TemplatesServiceClient"/>.</returns>
        internal static TemplatesServiceClient Create(grpccore::CallInvoker callInvoker, TemplatesServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            TemplatesService.TemplatesServiceClient grpcClient = new TemplatesService.TemplatesServiceClient(callInvoker);
            return(new TemplatesServiceClientImpl(grpcClient, settings));
        }
        /// <summary>
        /// Constructs a client wrapper for the TemplatesService service, with the specified gRPC client and settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="TemplatesServiceSettings"/> used within this client.</param>
        public TemplatesServiceClientImpl(TemplatesService.TemplatesServiceClient grpcClient, TemplatesServiceSettings settings)
        {
            GrpcClient = grpcClient;
            TemplatesServiceSettings effectiveSettings = settings ?? TemplatesServiceSettings.GetDefault();
            gaxgrpc::ClientHelper    clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callCreateJobFromTemplate = clientHelper.BuildApiCall <CreateJobFromTemplateRequest, Job>(grpcClient.CreateJobFromTemplateAsync, grpcClient.CreateJobFromTemplate, effectiveSettings.CreateJobFromTemplateSettings);
            Modify_ApiCall(ref _callCreateJobFromTemplate);
            Modify_CreateJobFromTemplateApiCall(ref _callCreateJobFromTemplate);
            _callLaunchTemplate = clientHelper.BuildApiCall <LaunchTemplateRequest, LaunchTemplateResponse>(grpcClient.LaunchTemplateAsync, grpcClient.LaunchTemplate, effectiveSettings.LaunchTemplateSettings);
            Modify_ApiCall(ref _callLaunchTemplate);
            Modify_LaunchTemplateApiCall(ref _callLaunchTemplate);
            _callGetTemplate = clientHelper.BuildApiCall <GetTemplateRequest, GetTemplateResponse>(grpcClient.GetTemplateAsync, grpcClient.GetTemplate, effectiveSettings.GetTemplateSettings);
            Modify_ApiCall(ref _callGetTemplate);
            Modify_GetTemplateApiCall(ref _callGetTemplate);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
 partial void OnConstruction(TemplatesService.TemplatesServiceClient grpcClient, TemplatesServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);