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

            _callListDockerImages = clientHelper.BuildApiCall <ListDockerImagesRequest, ListDockerImagesResponse>(grpcClient.ListDockerImagesAsync, grpcClient.ListDockerImages, effectiveSettings.ListDockerImagesSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callListDockerImages);
            Modify_ListDockerImagesApiCall(ref _callListDockerImages);
            _callListRepositories = clientHelper.BuildApiCall <ListRepositoriesRequest, ListRepositoriesResponse>(grpcClient.ListRepositoriesAsync, grpcClient.ListRepositories, effectiveSettings.ListRepositoriesSettings).WithGoogleRequestParam("parent", request => request.Parent);
            Modify_ApiCall(ref _callListRepositories);
            Modify_ListRepositoriesApiCall(ref _callListRepositories);
            _callGetRepository = clientHelper.BuildApiCall <GetRepositoryRequest, Repository>(grpcClient.GetRepositoryAsync, grpcClient.GetRepository, effectiveSettings.GetRepositorySettings).WithGoogleRequestParam("name", request => request.Name);
            Modify_ApiCall(ref _callGetRepository);
            Modify_GetRepositoryApiCall(ref _callGetRepository);
            OnConstruction(grpcClient, effectiveSettings, clientHelper);
        }
 partial void OnConstruction(ArtifactRegistry.ArtifactRegistryClient grpcClient, ArtifactRegistrySettings effectiveSettings, gaxgrpc::ClientHelper clientHelper);
 partial void OnCopy(ArtifactRegistrySettings existing);
        /// <summary>
        /// Creates a <see cref="ArtifactRegistryClient"/> 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="ArtifactRegistrySettings"/>.</param>
        /// <returns>The created <see cref="ArtifactRegistryClient"/>.</returns>
        internal static ArtifactRegistryClient Create(grpccore::CallInvoker callInvoker, ArtifactRegistrySettings settings = null)
        {
            gax::GaxPreconditions.CheckNotNull(callInvoker, nameof(callInvoker));
            grpcinter::Interceptor interceptor = settings?.Interceptor;

            if (interceptor != null)
            {
                callInvoker = grpcinter::CallInvokerExtensions.Intercept(callInvoker, interceptor);
            }
            ArtifactRegistry.ArtifactRegistryClient grpcClient = new ArtifactRegistry.ArtifactRegistryClient(callInvoker);
            return(new ArtifactRegistryClientImpl(grpcClient, settings));
        }