/// <summary>
        /// Constructs a client wrapper for the FlexTemplatesService service, with the specified gRPC client and
        /// settings.
        /// </summary>
        /// <param name="grpcClient">The underlying gRPC client.</param>
        /// <param name="settings">The base <see cref="FlexTemplatesServiceSettings"/> used within this client.</param>
        public FlexTemplatesServiceClientImpl(FlexTemplatesService.FlexTemplatesServiceClient grpcClient, FlexTemplatesServiceSettings settings)
        {
            GrpcClient = grpcClient;
            FlexTemplatesServiceSettings effectiveSettings = settings ?? FlexTemplatesServiceSettings.GetDefault();
            gaxgrpc::ClientHelper        clientHelper      = new gaxgrpc::ClientHelper(effectiveSettings);

            _callLaunchFlexTemplate = clientHelper.BuildApiCall <LaunchFlexTemplateRequest, LaunchFlexTemplateResponse>(grpcClient.LaunchFlexTemplateAsync, grpcClient.LaunchFlexTemplate, effectiveSettings.LaunchFlexTemplateSettings);
            Modify_ApiCall(ref _callLaunchFlexTemplate);
            Modify_LaunchFlexTemplateApiCall(ref _callLaunchFlexTemplate);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
 partial void OnCopy(FlexTemplatesServiceSettings existing);
 private FlexTemplatesServiceSettings(FlexTemplatesServiceSettings existing) : base(existing)
 {
     gax::GaxPreconditions.CheckNotNull(existing, nameof(existing));
     LaunchFlexTemplateSettings = existing.LaunchFlexTemplateSettings;
     OnCopy(existing);
 }
 partial void OnConstruction(FlexTemplatesService.FlexTemplatesServiceClient grpcClient, FlexTemplatesServiceSettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
        /// <summary>
        /// Creates a <see cref="FlexTemplatesServiceClient"/> 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="FlexTemplatesServiceSettings"/>.</param>
        /// <returns>The created <see cref="FlexTemplatesServiceClient"/>.</returns>
        internal static FlexTemplatesServiceClient Create(grpccore::CallInvoker callInvoker, FlexTemplatesServiceSettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            FlexTemplatesService.FlexTemplatesServiceClient grpcClient = new FlexTemplatesService.FlexTemplatesServiceClient(callInvoker);
            return(new FlexTemplatesServiceClientImpl(grpcClient, settings));
        }