// Code generated by sidekick. DO NOT EDIT.
//
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import Foundation
#if canImport(FoundationNetworking)
  import FoundationNetworking
#endif
import GoogleCloudLocation
import GoogleCloudWkt
import GoogleIAMV1
import GoogleLongRunning
import GoogleRpc
import GoogleCloudGax

/// The Artifact Registry API service.
///
/// Artifact Registry is an artifact management system for storing artifacts
/// from different package management systems.
///
/// The resources managed by this API are:
///
/// * Repositories, which group packages and their data.
/// * Packages, which group versions and their tags.
/// * Versions, which are specific forms of a package.
/// * Tags, which represent alternative names for versions.
/// * Files, which contain content and are optionally associated with a Package
///   or Version.
///
/// @Snippet(path: "ArtifactRegistryQuickstart")
public class ArtifactRegistryClient: Clients.ArtifactRegistryProtocol {
  let inner: any Clients.ArtifactRegistryStub
  let pollingErrorPolicy: GoogleCloudGax.PollingErrorPolicy
  let pollingBackoffPolicy: GoogleCloudGax.BackoffPolicy

  /// Creates a new `ArtifactRegistryClient` instance.
  public init(_ options: GoogleCloudGax.ClientOptions = .init()) throws {
    var inner: any Clients.ArtifactRegistryStub = try Clients.ArtifactRegistryTransport(options)
    inner = Clients.ArtifactRegistryRetry(inner, options: options)
    if let logger = options.logger {
      inner = Clients.ArtifactRegistryLogging(inner, logger: logger)
    }
    self.inner = inner
    self.pollingErrorPolicy = options.pollingErrorPolicy
    self.pollingBackoffPolicy = options.pollingBackoffPolicy
  }

  /// Lists docker images.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListDockerImages")
  public func listDockerImages(
    request: ListDockerImagesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListDockerImagesResponse {
    try await self.inner.listDockerImages(request: request, options: options)
  }

  /// Lists docker images.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListDockerImages")
  public func listDockerImages(
    byItem: ListDockerImagesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<DockerImage, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListDockerImagesResponse
      in
      var request = byItem
      request.pageToken = token
      return try await self.listDockerImages(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets a docker image.
  ///
  /// @Snippet(path: "ArtifactRegistry_GetDockerImage")
  public func getDockerImage(
    request: GetDockerImageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.DockerImage {
    try await self.inner.getDockerImage(request: request, options: options)
  }

  /// Lists maven artifacts.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListMavenArtifacts")
  public func listMavenArtifacts(
    request: ListMavenArtifactsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListMavenArtifactsResponse {
    try await self.inner.listMavenArtifacts(request: request, options: options)
  }

  /// Lists maven artifacts.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListMavenArtifacts")
  public func listMavenArtifacts(
    byItem: ListMavenArtifactsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<MavenArtifact, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListMavenArtifactsResponse
      in
      var request = byItem
      request.pageToken = token
      return try await self.listMavenArtifacts(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets a maven artifact.
  ///
  /// @Snippet(path: "ArtifactRegistry_GetMavenArtifact")
  public func getMavenArtifact(
    request: GetMavenArtifactRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.MavenArtifact {
    try await self.inner.getMavenArtifact(request: request, options: options)
  }

  /// Lists npm packages.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListNpmPackages")
  public func listNpmPackages(
    request: ListNpmPackagesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListNpmPackagesResponse {
    try await self.inner.listNpmPackages(request: request, options: options)
  }

  /// Lists npm packages.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListNpmPackages")
  public func listNpmPackages(
    byItem: ListNpmPackagesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<NpmPackage, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListNpmPackagesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listNpmPackages(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets a npm package.
  ///
  /// @Snippet(path: "ArtifactRegistry_GetNpmPackage")
  public func getNpmPackage(
    request: GetNpmPackageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.NpmPackage {
    try await self.inner.getNpmPackage(request: request, options: options)
  }

  /// Lists python packages.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListPythonPackages")
  public func listPythonPackages(
    request: ListPythonPackagesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListPythonPackagesResponse {
    try await self.inner.listPythonPackages(request: request, options: options)
  }

  /// Lists python packages.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListPythonPackages")
  public func listPythonPackages(
    byItem: ListPythonPackagesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<PythonPackage, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListPythonPackagesResponse
      in
      var request = byItem
      request.pageToken = token
      return try await self.listPythonPackages(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets a python package.
  ///
  /// @Snippet(path: "ArtifactRegistry_GetPythonPackage")
  public func getPythonPackage(
    request: GetPythonPackageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.PythonPackage {
    try await self.inner.getPythonPackage(request: request, options: options)
  }

  /// Imports Apt artifacts. The returned Operation will complete once the
  /// resources are imported. Package, Version, and File resources are created
  /// based on the imported artifacts. Imported artifacts that conflict with
  /// existing resources are ignored.
  ///
  /// @Snippet(path: "ArtifactRegistry_ImportAptArtifacts")
  public func importAptArtifacts(
    request: ImportAptArtifactsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.importAptArtifacts(request: request, options: options)
  }

  /// Imports Apt artifacts. The returned Operation will complete once the
  /// resources are imported. Package, Version, and File resources are created
  /// based on the imported artifacts. Imported artifacts that conflict with
  /// existing resources are ignored.
  ///
  /// @Snippet(path: "ArtifactRegistry_ImportAptArtifacts")
  public func importAptArtifacts(
    withPolling: ImportAptArtifactsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<ImportAptArtifactsResponse> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<ImportAptArtifactsResponse>.State in
      guard op.done else {
        return .init(done: false, result: nil)
      }

      switch op.result {
      case .response(let anyValue):
        guard let anyValueUnwrapped = anyValue else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding(
                "Operation completed but response value was missing")))
        }
        let response = try ImportAptArtifactsResponse(fromAny: anyValueUnwrapped)
        return .init(done: true, result: .success(response))
      case .error(let status):
        guard let statusUnwrapped = status else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding("Operation completed but error value was missing")
            ))
        }
        let error = GoogleCloudGax.RequestError.service(
          GoogleCloudGax.ServiceError(
            code: GoogleRpc.Code(intValue: Int(statusUnwrapped.code)),
            message: statusUnwrapped.message))
        return .init(done: true, result: .failure(error))
      case .none:
        return .init(
          done: true,
          result: .failure(
            GoogleCloudGax.RequestError.binding("Operation completed but result was missing")))
      }
    }
    let rawOp = try await self.importAptArtifacts(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<ImportAptArtifactsResponse>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Imports Yum (RPM) artifacts. The returned Operation will complete once the
  /// resources are imported. Package, Version, and File resources are created
  /// based on the imported artifacts. Imported artifacts that conflict with
  /// existing resources are ignored.
  ///
  /// @Snippet(path: "ArtifactRegistry_ImportYumArtifacts")
  public func importYumArtifacts(
    request: ImportYumArtifactsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.importYumArtifacts(request: request, options: options)
  }

  /// Imports Yum (RPM) artifacts. The returned Operation will complete once the
  /// resources are imported. Package, Version, and File resources are created
  /// based on the imported artifacts. Imported artifacts that conflict with
  /// existing resources are ignored.
  ///
  /// @Snippet(path: "ArtifactRegistry_ImportYumArtifacts")
  public func importYumArtifacts(
    withPolling: ImportYumArtifactsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<ImportYumArtifactsResponse> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<ImportYumArtifactsResponse>.State in
      guard op.done else {
        return .init(done: false, result: nil)
      }

      switch op.result {
      case .response(let anyValue):
        guard let anyValueUnwrapped = anyValue else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding(
                "Operation completed but response value was missing")))
        }
        let response = try ImportYumArtifactsResponse(fromAny: anyValueUnwrapped)
        return .init(done: true, result: .success(response))
      case .error(let status):
        guard let statusUnwrapped = status else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding("Operation completed but error value was missing")
            ))
        }
        let error = GoogleCloudGax.RequestError.service(
          GoogleCloudGax.ServiceError(
            code: GoogleRpc.Code(intValue: Int(statusUnwrapped.code)),
            message: statusUnwrapped.message))
        return .init(done: true, result: .failure(error))
      case .none:
        return .init(
          done: true,
          result: .failure(
            GoogleCloudGax.RequestError.binding("Operation completed but result was missing")))
      }
    }
    let rawOp = try await self.importYumArtifacts(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<ImportYumArtifactsResponse>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Lists repositories.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListRepositories")
  public func listRepositories(
    request: ListRepositoriesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListRepositoriesResponse {
    try await self.inner.listRepositories(request: request, options: options)
  }

  /// Lists repositories.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListRepositories")
  public func listRepositories(
    byItem: ListRepositoriesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Repository, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListRepositoriesResponse
      in
      var request = byItem
      request.pageToken = token
      return try await self.listRepositories(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets a repository.
  ///
  /// @Snippet(path: "ArtifactRegistry_GetRepository")
  public func getRepository(
    request: GetRepositoryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Repository {
    try await self.inner.getRepository(request: request, options: options)
  }

  /// Creates a repository. The returned Operation will finish once the
  /// repository has been created. Its response will be the created Repository.
  ///
  /// @Snippet(path: "ArtifactRegistry_CreateRepository")
  public func createRepository(
    request: CreateRepositoryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createRepository(request: request, options: options)
  }

  /// Creates a repository. The returned Operation will finish once the
  /// repository has been created. Its response will be the created Repository.
  ///
  /// @Snippet(path: "ArtifactRegistry_CreateRepository")
  public func createRepository(
    withPolling: CreateRepositoryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Repository> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<Repository>.State in
      guard op.done else {
        return .init(done: false, result: nil)
      }

      switch op.result {
      case .response(let anyValue):
        guard let anyValueUnwrapped = anyValue else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding(
                "Operation completed but response value was missing")))
        }
        let response = try Repository(fromAny: anyValueUnwrapped)
        return .init(done: true, result: .success(response))
      case .error(let status):
        guard let statusUnwrapped = status else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding("Operation completed but error value was missing")
            ))
        }
        let error = GoogleCloudGax.RequestError.service(
          GoogleCloudGax.ServiceError(
            code: GoogleRpc.Code(intValue: Int(statusUnwrapped.code)),
            message: statusUnwrapped.message))
        return .init(done: true, result: .failure(error))
      case .none:
        return .init(
          done: true,
          result: .failure(
            GoogleCloudGax.RequestError.binding("Operation completed but result was missing")))
      }
    }
    let rawOp = try await self.createRepository(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Repository>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Updates a repository.
  ///
  /// @Snippet(path: "ArtifactRegistry_UpdateRepository")
  public func updateRepository(
    request: UpdateRepositoryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Repository {
    try await self.inner.updateRepository(request: request, options: options)
  }

  /// Deletes a repository and all of its contents. The returned Operation will
  /// finish once the repository has been deleted. It will not have any Operation
  /// metadata and will return a google.protobuf.Empty response.
  ///
  /// @Snippet(path: "ArtifactRegistry_DeleteRepository")
  public func deleteRepository(
    request: DeleteRepositoryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteRepository(request: request, options: options)
  }

  /// Deletes a repository and all of its contents. The returned Operation will
  /// finish once the repository has been deleted. It will not have any Operation
  /// metadata and will return a google.protobuf.Empty response.
  ///
  /// @Snippet(path: "ArtifactRegistry_DeleteRepository")
  public func deleteRepository(
    withPolling: DeleteRepositoryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws -> GoogleCloudGax._PollableOperationImpl<Void>.State
      in
      guard op.done else {
        return .init(done: false, result: nil)
      }

      switch op.result {
      case .response:
        return .init(done: true, result: .success(()))
      case .error(let status):
        guard let statusUnwrapped = status else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding("Operation completed but error value was missing")
            ))
        }
        let error = GoogleCloudGax.RequestError.service(
          GoogleCloudGax.ServiceError(
            code: GoogleRpc.Code(intValue: Int(statusUnwrapped.code)),
            message: statusUnwrapped.message))
        return .init(done: true, result: .failure(error))
      case .none:
        return .init(
          done: true,
          result: .failure(
            GoogleCloudGax.RequestError.binding("Operation completed but result was missing")))
      }
    }
    let rawOp = try await self.deleteRepository(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Lists packages.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListPackages")
  public func listPackages(
    request: ListPackagesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListPackagesResponse {
    try await self.inner.listPackages(request: request, options: options)
  }

  /// Lists packages.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListPackages")
  public func listPackages(
    byItem: ListPackagesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Package, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListPackagesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listPackages(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets a package.
  ///
  /// @Snippet(path: "ArtifactRegistry_GetPackage")
  public func getPackage(
    request: GetPackageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Package {
    try await self.inner.getPackage(request: request, options: options)
  }

  /// Deletes a package and all of its versions and tags. The returned operation
  /// will complete once the package has been deleted.
  ///
  /// @Snippet(path: "ArtifactRegistry_DeletePackage")
  public func deletePackage(
    request: DeletePackageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deletePackage(request: request, options: options)
  }

  /// Deletes a package and all of its versions and tags. The returned operation
  /// will complete once the package has been deleted.
  ///
  /// @Snippet(path: "ArtifactRegistry_DeletePackage")
  public func deletePackage(
    withPolling: DeletePackageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws -> GoogleCloudGax._PollableOperationImpl<Void>.State
      in
      guard op.done else {
        return .init(done: false, result: nil)
      }

      switch op.result {
      case .response:
        return .init(done: true, result: .success(()))
      case .error(let status):
        guard let statusUnwrapped = status else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding("Operation completed but error value was missing")
            ))
        }
        let error = GoogleCloudGax.RequestError.service(
          GoogleCloudGax.ServiceError(
            code: GoogleRpc.Code(intValue: Int(statusUnwrapped.code)),
            message: statusUnwrapped.message))
        return .init(done: true, result: .failure(error))
      case .none:
        return .init(
          done: true,
          result: .failure(
            GoogleCloudGax.RequestError.binding("Operation completed but result was missing")))
      }
    }
    let rawOp = try await self.deletePackage(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Lists versions.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListVersions")
  public func listVersions(
    request: ListVersionsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListVersionsResponse {
    try await self.inner.listVersions(request: request, options: options)
  }

  /// Lists versions.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListVersions")
  public func listVersions(
    byItem: ListVersionsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Version, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListVersionsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listVersions(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets a version
  ///
  /// @Snippet(path: "ArtifactRegistry_GetVersion")
  public func getVersion(
    request: GetVersionRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Version {
    try await self.inner.getVersion(request: request, options: options)
  }

  /// Deletes a version and all of its content. The returned operation will
  /// complete once the version has been deleted.
  ///
  /// @Snippet(path: "ArtifactRegistry_DeleteVersion")
  public func deleteVersion(
    request: DeleteVersionRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteVersion(request: request, options: options)
  }

  /// Deletes a version and all of its content. The returned operation will
  /// complete once the version has been deleted.
  ///
  /// @Snippet(path: "ArtifactRegistry_DeleteVersion")
  public func deleteVersion(
    withPolling: DeleteVersionRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws -> GoogleCloudGax._PollableOperationImpl<Void>.State
      in
      guard op.done else {
        return .init(done: false, result: nil)
      }

      switch op.result {
      case .response:
        return .init(done: true, result: .success(()))
      case .error(let status):
        guard let statusUnwrapped = status else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding("Operation completed but error value was missing")
            ))
        }
        let error = GoogleCloudGax.RequestError.service(
          GoogleCloudGax.ServiceError(
            code: GoogleRpc.Code(intValue: Int(statusUnwrapped.code)),
            message: statusUnwrapped.message))
        return .init(done: true, result: .failure(error))
      case .none:
        return .init(
          done: true,
          result: .failure(
            GoogleCloudGax.RequestError.binding("Operation completed but result was missing")))
      }
    }
    let rawOp = try await self.deleteVersion(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Deletes multiple versions across a repository. The returned operation will
  /// complete once the versions have been deleted.
  ///
  /// @Snippet(path: "ArtifactRegistry_BatchDeleteVersions")
  public func batchDeleteVersions(
    request: BatchDeleteVersionsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.batchDeleteVersions(request: request, options: options)
  }

  /// Deletes multiple versions across a repository. The returned operation will
  /// complete once the versions have been deleted.
  ///
  /// @Snippet(path: "ArtifactRegistry_BatchDeleteVersions")
  public func batchDeleteVersions(
    withPolling: BatchDeleteVersionsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws -> GoogleCloudGax._PollableOperationImpl<Void>.State
      in
      guard op.done else {
        return .init(done: false, result: nil)
      }

      switch op.result {
      case .response:
        return .init(done: true, result: .success(()))
      case .error(let status):
        guard let statusUnwrapped = status else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding("Operation completed but error value was missing")
            ))
        }
        let error = GoogleCloudGax.RequestError.service(
          GoogleCloudGax.ServiceError(
            code: GoogleRpc.Code(intValue: Int(statusUnwrapped.code)),
            message: statusUnwrapped.message))
        return .init(done: true, result: .failure(error))
      case .none:
        return .init(
          done: true,
          result: .failure(
            GoogleCloudGax.RequestError.binding("Operation completed but result was missing")))
      }
    }
    let rawOp = try await self.batchDeleteVersions(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Updates a version.
  ///
  /// @Snippet(path: "ArtifactRegistry_UpdateVersion")
  public func updateVersion(
    request: UpdateVersionRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Version {
    try await self.inner.updateVersion(request: request, options: options)
  }

  /// Lists files.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListFiles")
  public func listFiles(
    request: ListFilesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListFilesResponse {
    try await self.inner.listFiles(request: request, options: options)
  }

  /// Lists files.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListFiles")
  public func listFiles(
    byItem: ListFilesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<File, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListFilesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listFiles(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets a file.
  ///
  /// @Snippet(path: "ArtifactRegistry_GetFile")
  public func getFile(
    request: GetFileRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.File {
    try await self.inner.getFile(request: request, options: options)
  }

  /// Deletes a file and all of its content. It is only allowed on generic
  /// repositories. The returned operation will complete once the file has been
  /// deleted.
  ///
  /// @Snippet(path: "ArtifactRegistry_DeleteFile")
  public func deleteFile(
    request: DeleteFileRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteFile(request: request, options: options)
  }

  /// Deletes a file and all of its content. It is only allowed on generic
  /// repositories. The returned operation will complete once the file has been
  /// deleted.
  ///
  /// @Snippet(path: "ArtifactRegistry_DeleteFile")
  public func deleteFile(
    withPolling: DeleteFileRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws -> GoogleCloudGax._PollableOperationImpl<Void>.State
      in
      guard op.done else {
        return .init(done: false, result: nil)
      }

      switch op.result {
      case .response:
        return .init(done: true, result: .success(()))
      case .error(let status):
        guard let statusUnwrapped = status else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding("Operation completed but error value was missing")
            ))
        }
        let error = GoogleCloudGax.RequestError.service(
          GoogleCloudGax.ServiceError(
            code: GoogleRpc.Code(intValue: Int(statusUnwrapped.code)),
            message: statusUnwrapped.message))
        return .init(done: true, result: .failure(error))
      case .none:
        return .init(
          done: true,
          result: .failure(
            GoogleCloudGax.RequestError.binding("Operation completed but result was missing")))
      }
    }
    let rawOp = try await self.deleteFile(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Updates a file.
  ///
  /// @Snippet(path: "ArtifactRegistry_UpdateFile")
  public func updateFile(
    request: UpdateFileRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.File {
    try await self.inner.updateFile(request: request, options: options)
  }

  /// Lists tags.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListTags")
  public func listTags(
    request: ListTagsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListTagsResponse {
    try await self.inner.listTags(request: request, options: options)
  }

  /// Lists tags.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListTags")
  public func listTags(
    byItem: ListTagsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Tag, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListTagsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listTags(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets a tag.
  ///
  /// @Snippet(path: "ArtifactRegistry_GetTag")
  public func getTag(
    request: GetTagRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Tag {
    try await self.inner.getTag(request: request, options: options)
  }

  /// Creates a tag.
  ///
  /// @Snippet(path: "ArtifactRegistry_CreateTag")
  public func createTag(
    request: CreateTagRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Tag {
    try await self.inner.createTag(request: request, options: options)
  }

  /// Updates a tag.
  ///
  /// @Snippet(path: "ArtifactRegistry_UpdateTag")
  public func updateTag(
    request: UpdateTagRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Tag {
    try await self.inner.updateTag(request: request, options: options)
  }

  /// Deletes a tag.
  ///
  /// @Snippet(path: "ArtifactRegistry_DeleteTag")
  public func deleteTag(
    request: DeleteTagRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.deleteTag(request: request, options: options)
  }

  /// Creates a rule.
  ///
  /// @Snippet(path: "ArtifactRegistry_CreateRule")
  public func createRule(
    request: CreateRuleRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Rule {
    try await self.inner.createRule(request: request, options: options)
  }

  /// Lists rules.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListRules")
  public func listRules(
    request: ListRulesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListRulesResponse {
    try await self.inner.listRules(request: request, options: options)
  }

  /// Lists rules.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListRules")
  public func listRules(
    byItem: ListRulesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Rule, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListRulesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listRules(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets a rule.
  ///
  /// @Snippet(path: "ArtifactRegistry_GetRule")
  public func getRule(
    request: GetRuleRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Rule {
    try await self.inner.getRule(request: request, options: options)
  }

  /// Updates a rule.
  ///
  /// @Snippet(path: "ArtifactRegistry_UpdateRule")
  public func updateRule(
    request: UpdateRuleRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Rule {
    try await self.inner.updateRule(request: request, options: options)
  }

  /// Deletes a rule.
  ///
  /// @Snippet(path: "ArtifactRegistry_DeleteRule")
  public func deleteRule(
    request: DeleteRuleRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.deleteRule(request: request, options: options)
  }

  /// Updates the IAM policy for a given resource.
  ///
  /// @Snippet(path: "ArtifactRegistry_SetIamPolicy")
  public func setIamPolicy(
    request: GoogleIAMV1.SetIamPolicyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleIAMV1.Policy {
    try await self.inner.setIamPolicy(request: request, options: options)
  }

  /// Gets the IAM policy for a given resource.
  ///
  /// @Snippet(path: "ArtifactRegistry_GetIamPolicy")
  public func getIamPolicy(
    request: GoogleIAMV1.GetIamPolicyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleIAMV1.Policy {
    try await self.inner.getIamPolicy(request: request, options: options)
  }

  /// Tests if the caller has a list of permissions on a resource.
  ///
  /// @Snippet(path: "ArtifactRegistry_TestIamPermissions")
  public func testIamPermissions(
    request: GoogleIAMV1.TestIamPermissionsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleIAMV1.TestIamPermissionsResponse {
    try await self.inner.testIamPermissions(request: request, options: options)
  }

  /// Retrieves the Settings for the Project.
  ///
  /// @Snippet(path: "ArtifactRegistry_GetProjectSettings")
  public func getProjectSettings(
    request: GetProjectSettingsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ProjectSettings {
    try await self.inner.getProjectSettings(request: request, options: options)
  }

  /// Updates the Settings for the Project.
  ///
  /// @Snippet(path: "ArtifactRegistry_UpdateProjectSettings")
  public func updateProjectSettings(
    request: UpdateProjectSettingsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ProjectSettings {
    try await self.inner.updateProjectSettings(request: request, options: options)
  }

  /// Retrieves the VPCSC Config for the Project.
  ///
  /// @Snippet(path: "ArtifactRegistry_GetVPCSCConfig")
  public func getVpcscconfig(
    request: GetVPCSCConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.VPCSCConfig {
    try await self.inner.getVpcscconfig(request: request, options: options)
  }

  /// Updates the VPCSC Config for the Project.
  ///
  /// @Snippet(path: "ArtifactRegistry_UpdateVPCSCConfig")
  public func updateVpcscconfig(
    request: UpdateVPCSCConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.VPCSCConfig {
    try await self.inner.updateVpcscconfig(request: request, options: options)
  }

  /// Updates a package.
  ///
  /// @Snippet(path: "ArtifactRegistry_UpdatePackage")
  public func updatePackage(
    request: UpdatePackageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Package {
    try await self.inner.updatePackage(request: request, options: options)
  }

  /// Lists attachments.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListAttachments")
  public func listAttachments(
    request: ListAttachmentsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListAttachmentsResponse {
    try await self.inner.listAttachments(request: request, options: options)
  }

  /// Lists attachments.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListAttachments")
  public func listAttachments(
    byItem: ListAttachmentsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Attachment, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListAttachmentsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listAttachments(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets an attachment.
  ///
  /// @Snippet(path: "ArtifactRegistry_GetAttachment")
  public func getAttachment(
    request: GetAttachmentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Attachment {
    try await self.inner.getAttachment(request: request, options: options)
  }

  /// Creates an attachment. The returned Operation will finish once the
  /// attachment has been created. Its response will be the created attachment.
  ///
  /// @Snippet(path: "ArtifactRegistry_CreateAttachment")
  public func createAttachment(
    request: CreateAttachmentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createAttachment(request: request, options: options)
  }

  /// Creates an attachment. The returned Operation will finish once the
  /// attachment has been created. Its response will be the created attachment.
  ///
  /// @Snippet(path: "ArtifactRegistry_CreateAttachment")
  public func createAttachment(
    withPolling: CreateAttachmentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Attachment> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<Attachment>.State in
      guard op.done else {
        return .init(done: false, result: nil)
      }

      switch op.result {
      case .response(let anyValue):
        guard let anyValueUnwrapped = anyValue else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding(
                "Operation completed but response value was missing")))
        }
        let response = try Attachment(fromAny: anyValueUnwrapped)
        return .init(done: true, result: .success(response))
      case .error(let status):
        guard let statusUnwrapped = status else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding("Operation completed but error value was missing")
            ))
        }
        let error = GoogleCloudGax.RequestError.service(
          GoogleCloudGax.ServiceError(
            code: GoogleRpc.Code(intValue: Int(statusUnwrapped.code)),
            message: statusUnwrapped.message))
        return .init(done: true, result: .failure(error))
      case .none:
        return .init(
          done: true,
          result: .failure(
            GoogleCloudGax.RequestError.binding("Operation completed but result was missing")))
      }
    }
    let rawOp = try await self.createAttachment(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Attachment>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Deletes an attachment. The returned Operation will
  /// finish once the attachments has been deleted. It will not have any
  /// Operation metadata and will return a `google.protobuf.Empty` response.
  ///
  /// @Snippet(path: "ArtifactRegistry_DeleteAttachment")
  public func deleteAttachment(
    request: DeleteAttachmentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteAttachment(request: request, options: options)
  }

  /// Deletes an attachment. The returned Operation will
  /// finish once the attachments has been deleted. It will not have any
  /// Operation metadata and will return a `google.protobuf.Empty` response.
  ///
  /// @Snippet(path: "ArtifactRegistry_DeleteAttachment")
  public func deleteAttachment(
    withPolling: DeleteAttachmentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws -> GoogleCloudGax._PollableOperationImpl<Void>.State
      in
      guard op.done else {
        return .init(done: false, result: nil)
      }

      switch op.result {
      case .response:
        return .init(done: true, result: .success(()))
      case .error(let status):
        guard let statusUnwrapped = status else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding("Operation completed but error value was missing")
            ))
        }
        let error = GoogleCloudGax.RequestError.service(
          GoogleCloudGax.ServiceError(
            code: GoogleRpc.Code(intValue: Int(statusUnwrapped.code)),
            message: statusUnwrapped.message))
        return .init(done: true, result: .failure(error))
      case .none:
        return .init(
          done: true,
          result: .failure(
            GoogleCloudGax.RequestError.binding("Operation completed but result was missing")))
      }
    }
    let rawOp = try await self.deleteAttachment(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Exports an artifact to a Cloud Storage bucket.
  ///
  /// @Snippet(path: "ArtifactRegistry_ExportArtifact")
  public func exportArtifact(
    request: ExportArtifactRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.exportArtifact(request: request, options: options)
  }

  /// Exports an artifact to a Cloud Storage bucket.
  ///
  /// @Snippet(path: "ArtifactRegistry_ExportArtifact")
  public func exportArtifact(
    withPolling: ExportArtifactRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<ExportArtifactResponse> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<ExportArtifactResponse>.State in
      guard op.done else {
        return .init(done: false, result: nil)
      }

      switch op.result {
      case .response(let anyValue):
        guard let anyValueUnwrapped = anyValue else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding(
                "Operation completed but response value was missing")))
        }
        let response = try ExportArtifactResponse(fromAny: anyValueUnwrapped)
        return .init(done: true, result: .success(response))
      case .error(let status):
        guard let statusUnwrapped = status else {
          return .init(
            done: true,
            result: .failure(
              GoogleCloudGax.RequestError.binding("Operation completed but error value was missing")
            ))
        }
        let error = GoogleCloudGax.RequestError.service(
          GoogleCloudGax.ServiceError(
            code: GoogleRpc.Code(intValue: Int(statusUnwrapped.code)),
            message: statusUnwrapped.message))
        return .init(done: true, result: .failure(error))
      case .none:
        return .init(
          done: true,
          result: .failure(
            GoogleCloudGax.RequestError.binding("Operation completed but result was missing")))
      }
    }
    let rawOp = try await self.exportArtifact(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<ExportArtifactResponse>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Lists information about the supported locations for this service.
  /// This method can be called in two ways:
  ///
  /// *   **List all public locations:** Use the path `GET /v1/locations`.
  /// *   **List project-visible locations:** Use the path
  /// `GET /v1/projects/{project_id}/locations`. This may include public
  /// locations as well as private or other locations specifically visible
  /// to the project.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListLocations")
  public func listLocations(
    request: GoogleCloudLocation.ListLocationsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudLocation.ListLocationsResponse {
    try await self.inner.listLocations(request: request, options: options)
  }

  /// Lists information about the supported locations for this service.
  /// This method can be called in two ways:
  ///
  /// *   **List all public locations:** Use the path `GET /v1/locations`.
  /// *   **List project-visible locations:** Use the path
  /// `GET /v1/projects/{project_id}/locations`. This may include public
  /// locations as well as private or other locations specifically visible
  /// to the project.
  ///
  /// @Snippet(path: "ArtifactRegistry_ListLocations")
  public func listLocations(
    byItem: GoogleCloudLocation.ListLocationsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<GoogleCloudLocation.Location, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudLocation.ListLocationsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listLocations(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets information about a location.
  ///
  /// @Snippet(path: "ArtifactRegistry_GetLocation")
  public func getLocation(
    request: GoogleCloudLocation.GetLocationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudLocation.Location {
    try await self.inner.getLocation(request: request, options: options)
  }

  /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
  ///
  /// [google.longrunning.Operations]: https://www.google.com/search?q=Swift+google.longrunning+Operations
  ///
  /// @Snippet(path: "ArtifactRegistry_GetOperation")
  func getOperation(
    request: GoogleLongRunning.GetOperationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.getOperation(request: request, options: options)
  }
}

extension Clients {
  /// A Swift protocol to mock `ArtifactRegistryClient`.
  ///
  /// To mock `ArtifactRegistryClient` change your functions to receive
  /// `some ArtifactRegistryProtocol` or `any ArtifactRegistryProtocol`
  /// and pass a mock implementation in your tests.
  public protocol ArtifactRegistryProtocol {
    /// See `ArtifactRegistryClient.listDockerImages`.
    func listDockerImages(request: ListDockerImagesRequest) async throws
      -> GoogleCloudArtifactRegistryV1.ListDockerImagesResponse

    /// See `ArtifactRegistryClient.listDockerImages`.
    func listDockerImages(
      byItem: ListDockerImagesRequest
    ) throws -> any AsyncSequence<DockerImage, Swift.Error>

    /// See `ArtifactRegistryClient.listDockerImages`.
    func listDockerImages(
      parent: Swift.String,
    ) throws -> any AsyncSequence<DockerImage, Swift.Error>

    /// See `ArtifactRegistryClient.getDockerImage`.
    func getDockerImage(request: GetDockerImageRequest) async throws
      -> GoogleCloudArtifactRegistryV1.DockerImage

    /// See `ArtifactRegistryClient.getDockerImage`.
    func getDockerImage(
      name: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.DockerImage

    /// See `ArtifactRegistryClient.listMavenArtifacts`.
    func listMavenArtifacts(request: ListMavenArtifactsRequest) async throws
      -> GoogleCloudArtifactRegistryV1.ListMavenArtifactsResponse

    /// See `ArtifactRegistryClient.listMavenArtifacts`.
    func listMavenArtifacts(
      byItem: ListMavenArtifactsRequest
    ) throws -> any AsyncSequence<MavenArtifact, Swift.Error>

    /// See `ArtifactRegistryClient.listMavenArtifacts`.
    func listMavenArtifacts(
      parent: Swift.String,
    ) throws -> any AsyncSequence<MavenArtifact, Swift.Error>

    /// See `ArtifactRegistryClient.getMavenArtifact`.
    func getMavenArtifact(request: GetMavenArtifactRequest) async throws
      -> GoogleCloudArtifactRegistryV1.MavenArtifact

    /// See `ArtifactRegistryClient.getMavenArtifact`.
    func getMavenArtifact(
      name: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.MavenArtifact

    /// See `ArtifactRegistryClient.listNpmPackages`.
    func listNpmPackages(request: ListNpmPackagesRequest) async throws
      -> GoogleCloudArtifactRegistryV1.ListNpmPackagesResponse

    /// See `ArtifactRegistryClient.listNpmPackages`.
    func listNpmPackages(
      byItem: ListNpmPackagesRequest
    ) throws -> any AsyncSequence<NpmPackage, Swift.Error>

    /// See `ArtifactRegistryClient.listNpmPackages`.
    func listNpmPackages(
      parent: Swift.String,
    ) throws -> any AsyncSequence<NpmPackage, Swift.Error>

    /// See `ArtifactRegistryClient.getNpmPackage`.
    func getNpmPackage(request: GetNpmPackageRequest) async throws
      -> GoogleCloudArtifactRegistryV1.NpmPackage

    /// See `ArtifactRegistryClient.getNpmPackage`.
    func getNpmPackage(
      name: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.NpmPackage

    /// See `ArtifactRegistryClient.listPythonPackages`.
    func listPythonPackages(request: ListPythonPackagesRequest) async throws
      -> GoogleCloudArtifactRegistryV1.ListPythonPackagesResponse

    /// See `ArtifactRegistryClient.listPythonPackages`.
    func listPythonPackages(
      byItem: ListPythonPackagesRequest
    ) throws -> any AsyncSequence<PythonPackage, Swift.Error>

    /// See `ArtifactRegistryClient.listPythonPackages`.
    func listPythonPackages(
      parent: Swift.String,
    ) throws -> any AsyncSequence<PythonPackage, Swift.Error>

    /// See `ArtifactRegistryClient.getPythonPackage`.
    func getPythonPackage(request: GetPythonPackageRequest) async throws
      -> GoogleCloudArtifactRegistryV1.PythonPackage

    /// See `ArtifactRegistryClient.getPythonPackage`.
    func getPythonPackage(
      name: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.PythonPackage

    /// See `ArtifactRegistryClient.importAptArtifacts`.
    func importAptArtifacts(request: ImportAptArtifactsRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.importAptArtifacts`.
    func importAptArtifacts(withPolling: ImportAptArtifactsRequest) async throws
      -> any GoogleCloudGax.PollableOperation<ImportAptArtifactsResponse>

    /// See `ArtifactRegistryClient.importYumArtifacts`.
    func importYumArtifacts(request: ImportYumArtifactsRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.importYumArtifacts`.
    func importYumArtifacts(withPolling: ImportYumArtifactsRequest) async throws
      -> any GoogleCloudGax.PollableOperation<ImportYumArtifactsResponse>

    /// See `ArtifactRegistryClient.listRepositories`.
    func listRepositories(request: ListRepositoriesRequest) async throws
      -> GoogleCloudArtifactRegistryV1.ListRepositoriesResponse

    /// See `ArtifactRegistryClient.listRepositories`.
    func listRepositories(
      byItem: ListRepositoriesRequest
    ) throws -> any AsyncSequence<Repository, Swift.Error>

    /// See `ArtifactRegistryClient.listRepositories`.
    func listRepositories(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Repository, Swift.Error>

    /// See `ArtifactRegistryClient.getRepository`.
    func getRepository(request: GetRepositoryRequest) async throws
      -> GoogleCloudArtifactRegistryV1.Repository

    /// See `ArtifactRegistryClient.getRepository`.
    func getRepository(
      name: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.Repository

    /// See `ArtifactRegistryClient.createRepository`.
    func createRepository(request: CreateRepositoryRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.createRepository`.
    func createRepository(withPolling: CreateRepositoryRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Repository>

    /// See `ArtifactRegistryClient.createRepository`.
    func createRepository(
      parent: Swift.String,
      repository: Repository?,
      repositoryId: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<Repository>

    /// See `ArtifactRegistryClient.updateRepository`.
    func updateRepository(request: UpdateRepositoryRequest) async throws
      -> GoogleCloudArtifactRegistryV1.Repository

    /// See `ArtifactRegistryClient.updateRepository`.
    func updateRepository(
      repository: Repository?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> GoogleCloudArtifactRegistryV1.Repository

    /// See `ArtifactRegistryClient.deleteRepository`.
    func deleteRepository(request: DeleteRepositoryRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.deleteRepository`.
    func deleteRepository(withPolling: DeleteRepositoryRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

    /// See `ArtifactRegistryClient.deleteRepository`.
    func deleteRepository(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `ArtifactRegistryClient.listPackages`.
    func listPackages(request: ListPackagesRequest) async throws
      -> GoogleCloudArtifactRegistryV1.ListPackagesResponse

    /// See `ArtifactRegistryClient.listPackages`.
    func listPackages(
      byItem: ListPackagesRequest
    ) throws -> any AsyncSequence<Package, Swift.Error>

    /// See `ArtifactRegistryClient.listPackages`.
    func listPackages(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Package, Swift.Error>

    /// See `ArtifactRegistryClient.getPackage`.
    func getPackage(request: GetPackageRequest) async throws
      -> GoogleCloudArtifactRegistryV1.Package

    /// See `ArtifactRegistryClient.getPackage`.
    func getPackage(
      name: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.Package

    /// See `ArtifactRegistryClient.deletePackage`.
    func deletePackage(request: DeletePackageRequest) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.deletePackage`.
    func deletePackage(withPolling: DeletePackageRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

    /// See `ArtifactRegistryClient.deletePackage`.
    func deletePackage(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `ArtifactRegistryClient.listVersions`.
    func listVersions(request: ListVersionsRequest) async throws
      -> GoogleCloudArtifactRegistryV1.ListVersionsResponse

    /// See `ArtifactRegistryClient.listVersions`.
    func listVersions(
      byItem: ListVersionsRequest
    ) throws -> any AsyncSequence<Version, Swift.Error>

    /// See `ArtifactRegistryClient.listVersions`.
    func listVersions(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Version, Swift.Error>

    /// See `ArtifactRegistryClient.getVersion`.
    func getVersion(request: GetVersionRequest) async throws
      -> GoogleCloudArtifactRegistryV1.Version

    /// See `ArtifactRegistryClient.getVersion`.
    func getVersion(
      name: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.Version

    /// See `ArtifactRegistryClient.deleteVersion`.
    func deleteVersion(request: DeleteVersionRequest) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.deleteVersion`.
    func deleteVersion(withPolling: DeleteVersionRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

    /// See `ArtifactRegistryClient.deleteVersion`.
    func deleteVersion(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `ArtifactRegistryClient.batchDeleteVersions`.
    func batchDeleteVersions(request: BatchDeleteVersionsRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.batchDeleteVersions`.
    func batchDeleteVersions(withPolling: BatchDeleteVersionsRequest) async throws
      -> any GoogleCloudGax.PollableOperation<Void>

    /// See `ArtifactRegistryClient.batchDeleteVersions`.
    func batchDeleteVersions(
      parent: Swift.String,
      names: [Swift.String],
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `ArtifactRegistryClient.updateVersion`.
    func updateVersion(request: UpdateVersionRequest) async throws
      -> GoogleCloudArtifactRegistryV1.Version

    /// See `ArtifactRegistryClient.updateVersion`.
    func updateVersion(
      version: Version?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> GoogleCloudArtifactRegistryV1.Version

    /// See `ArtifactRegistryClient.listFiles`.
    func listFiles(request: ListFilesRequest) async throws
      -> GoogleCloudArtifactRegistryV1.ListFilesResponse

    /// See `ArtifactRegistryClient.listFiles`.
    func listFiles(
      byItem: ListFilesRequest
    ) throws -> any AsyncSequence<File, Swift.Error>

    /// See `ArtifactRegistryClient.listFiles`.
    func listFiles(
      parent: Swift.String,
    ) throws -> any AsyncSequence<File, Swift.Error>

    /// See `ArtifactRegistryClient.getFile`.
    func getFile(request: GetFileRequest) async throws -> GoogleCloudArtifactRegistryV1.File

    /// See `ArtifactRegistryClient.getFile`.
    func getFile(
      name: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.File

    /// See `ArtifactRegistryClient.deleteFile`.
    func deleteFile(request: DeleteFileRequest) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.deleteFile`.
    func deleteFile(withPolling: DeleteFileRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

    /// See `ArtifactRegistryClient.deleteFile`.
    func deleteFile(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `ArtifactRegistryClient.updateFile`.
    func updateFile(request: UpdateFileRequest) async throws -> GoogleCloudArtifactRegistryV1.File

    /// See `ArtifactRegistryClient.updateFile`.
    func updateFile(
      file: File?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> GoogleCloudArtifactRegistryV1.File

    /// See `ArtifactRegistryClient.listTags`.
    func listTags(request: ListTagsRequest) async throws
      -> GoogleCloudArtifactRegistryV1.ListTagsResponse

    /// See `ArtifactRegistryClient.listTags`.
    func listTags(
      byItem: ListTagsRequest
    ) throws -> any AsyncSequence<Tag, Swift.Error>

    /// See `ArtifactRegistryClient.listTags`.
    func listTags(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Tag, Swift.Error>

    /// See `ArtifactRegistryClient.getTag`.
    func getTag(request: GetTagRequest) async throws -> GoogleCloudArtifactRegistryV1.Tag

    /// See `ArtifactRegistryClient.getTag`.
    func getTag(
      name: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.Tag

    /// See `ArtifactRegistryClient.createTag`.
    func createTag(request: CreateTagRequest) async throws -> GoogleCloudArtifactRegistryV1.Tag

    /// See `ArtifactRegistryClient.createTag`.
    func createTag(
      parent: Swift.String,
      tag: Tag?,
      tagId: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.Tag

    /// See `ArtifactRegistryClient.updateTag`.
    func updateTag(request: UpdateTagRequest) async throws -> GoogleCloudArtifactRegistryV1.Tag

    /// See `ArtifactRegistryClient.updateTag`.
    func updateTag(
      tag: Tag?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> GoogleCloudArtifactRegistryV1.Tag

    /// See `ArtifactRegistryClient.deleteTag`.
    func deleteTag(request: DeleteTagRequest) async throws

    /// See `ArtifactRegistryClient.deleteTag`.
    func deleteTag(
      name: Swift.String,
    ) async throws

    /// See `ArtifactRegistryClient.createRule`.
    func createRule(request: CreateRuleRequest) async throws -> GoogleCloudArtifactRegistryV1.Rule

    /// See `ArtifactRegistryClient.createRule`.
    func createRule(
      parent: Swift.String,
      rule: Rule?,
      ruleId: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.Rule

    /// See `ArtifactRegistryClient.listRules`.
    func listRules(request: ListRulesRequest) async throws
      -> GoogleCloudArtifactRegistryV1.ListRulesResponse

    /// See `ArtifactRegistryClient.listRules`.
    func listRules(
      byItem: ListRulesRequest
    ) throws -> any AsyncSequence<Rule, Swift.Error>

    /// See `ArtifactRegistryClient.listRules`.
    func listRules(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Rule, Swift.Error>

    /// See `ArtifactRegistryClient.getRule`.
    func getRule(request: GetRuleRequest) async throws -> GoogleCloudArtifactRegistryV1.Rule

    /// See `ArtifactRegistryClient.getRule`.
    func getRule(
      name: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.Rule

    /// See `ArtifactRegistryClient.updateRule`.
    func updateRule(request: UpdateRuleRequest) async throws -> GoogleCloudArtifactRegistryV1.Rule

    /// See `ArtifactRegistryClient.updateRule`.
    func updateRule(
      rule: Rule?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> GoogleCloudArtifactRegistryV1.Rule

    /// See `ArtifactRegistryClient.deleteRule`.
    func deleteRule(request: DeleteRuleRequest) async throws

    /// See `ArtifactRegistryClient.deleteRule`.
    func deleteRule(
      name: Swift.String,
    ) async throws

    /// See `ArtifactRegistryClient.setIamPolicy`.
    func setIamPolicy(request: GoogleIAMV1.SetIamPolicyRequest) async throws -> GoogleIAMV1.Policy

    /// See `ArtifactRegistryClient.getIamPolicy`.
    func getIamPolicy(request: GoogleIAMV1.GetIamPolicyRequest) async throws -> GoogleIAMV1.Policy

    /// See `ArtifactRegistryClient.testIamPermissions`.
    func testIamPermissions(request: GoogleIAMV1.TestIamPermissionsRequest) async throws
      -> GoogleIAMV1.TestIamPermissionsResponse

    /// See `ArtifactRegistryClient.getProjectSettings`.
    func getProjectSettings(request: GetProjectSettingsRequest) async throws
      -> GoogleCloudArtifactRegistryV1.ProjectSettings

    /// See `ArtifactRegistryClient.getProjectSettings`.
    func getProjectSettings(
      name: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.ProjectSettings

    /// See `ArtifactRegistryClient.updateProjectSettings`.
    func updateProjectSettings(request: UpdateProjectSettingsRequest) async throws
      -> GoogleCloudArtifactRegistryV1.ProjectSettings

    /// See `ArtifactRegistryClient.updateProjectSettings`.
    func updateProjectSettings(
      projectSettings: ProjectSettings?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> GoogleCloudArtifactRegistryV1.ProjectSettings

    /// See `ArtifactRegistryClient.getVpcscconfig`.
    func getVpcscconfig(request: GetVPCSCConfigRequest) async throws
      -> GoogleCloudArtifactRegistryV1.VPCSCConfig

    /// See `ArtifactRegistryClient.getVpcscconfig`.
    func getVpcscconfig(
      name: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.VPCSCConfig

    /// See `ArtifactRegistryClient.updateVpcscconfig`.
    func updateVpcscconfig(request: UpdateVPCSCConfigRequest) async throws
      -> GoogleCloudArtifactRegistryV1.VPCSCConfig

    /// See `ArtifactRegistryClient.updateVpcscconfig`.
    func updateVpcscconfig(
      vpcscConfig: VPCSCConfig?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> GoogleCloudArtifactRegistryV1.VPCSCConfig

    /// See `ArtifactRegistryClient.updatePackage`.
    func updatePackage(request: UpdatePackageRequest) async throws
      -> GoogleCloudArtifactRegistryV1.Package

    /// See `ArtifactRegistryClient.updatePackage`.
    func updatePackage(
      `package`: Package?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> GoogleCloudArtifactRegistryV1.Package

    /// See `ArtifactRegistryClient.listAttachments`.
    func listAttachments(request: ListAttachmentsRequest) async throws
      -> GoogleCloudArtifactRegistryV1.ListAttachmentsResponse

    /// See `ArtifactRegistryClient.listAttachments`.
    func listAttachments(
      byItem: ListAttachmentsRequest
    ) throws -> any AsyncSequence<Attachment, Swift.Error>

    /// See `ArtifactRegistryClient.listAttachments`.
    func listAttachments(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Attachment, Swift.Error>

    /// See `ArtifactRegistryClient.getAttachment`.
    func getAttachment(request: GetAttachmentRequest) async throws
      -> GoogleCloudArtifactRegistryV1.Attachment

    /// See `ArtifactRegistryClient.getAttachment`.
    func getAttachment(
      name: Swift.String,
    ) async throws -> GoogleCloudArtifactRegistryV1.Attachment

    /// See `ArtifactRegistryClient.createAttachment`.
    func createAttachment(request: CreateAttachmentRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.createAttachment`.
    func createAttachment(withPolling: CreateAttachmentRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Attachment>

    /// See `ArtifactRegistryClient.createAttachment`.
    func createAttachment(
      parent: Swift.String,
      attachment: Attachment?,
      attachmentId: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<Attachment>

    /// See `ArtifactRegistryClient.deleteAttachment`.
    func deleteAttachment(request: DeleteAttachmentRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.deleteAttachment`.
    func deleteAttachment(withPolling: DeleteAttachmentRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

    /// See `ArtifactRegistryClient.deleteAttachment`.
    func deleteAttachment(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `ArtifactRegistryClient.exportArtifact`.
    func exportArtifact(request: ExportArtifactRequest) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.exportArtifact`.
    func exportArtifact(withPolling: ExportArtifactRequest) async throws -> any GoogleCloudGax
      .PollableOperation<ExportArtifactResponse>

    /// See `ArtifactRegistryClient.listLocations`.
    func listLocations(request: GoogleCloudLocation.ListLocationsRequest) async throws
      -> GoogleCloudLocation.ListLocationsResponse

    /// See `ArtifactRegistryClient.listLocations`.
    func listLocations(
      byItem: GoogleCloudLocation.ListLocationsRequest
    ) throws -> any AsyncSequence<GoogleCloudLocation.Location, Swift.Error>

    /// See `ArtifactRegistryClient.getLocation`.
    func getLocation(request: GoogleCloudLocation.GetLocationRequest) async throws
      -> GoogleCloudLocation.Location

    /// See `ArtifactRegistryClient.listDockerImages`.
    func listDockerImages(
      request: ListDockerImagesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListDockerImagesResponse

    /// See `ArtifactRegistryClient.listDockerImages`.
    func listDockerImages(
      byItem: ListDockerImagesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<DockerImage, Swift.Error>

    /// See `ArtifactRegistryClient.getDockerImage`.
    func getDockerImage(
      request: GetDockerImageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.DockerImage

    /// See `ArtifactRegistryClient.listMavenArtifacts`.
    func listMavenArtifacts(
      request: ListMavenArtifactsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListMavenArtifactsResponse

    /// See `ArtifactRegistryClient.listMavenArtifacts`.
    func listMavenArtifacts(
      byItem: ListMavenArtifactsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<MavenArtifact, Swift.Error>

    /// See `ArtifactRegistryClient.getMavenArtifact`.
    func getMavenArtifact(
      request: GetMavenArtifactRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.MavenArtifact

    /// See `ArtifactRegistryClient.listNpmPackages`.
    func listNpmPackages(
      request: ListNpmPackagesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListNpmPackagesResponse

    /// See `ArtifactRegistryClient.listNpmPackages`.
    func listNpmPackages(
      byItem: ListNpmPackagesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<NpmPackage, Swift.Error>

    /// See `ArtifactRegistryClient.getNpmPackage`.
    func getNpmPackage(
      request: GetNpmPackageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.NpmPackage

    /// See `ArtifactRegistryClient.listPythonPackages`.
    func listPythonPackages(
      request: ListPythonPackagesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListPythonPackagesResponse

    /// See `ArtifactRegistryClient.listPythonPackages`.
    func listPythonPackages(
      byItem: ListPythonPackagesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<PythonPackage, Swift.Error>

    /// See `ArtifactRegistryClient.getPythonPackage`.
    func getPythonPackage(
      request: GetPythonPackageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.PythonPackage

    /// See `ArtifactRegistryClient.importAptArtifacts`.
    func importAptArtifacts(
      request: ImportAptArtifactsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.importAptArtifacts`.
    func importAptArtifacts(
      withPolling: ImportAptArtifactsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<ImportAptArtifactsResponse>

    /// See `ArtifactRegistryClient.importYumArtifacts`.
    func importYumArtifacts(
      request: ImportYumArtifactsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.importYumArtifacts`.
    func importYumArtifacts(
      withPolling: ImportYumArtifactsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<ImportYumArtifactsResponse>

    /// See `ArtifactRegistryClient.listRepositories`.
    func listRepositories(
      request: ListRepositoriesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListRepositoriesResponse

    /// See `ArtifactRegistryClient.listRepositories`.
    func listRepositories(
      byItem: ListRepositoriesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Repository, Swift.Error>

    /// See `ArtifactRegistryClient.getRepository`.
    func getRepository(
      request: GetRepositoryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Repository

    /// See `ArtifactRegistryClient.createRepository`.
    func createRepository(
      request: CreateRepositoryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.createRepository`.
    func createRepository(
      withPolling: CreateRepositoryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Repository>

    /// See `ArtifactRegistryClient.updateRepository`.
    func updateRepository(
      request: UpdateRepositoryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Repository

    /// See `ArtifactRegistryClient.deleteRepository`.
    func deleteRepository(
      request: DeleteRepositoryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.deleteRepository`.
    func deleteRepository(
      withPolling: DeleteRepositoryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `ArtifactRegistryClient.listPackages`.
    func listPackages(
      request: ListPackagesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListPackagesResponse

    /// See `ArtifactRegistryClient.listPackages`.
    func listPackages(
      byItem: ListPackagesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Package, Swift.Error>

    /// See `ArtifactRegistryClient.getPackage`.
    func getPackage(
      request: GetPackageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Package

    /// See `ArtifactRegistryClient.deletePackage`.
    func deletePackage(
      request: DeletePackageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.deletePackage`.
    func deletePackage(
      withPolling: DeletePackageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `ArtifactRegistryClient.listVersions`.
    func listVersions(
      request: ListVersionsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListVersionsResponse

    /// See `ArtifactRegistryClient.listVersions`.
    func listVersions(
      byItem: ListVersionsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Version, Swift.Error>

    /// See `ArtifactRegistryClient.getVersion`.
    func getVersion(
      request: GetVersionRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Version

    /// See `ArtifactRegistryClient.deleteVersion`.
    func deleteVersion(
      request: DeleteVersionRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.deleteVersion`.
    func deleteVersion(
      withPolling: DeleteVersionRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `ArtifactRegistryClient.batchDeleteVersions`.
    func batchDeleteVersions(
      request: BatchDeleteVersionsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.batchDeleteVersions`.
    func batchDeleteVersions(
      withPolling: BatchDeleteVersionsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `ArtifactRegistryClient.updateVersion`.
    func updateVersion(
      request: UpdateVersionRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Version

    /// See `ArtifactRegistryClient.listFiles`.
    func listFiles(
      request: ListFilesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListFilesResponse

    /// See `ArtifactRegistryClient.listFiles`.
    func listFiles(
      byItem: ListFilesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<File, Swift.Error>

    /// See `ArtifactRegistryClient.getFile`.
    func getFile(
      request: GetFileRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.File

    /// See `ArtifactRegistryClient.deleteFile`.
    func deleteFile(
      request: DeleteFileRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.deleteFile`.
    func deleteFile(
      withPolling: DeleteFileRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `ArtifactRegistryClient.updateFile`.
    func updateFile(
      request: UpdateFileRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.File

    /// See `ArtifactRegistryClient.listTags`.
    func listTags(
      request: ListTagsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListTagsResponse

    /// See `ArtifactRegistryClient.listTags`.
    func listTags(
      byItem: ListTagsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Tag, Swift.Error>

    /// See `ArtifactRegistryClient.getTag`.
    func getTag(
      request: GetTagRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Tag

    /// See `ArtifactRegistryClient.createTag`.
    func createTag(
      request: CreateTagRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Tag

    /// See `ArtifactRegistryClient.updateTag`.
    func updateTag(
      request: UpdateTagRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Tag

    /// See `ArtifactRegistryClient.deleteTag`.
    func deleteTag(
      request: DeleteTagRequest, options: GoogleCloudGax.RequestOptions
    ) async throws

    /// See `ArtifactRegistryClient.createRule`.
    func createRule(
      request: CreateRuleRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Rule

    /// See `ArtifactRegistryClient.listRules`.
    func listRules(
      request: ListRulesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListRulesResponse

    /// See `ArtifactRegistryClient.listRules`.
    func listRules(
      byItem: ListRulesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Rule, Swift.Error>

    /// See `ArtifactRegistryClient.getRule`.
    func getRule(
      request: GetRuleRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Rule

    /// See `ArtifactRegistryClient.updateRule`.
    func updateRule(
      request: UpdateRuleRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Rule

    /// See `ArtifactRegistryClient.deleteRule`.
    func deleteRule(
      request: DeleteRuleRequest, options: GoogleCloudGax.RequestOptions
    ) async throws

    /// See `ArtifactRegistryClient.setIamPolicy`.
    func setIamPolicy(
      request: GoogleIAMV1.SetIamPolicyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleIAMV1.Policy

    /// See `ArtifactRegistryClient.getIamPolicy`.
    func getIamPolicy(
      request: GoogleIAMV1.GetIamPolicyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleIAMV1.Policy

    /// See `ArtifactRegistryClient.testIamPermissions`.
    func testIamPermissions(
      request: GoogleIAMV1.TestIamPermissionsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleIAMV1.TestIamPermissionsResponse

    /// See `ArtifactRegistryClient.getProjectSettings`.
    func getProjectSettings(
      request: GetProjectSettingsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ProjectSettings

    /// See `ArtifactRegistryClient.updateProjectSettings`.
    func updateProjectSettings(
      request: UpdateProjectSettingsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ProjectSettings

    /// See `ArtifactRegistryClient.getVpcscconfig`.
    func getVpcscconfig(
      request: GetVPCSCConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.VPCSCConfig

    /// See `ArtifactRegistryClient.updateVpcscconfig`.
    func updateVpcscconfig(
      request: UpdateVPCSCConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.VPCSCConfig

    /// See `ArtifactRegistryClient.updatePackage`.
    func updatePackage(
      request: UpdatePackageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Package

    /// See `ArtifactRegistryClient.listAttachments`.
    func listAttachments(
      request: ListAttachmentsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListAttachmentsResponse

    /// See `ArtifactRegistryClient.listAttachments`.
    func listAttachments(
      byItem: ListAttachmentsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Attachment, Swift.Error>

    /// See `ArtifactRegistryClient.getAttachment`.
    func getAttachment(
      request: GetAttachmentRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Attachment

    /// See `ArtifactRegistryClient.createAttachment`.
    func createAttachment(
      request: CreateAttachmentRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.createAttachment`.
    func createAttachment(
      withPolling: CreateAttachmentRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Attachment>

    /// See `ArtifactRegistryClient.deleteAttachment`.
    func deleteAttachment(
      request: DeleteAttachmentRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.deleteAttachment`.
    func deleteAttachment(
      withPolling: DeleteAttachmentRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `ArtifactRegistryClient.exportArtifact`.
    func exportArtifact(
      request: ExportArtifactRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `ArtifactRegistryClient.exportArtifact`.
    func exportArtifact(
      withPolling: ExportArtifactRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<ExportArtifactResponse>

    /// See `ArtifactRegistryClient.listLocations`.
    func listLocations(
      request: GoogleCloudLocation.ListLocationsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudLocation.ListLocationsResponse

    /// See `ArtifactRegistryClient.listLocations`.
    func listLocations(
      byItem: GoogleCloudLocation.ListLocationsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<GoogleCloudLocation.Location, Swift.Error>

    /// See `ArtifactRegistryClient.getLocation`.
    func getLocation(
      request: GoogleCloudLocation.GetLocationRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudLocation.Location
  }
}

// Default implementations
extension Clients.ArtifactRegistryProtocol {
  public func listDockerImages(request: ListDockerImagesRequest) async throws
    -> GoogleCloudArtifactRegistryV1.ListDockerImagesResponse
  {
    try await self.listDockerImages(request: request, options: .init())
  }

  public func listDockerImages(
    request: ListDockerImagesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListDockerImagesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listDockerImages(
    byItem: ListDockerImagesRequest
  ) throws -> any AsyncSequence<DockerImage, Swift.Error> {
    try self.listDockerImages(byItem: byItem, options: .init())
  }

  public func listDockerImages(
    byItem: ListDockerImagesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<DockerImage, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListDockerImagesResponse
      in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func listDockerImages(
    parent: Swift.String,
  ) throws -> any AsyncSequence<DockerImage, Swift.Error> {
    let request = ListDockerImagesRequest().with {
      $0.parent = parent
    }
    return try self.listDockerImages(byItem: request)
  }

  public func getDockerImage(request: GetDockerImageRequest) async throws
    -> GoogleCloudArtifactRegistryV1.DockerImage
  {
    try await self.getDockerImage(request: request, options: .init())
  }

  public func getDockerImage(
    request: GetDockerImageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.DockerImage {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getDockerImage(
    name: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.DockerImage {
    let request = GetDockerImageRequest().with {
      $0.name = name
    }
    return try await self.getDockerImage(request: request)
  }

  public func listMavenArtifacts(request: ListMavenArtifactsRequest) async throws
    -> GoogleCloudArtifactRegistryV1.ListMavenArtifactsResponse
  {
    try await self.listMavenArtifacts(request: request, options: .init())
  }

  public func listMavenArtifacts(
    request: ListMavenArtifactsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListMavenArtifactsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listMavenArtifacts(
    byItem: ListMavenArtifactsRequest
  ) throws -> any AsyncSequence<MavenArtifact, Swift.Error> {
    try self.listMavenArtifacts(byItem: byItem, options: .init())
  }

  public func listMavenArtifacts(
    byItem: ListMavenArtifactsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<MavenArtifact, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListMavenArtifactsResponse
      in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func listMavenArtifacts(
    parent: Swift.String,
  ) throws -> any AsyncSequence<MavenArtifact, Swift.Error> {
    let request = ListMavenArtifactsRequest().with {
      $0.parent = parent
    }
    return try self.listMavenArtifacts(byItem: request)
  }

  public func getMavenArtifact(request: GetMavenArtifactRequest) async throws
    -> GoogleCloudArtifactRegistryV1.MavenArtifact
  {
    try await self.getMavenArtifact(request: request, options: .init())
  }

  public func getMavenArtifact(
    request: GetMavenArtifactRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.MavenArtifact {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getMavenArtifact(
    name: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.MavenArtifact {
    let request = GetMavenArtifactRequest().with {
      $0.name = name
    }
    return try await self.getMavenArtifact(request: request)
  }

  public func listNpmPackages(request: ListNpmPackagesRequest) async throws
    -> GoogleCloudArtifactRegistryV1.ListNpmPackagesResponse
  {
    try await self.listNpmPackages(request: request, options: .init())
  }

  public func listNpmPackages(
    request: ListNpmPackagesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListNpmPackagesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listNpmPackages(
    byItem: ListNpmPackagesRequest
  ) throws -> any AsyncSequence<NpmPackage, Swift.Error> {
    try self.listNpmPackages(byItem: byItem, options: .init())
  }

  public func listNpmPackages(
    byItem: ListNpmPackagesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<NpmPackage, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListNpmPackagesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func listNpmPackages(
    parent: Swift.String,
  ) throws -> any AsyncSequence<NpmPackage, Swift.Error> {
    let request = ListNpmPackagesRequest().with {
      $0.parent = parent
    }
    return try self.listNpmPackages(byItem: request)
  }

  public func getNpmPackage(request: GetNpmPackageRequest) async throws
    -> GoogleCloudArtifactRegistryV1.NpmPackage
  {
    try await self.getNpmPackage(request: request, options: .init())
  }

  public func getNpmPackage(
    request: GetNpmPackageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.NpmPackage {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getNpmPackage(
    name: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.NpmPackage {
    let request = GetNpmPackageRequest().with {
      $0.name = name
    }
    return try await self.getNpmPackage(request: request)
  }

  public func listPythonPackages(request: ListPythonPackagesRequest) async throws
    -> GoogleCloudArtifactRegistryV1.ListPythonPackagesResponse
  {
    try await self.listPythonPackages(request: request, options: .init())
  }

  public func listPythonPackages(
    request: ListPythonPackagesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListPythonPackagesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listPythonPackages(
    byItem: ListPythonPackagesRequest
  ) throws -> any AsyncSequence<PythonPackage, Swift.Error> {
    try self.listPythonPackages(byItem: byItem, options: .init())
  }

  public func listPythonPackages(
    byItem: ListPythonPackagesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<PythonPackage, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListPythonPackagesResponse
      in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func listPythonPackages(
    parent: Swift.String,
  ) throws -> any AsyncSequence<PythonPackage, Swift.Error> {
    let request = ListPythonPackagesRequest().with {
      $0.parent = parent
    }
    return try self.listPythonPackages(byItem: request)
  }

  public func getPythonPackage(request: GetPythonPackageRequest) async throws
    -> GoogleCloudArtifactRegistryV1.PythonPackage
  {
    try await self.getPythonPackage(request: request, options: .init())
  }

  public func getPythonPackage(
    request: GetPythonPackageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.PythonPackage {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getPythonPackage(
    name: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.PythonPackage {
    let request = GetPythonPackageRequest().with {
      $0.name = name
    }
    return try await self.getPythonPackage(request: request)
  }

  public func importAptArtifacts(request: ImportAptArtifactsRequest) async throws
    -> GoogleLongRunning.Operation
  {
    try await self.importAptArtifacts(request: request, options: .init())
  }

  public func importAptArtifacts(
    request: ImportAptArtifactsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func importAptArtifacts(withPolling: ImportAptArtifactsRequest) async throws
    -> any GoogleCloudGax.PollableOperation<ImportAptArtifactsResponse>
  {
    try await self.importAptArtifacts(withPolling: withPolling, options: .init())
  }

  public func importAptArtifacts(
    withPolling: ImportAptArtifactsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<ImportAptArtifactsResponse> {
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<ImportAptArtifactsResponse>.State in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: .init(done: false, result: nil), poll: poll)
  }

  public func importYumArtifacts(request: ImportYumArtifactsRequest) async throws
    -> GoogleLongRunning.Operation
  {
    try await self.importYumArtifacts(request: request, options: .init())
  }

  public func importYumArtifacts(
    request: ImportYumArtifactsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func importYumArtifacts(withPolling: ImportYumArtifactsRequest) async throws
    -> any GoogleCloudGax.PollableOperation<ImportYumArtifactsResponse>
  {
    try await self.importYumArtifacts(withPolling: withPolling, options: .init())
  }

  public func importYumArtifacts(
    withPolling: ImportYumArtifactsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<ImportYumArtifactsResponse> {
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<ImportYumArtifactsResponse>.State in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: .init(done: false, result: nil), poll: poll)
  }

  public func listRepositories(request: ListRepositoriesRequest) async throws
    -> GoogleCloudArtifactRegistryV1.ListRepositoriesResponse
  {
    try await self.listRepositories(request: request, options: .init())
  }

  public func listRepositories(
    request: ListRepositoriesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListRepositoriesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listRepositories(
    byItem: ListRepositoriesRequest
  ) throws -> any AsyncSequence<Repository, Swift.Error> {
    try self.listRepositories(byItem: byItem, options: .init())
  }

  public func listRepositories(
    byItem: ListRepositoriesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Repository, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListRepositoriesResponse
      in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func listRepositories(
    parent: Swift.String,
  ) throws -> any AsyncSequence<Repository, Swift.Error> {
    let request = ListRepositoriesRequest().with {
      $0.parent = parent
    }
    return try self.listRepositories(byItem: request)
  }

  public func getRepository(request: GetRepositoryRequest) async throws
    -> GoogleCloudArtifactRegistryV1.Repository
  {
    try await self.getRepository(request: request, options: .init())
  }

  public func getRepository(
    request: GetRepositoryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Repository {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getRepository(
    name: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.Repository {
    let request = GetRepositoryRequest().with {
      $0.name = name
    }
    return try await self.getRepository(request: request)
  }

  public func createRepository(request: CreateRepositoryRequest) async throws
    -> GoogleLongRunning.Operation
  {
    try await self.createRepository(request: request, options: .init())
  }

  public func createRepository(
    request: CreateRepositoryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func createRepository(withPolling: CreateRepositoryRequest) async throws
    -> any GoogleCloudGax.PollableOperation<Repository>
  {
    try await self.createRepository(withPolling: withPolling, options: .init())
  }

  public func createRepository(
    withPolling: CreateRepositoryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Repository> {
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Repository>.State in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: .init(done: false, result: nil), poll: poll)
  }

  public func createRepository(
    parent: Swift.String,
    repository: Repository?,
    repositoryId: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Repository> {
    let request = CreateRepositoryRequest().with {
      $0.parent = parent
      $0.repository = repository
      $0.repositoryId = repositoryId
    }
    return try await self.createRepository(withPolling: request)
  }

  public func updateRepository(request: UpdateRepositoryRequest) async throws
    -> GoogleCloudArtifactRegistryV1.Repository
  {
    try await self.updateRepository(request: request, options: .init())
  }

  public func updateRepository(
    request: UpdateRepositoryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Repository {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func updateRepository(
    repository: Repository?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> GoogleCloudArtifactRegistryV1.Repository {
    let request = UpdateRepositoryRequest().with {
      $0.repository = repository
      $0.updateMask = updateMask
    }
    return try await self.updateRepository(request: request)
  }

  public func deleteRepository(request: DeleteRepositoryRequest) async throws
    -> GoogleLongRunning.Operation
  {
    try await self.deleteRepository(request: request, options: .init())
  }

  public func deleteRepository(
    request: DeleteRepositoryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func deleteRepository(withPolling: DeleteRepositoryRequest) async throws
    -> any GoogleCloudGax.PollableOperation<Void>
  {
    try await self.deleteRepository(withPolling: withPolling, options: .init())
  }

  public func deleteRepository(
    withPolling: DeleteRepositoryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: .init(done: false, result: nil), poll: poll)
  }

  public func deleteRepository(
    name: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let request = DeleteRepositoryRequest().with {
      $0.name = name
    }
    return try await self.deleteRepository(withPolling: request)
  }

  public func listPackages(request: ListPackagesRequest) async throws
    -> GoogleCloudArtifactRegistryV1.ListPackagesResponse
  {
    try await self.listPackages(request: request, options: .init())
  }

  public func listPackages(
    request: ListPackagesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListPackagesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listPackages(
    byItem: ListPackagesRequest
  ) throws -> any AsyncSequence<Package, Swift.Error> {
    try self.listPackages(byItem: byItem, options: .init())
  }

  public func listPackages(
    byItem: ListPackagesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Package, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListPackagesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func listPackages(
    parent: Swift.String,
  ) throws -> any AsyncSequence<Package, Swift.Error> {
    let request = ListPackagesRequest().with {
      $0.parent = parent
    }
    return try self.listPackages(byItem: request)
  }

  public func getPackage(request: GetPackageRequest) async throws
    -> GoogleCloudArtifactRegistryV1.Package
  {
    try await self.getPackage(request: request, options: .init())
  }

  public func getPackage(
    request: GetPackageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Package {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getPackage(
    name: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.Package {
    let request = GetPackageRequest().with {
      $0.name = name
    }
    return try await self.getPackage(request: request)
  }

  public func deletePackage(request: DeletePackageRequest) async throws
    -> GoogleLongRunning.Operation
  {
    try await self.deletePackage(request: request, options: .init())
  }

  public func deletePackage(
    request: DeletePackageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func deletePackage(withPolling: DeletePackageRequest) async throws -> any GoogleCloudGax
    .PollableOperation<Void>
  {
    try await self.deletePackage(withPolling: withPolling, options: .init())
  }

  public func deletePackage(
    withPolling: DeletePackageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: .init(done: false, result: nil), poll: poll)
  }

  public func deletePackage(
    name: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let request = DeletePackageRequest().with {
      $0.name = name
    }
    return try await self.deletePackage(withPolling: request)
  }

  public func listVersions(request: ListVersionsRequest) async throws
    -> GoogleCloudArtifactRegistryV1.ListVersionsResponse
  {
    try await self.listVersions(request: request, options: .init())
  }

  public func listVersions(
    request: ListVersionsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListVersionsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listVersions(
    byItem: ListVersionsRequest
  ) throws -> any AsyncSequence<Version, Swift.Error> {
    try self.listVersions(byItem: byItem, options: .init())
  }

  public func listVersions(
    byItem: ListVersionsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Version, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListVersionsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func listVersions(
    parent: Swift.String,
  ) throws -> any AsyncSequence<Version, Swift.Error> {
    let request = ListVersionsRequest().with {
      $0.parent = parent
    }
    return try self.listVersions(byItem: request)
  }

  public func getVersion(request: GetVersionRequest) async throws
    -> GoogleCloudArtifactRegistryV1.Version
  {
    try await self.getVersion(request: request, options: .init())
  }

  public func getVersion(
    request: GetVersionRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Version {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getVersion(
    name: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.Version {
    let request = GetVersionRequest().with {
      $0.name = name
    }
    return try await self.getVersion(request: request)
  }

  public func deleteVersion(request: DeleteVersionRequest) async throws
    -> GoogleLongRunning.Operation
  {
    try await self.deleteVersion(request: request, options: .init())
  }

  public func deleteVersion(
    request: DeleteVersionRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func deleteVersion(withPolling: DeleteVersionRequest) async throws -> any GoogleCloudGax
    .PollableOperation<Void>
  {
    try await self.deleteVersion(withPolling: withPolling, options: .init())
  }

  public func deleteVersion(
    withPolling: DeleteVersionRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: .init(done: false, result: nil), poll: poll)
  }

  public func deleteVersion(
    name: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let request = DeleteVersionRequest().with {
      $0.name = name
    }
    return try await self.deleteVersion(withPolling: request)
  }

  public func batchDeleteVersions(request: BatchDeleteVersionsRequest) async throws
    -> GoogleLongRunning.Operation
  {
    try await self.batchDeleteVersions(request: request, options: .init())
  }

  public func batchDeleteVersions(
    request: BatchDeleteVersionsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func batchDeleteVersions(withPolling: BatchDeleteVersionsRequest) async throws
    -> any GoogleCloudGax.PollableOperation<Void>
  {
    try await self.batchDeleteVersions(withPolling: withPolling, options: .init())
  }

  public func batchDeleteVersions(
    withPolling: BatchDeleteVersionsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: .init(done: false, result: nil), poll: poll)
  }

  public func batchDeleteVersions(
    parent: Swift.String,
    names: [Swift.String],
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let request = BatchDeleteVersionsRequest().with {
      $0.parent = parent
      $0.names = names
    }
    return try await self.batchDeleteVersions(withPolling: request)
  }

  public func updateVersion(request: UpdateVersionRequest) async throws
    -> GoogleCloudArtifactRegistryV1.Version
  {
    try await self.updateVersion(request: request, options: .init())
  }

  public func updateVersion(
    request: UpdateVersionRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Version {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func updateVersion(
    version: Version?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> GoogleCloudArtifactRegistryV1.Version {
    let request = UpdateVersionRequest().with {
      $0.version = version
      $0.updateMask = updateMask
    }
    return try await self.updateVersion(request: request)
  }

  public func listFiles(request: ListFilesRequest) async throws
    -> GoogleCloudArtifactRegistryV1.ListFilesResponse
  {
    try await self.listFiles(request: request, options: .init())
  }

  public func listFiles(
    request: ListFilesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListFilesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listFiles(
    byItem: ListFilesRequest
  ) throws -> any AsyncSequence<File, Swift.Error> {
    try self.listFiles(byItem: byItem, options: .init())
  }

  public func listFiles(
    byItem: ListFilesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<File, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListFilesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func listFiles(
    parent: Swift.String,
  ) throws -> any AsyncSequence<File, Swift.Error> {
    let request = ListFilesRequest().with {
      $0.parent = parent
    }
    return try self.listFiles(byItem: request)
  }

  public func getFile(request: GetFileRequest) async throws -> GoogleCloudArtifactRegistryV1.File {
    try await self.getFile(request: request, options: .init())
  }

  public func getFile(
    request: GetFileRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.File {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getFile(
    name: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.File {
    let request = GetFileRequest().with {
      $0.name = name
    }
    return try await self.getFile(request: request)
  }

  public func deleteFile(request: DeleteFileRequest) async throws -> GoogleLongRunning.Operation {
    try await self.deleteFile(request: request, options: .init())
  }

  public func deleteFile(
    request: DeleteFileRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func deleteFile(withPolling: DeleteFileRequest) async throws -> any GoogleCloudGax
    .PollableOperation<Void>
  {
    try await self.deleteFile(withPolling: withPolling, options: .init())
  }

  public func deleteFile(
    withPolling: DeleteFileRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: .init(done: false, result: nil), poll: poll)
  }

  public func deleteFile(
    name: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let request = DeleteFileRequest().with {
      $0.name = name
    }
    return try await self.deleteFile(withPolling: request)
  }

  public func updateFile(request: UpdateFileRequest) async throws
    -> GoogleCloudArtifactRegistryV1.File
  {
    try await self.updateFile(request: request, options: .init())
  }

  public func updateFile(
    request: UpdateFileRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.File {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func updateFile(
    file: File?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> GoogleCloudArtifactRegistryV1.File {
    let request = UpdateFileRequest().with {
      $0.file = file
      $0.updateMask = updateMask
    }
    return try await self.updateFile(request: request)
  }

  public func listTags(request: ListTagsRequest) async throws
    -> GoogleCloudArtifactRegistryV1.ListTagsResponse
  {
    try await self.listTags(request: request, options: .init())
  }

  public func listTags(
    request: ListTagsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListTagsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listTags(
    byItem: ListTagsRequest
  ) throws -> any AsyncSequence<Tag, Swift.Error> {
    try self.listTags(byItem: byItem, options: .init())
  }

  public func listTags(
    byItem: ListTagsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Tag, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListTagsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func listTags(
    parent: Swift.String,
  ) throws -> any AsyncSequence<Tag, Swift.Error> {
    let request = ListTagsRequest().with {
      $0.parent = parent
    }
    return try self.listTags(byItem: request)
  }

  public func getTag(request: GetTagRequest) async throws -> GoogleCloudArtifactRegistryV1.Tag {
    try await self.getTag(request: request, options: .init())
  }

  public func getTag(
    request: GetTagRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Tag {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getTag(
    name: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.Tag {
    let request = GetTagRequest().with {
      $0.name = name
    }
    return try await self.getTag(request: request)
  }

  public func createTag(request: CreateTagRequest) async throws -> GoogleCloudArtifactRegistryV1.Tag
  {
    try await self.createTag(request: request, options: .init())
  }

  public func createTag(
    request: CreateTagRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Tag {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func createTag(
    parent: Swift.String,
    tag: Tag?,
    tagId: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.Tag {
    let request = CreateTagRequest().with {
      $0.parent = parent
      $0.tag = tag
      $0.tagId = tagId
    }
    return try await self.createTag(request: request)
  }

  public func updateTag(request: UpdateTagRequest) async throws -> GoogleCloudArtifactRegistryV1.Tag
  {
    try await self.updateTag(request: request, options: .init())
  }

  public func updateTag(
    request: UpdateTagRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Tag {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func updateTag(
    tag: Tag?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> GoogleCloudArtifactRegistryV1.Tag {
    let request = UpdateTagRequest().with {
      $0.tag = tag
      $0.updateMask = updateMask
    }
    return try await self.updateTag(request: request)
  }

  public func deleteTag(request: DeleteTagRequest) async throws {
    try await self.deleteTag(request: request, options: .init())
  }

  public func deleteTag(
    request: DeleteTagRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func deleteTag(
    name: Swift.String,
  ) async throws {
    let request = DeleteTagRequest().with {
      $0.name = name
    }
    try await self.deleteTag(request: request)
  }

  public func createRule(request: CreateRuleRequest) async throws
    -> GoogleCloudArtifactRegistryV1.Rule
  {
    try await self.createRule(request: request, options: .init())
  }

  public func createRule(
    request: CreateRuleRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Rule {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func createRule(
    parent: Swift.String,
    rule: Rule?,
    ruleId: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.Rule {
    let request = CreateRuleRequest().with {
      $0.parent = parent
      $0.rule = rule
      $0.ruleId = ruleId
    }
    return try await self.createRule(request: request)
  }

  public func listRules(request: ListRulesRequest) async throws
    -> GoogleCloudArtifactRegistryV1.ListRulesResponse
  {
    try await self.listRules(request: request, options: .init())
  }

  public func listRules(
    request: ListRulesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListRulesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listRules(
    byItem: ListRulesRequest
  ) throws -> any AsyncSequence<Rule, Swift.Error> {
    try self.listRules(byItem: byItem, options: .init())
  }

  public func listRules(
    byItem: ListRulesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Rule, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListRulesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func listRules(
    parent: Swift.String,
  ) throws -> any AsyncSequence<Rule, Swift.Error> {
    let request = ListRulesRequest().with {
      $0.parent = parent
    }
    return try self.listRules(byItem: request)
  }

  public func getRule(request: GetRuleRequest) async throws -> GoogleCloudArtifactRegistryV1.Rule {
    try await self.getRule(request: request, options: .init())
  }

  public func getRule(
    request: GetRuleRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Rule {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getRule(
    name: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.Rule {
    let request = GetRuleRequest().with {
      $0.name = name
    }
    return try await self.getRule(request: request)
  }

  public func updateRule(request: UpdateRuleRequest) async throws
    -> GoogleCloudArtifactRegistryV1.Rule
  {
    try await self.updateRule(request: request, options: .init())
  }

  public func updateRule(
    request: UpdateRuleRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Rule {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func updateRule(
    rule: Rule?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> GoogleCloudArtifactRegistryV1.Rule {
    let request = UpdateRuleRequest().with {
      $0.rule = rule
      $0.updateMask = updateMask
    }
    return try await self.updateRule(request: request)
  }

  public func deleteRule(request: DeleteRuleRequest) async throws {
    try await self.deleteRule(request: request, options: .init())
  }

  public func deleteRule(
    request: DeleteRuleRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func deleteRule(
    name: Swift.String,
  ) async throws {
    let request = DeleteRuleRequest().with {
      $0.name = name
    }
    try await self.deleteRule(request: request)
  }

  public func setIamPolicy(request: GoogleIAMV1.SetIamPolicyRequest) async throws
    -> GoogleIAMV1.Policy
  {
    try await self.setIamPolicy(request: request, options: .init())
  }

  public func setIamPolicy(
    request: GoogleIAMV1.SetIamPolicyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleIAMV1.Policy {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getIamPolicy(request: GoogleIAMV1.GetIamPolicyRequest) async throws
    -> GoogleIAMV1.Policy
  {
    try await self.getIamPolicy(request: request, options: .init())
  }

  public func getIamPolicy(
    request: GoogleIAMV1.GetIamPolicyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleIAMV1.Policy {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func testIamPermissions(request: GoogleIAMV1.TestIamPermissionsRequest) async throws
    -> GoogleIAMV1.TestIamPermissionsResponse
  {
    try await self.testIamPermissions(request: request, options: .init())
  }

  public func testIamPermissions(
    request: GoogleIAMV1.TestIamPermissionsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleIAMV1.TestIamPermissionsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getProjectSettings(request: GetProjectSettingsRequest) async throws
    -> GoogleCloudArtifactRegistryV1.ProjectSettings
  {
    try await self.getProjectSettings(request: request, options: .init())
  }

  public func getProjectSettings(
    request: GetProjectSettingsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ProjectSettings {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getProjectSettings(
    name: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.ProjectSettings {
    let request = GetProjectSettingsRequest().with {
      $0.name = name
    }
    return try await self.getProjectSettings(request: request)
  }

  public func updateProjectSettings(request: UpdateProjectSettingsRequest) async throws
    -> GoogleCloudArtifactRegistryV1.ProjectSettings
  {
    try await self.updateProjectSettings(request: request, options: .init())
  }

  public func updateProjectSettings(
    request: UpdateProjectSettingsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ProjectSettings {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func updateProjectSettings(
    projectSettings: ProjectSettings?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> GoogleCloudArtifactRegistryV1.ProjectSettings {
    let request = UpdateProjectSettingsRequest().with {
      $0.projectSettings = projectSettings
      $0.updateMask = updateMask
    }
    return try await self.updateProjectSettings(request: request)
  }

  public func getVpcscconfig(request: GetVPCSCConfigRequest) async throws
    -> GoogleCloudArtifactRegistryV1.VPCSCConfig
  {
    try await self.getVpcscconfig(request: request, options: .init())
  }

  public func getVpcscconfig(
    request: GetVPCSCConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.VPCSCConfig {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getVpcscconfig(
    name: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.VPCSCConfig {
    let request = GetVPCSCConfigRequest().with {
      $0.name = name
    }
    return try await self.getVpcscconfig(request: request)
  }

  public func updateVpcscconfig(request: UpdateVPCSCConfigRequest) async throws
    -> GoogleCloudArtifactRegistryV1.VPCSCConfig
  {
    try await self.updateVpcscconfig(request: request, options: .init())
  }

  public func updateVpcscconfig(
    request: UpdateVPCSCConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.VPCSCConfig {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func updateVpcscconfig(
    vpcscConfig: VPCSCConfig?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> GoogleCloudArtifactRegistryV1.VPCSCConfig {
    let request = UpdateVPCSCConfigRequest().with {
      $0.vpcscConfig = vpcscConfig
      $0.updateMask = updateMask
    }
    return try await self.updateVpcscconfig(request: request)
  }

  public func updatePackage(request: UpdatePackageRequest) async throws
    -> GoogleCloudArtifactRegistryV1.Package
  {
    try await self.updatePackage(request: request, options: .init())
  }

  public func updatePackage(
    request: UpdatePackageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Package {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func updatePackage(
    `package`: Package?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> GoogleCloudArtifactRegistryV1.Package {
    let request = UpdatePackageRequest().with {
      $0.`package` = `package`
      $0.updateMask = updateMask
    }
    return try await self.updatePackage(request: request)
  }

  public func listAttachments(request: ListAttachmentsRequest) async throws
    -> GoogleCloudArtifactRegistryV1.ListAttachmentsResponse
  {
    try await self.listAttachments(request: request, options: .init())
  }

  public func listAttachments(
    request: ListAttachmentsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.ListAttachmentsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listAttachments(
    byItem: ListAttachmentsRequest
  ) throws -> any AsyncSequence<Attachment, Swift.Error> {
    try self.listAttachments(byItem: byItem, options: .init())
  }

  public func listAttachments(
    byItem: ListAttachmentsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Attachment, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudArtifactRegistryV1.ListAttachmentsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func listAttachments(
    parent: Swift.String,
  ) throws -> any AsyncSequence<Attachment, Swift.Error> {
    let request = ListAttachmentsRequest().with {
      $0.parent = parent
    }
    return try self.listAttachments(byItem: request)
  }

  public func getAttachment(request: GetAttachmentRequest) async throws
    -> GoogleCloudArtifactRegistryV1.Attachment
  {
    try await self.getAttachment(request: request, options: .init())
  }

  public func getAttachment(
    request: GetAttachmentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudArtifactRegistryV1.Attachment {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getAttachment(
    name: Swift.String,
  ) async throws -> GoogleCloudArtifactRegistryV1.Attachment {
    let request = GetAttachmentRequest().with {
      $0.name = name
    }
    return try await self.getAttachment(request: request)
  }

  public func createAttachment(request: CreateAttachmentRequest) async throws
    -> GoogleLongRunning.Operation
  {
    try await self.createAttachment(request: request, options: .init())
  }

  public func createAttachment(
    request: CreateAttachmentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func createAttachment(withPolling: CreateAttachmentRequest) async throws
    -> any GoogleCloudGax.PollableOperation<Attachment>
  {
    try await self.createAttachment(withPolling: withPolling, options: .init())
  }

  public func createAttachment(
    withPolling: CreateAttachmentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Attachment> {
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Attachment>.State in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: .init(done: false, result: nil), poll: poll)
  }

  public func createAttachment(
    parent: Swift.String,
    attachment: Attachment?,
    attachmentId: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Attachment> {
    let request = CreateAttachmentRequest().with {
      $0.parent = parent
      $0.attachment = attachment
      $0.attachmentId = attachmentId
    }
    return try await self.createAttachment(withPolling: request)
  }

  public func deleteAttachment(request: DeleteAttachmentRequest) async throws
    -> GoogleLongRunning.Operation
  {
    try await self.deleteAttachment(request: request, options: .init())
  }

  public func deleteAttachment(
    request: DeleteAttachmentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func deleteAttachment(withPolling: DeleteAttachmentRequest) async throws
    -> any GoogleCloudGax.PollableOperation<Void>
  {
    try await self.deleteAttachment(withPolling: withPolling, options: .init())
  }

  public func deleteAttachment(
    withPolling: DeleteAttachmentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: .init(done: false, result: nil), poll: poll)
  }

  public func deleteAttachment(
    name: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let request = DeleteAttachmentRequest().with {
      $0.name = name
    }
    return try await self.deleteAttachment(withPolling: request)
  }

  public func exportArtifact(request: ExportArtifactRequest) async throws
    -> GoogleLongRunning.Operation
  {
    try await self.exportArtifact(request: request, options: .init())
  }

  public func exportArtifact(
    request: ExportArtifactRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func exportArtifact(withPolling: ExportArtifactRequest) async throws -> any GoogleCloudGax
    .PollableOperation<ExportArtifactResponse>
  {
    try await self.exportArtifact(withPolling: withPolling, options: .init())
  }

  public func exportArtifact(
    withPolling: ExportArtifactRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<ExportArtifactResponse> {
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<ExportArtifactResponse>.State in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: .init(done: false, result: nil), poll: poll)
  }

  public func listLocations(request: GoogleCloudLocation.ListLocationsRequest) async throws
    -> GoogleCloudLocation.ListLocationsResponse
  {
    try await self.listLocations(request: request, options: .init())
  }

  public func listLocations(
    request: GoogleCloudLocation.ListLocationsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudLocation.ListLocationsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listLocations(
    byItem: GoogleCloudLocation.ListLocationsRequest
  ) throws -> any AsyncSequence<GoogleCloudLocation.Location, Swift.Error> {
    try self.listLocations(byItem: byItem, options: .init())
  }

  public func listLocations(
    byItem: GoogleCloudLocation.ListLocationsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<GoogleCloudLocation.Location, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudLocation.ListLocationsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func getLocation(request: GoogleCloudLocation.GetLocationRequest) async throws
    -> GoogleCloudLocation.Location
  {
    try await self.getLocation(request: request, options: .init())
  }

  public func getLocation(
    request: GoogleCloudLocation.GetLocationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudLocation.Location {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getOperation(request: GoogleLongRunning.GetOperationRequest) async throws
    -> GoogleLongRunning.Operation
  {
    try await self.getOperation(request: request, options: .init())
  }

  public func getOperation(
    request: GoogleLongRunning.GetOperationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getOperation(
    name: Swift.String,
  ) async throws -> GoogleLongRunning.Operation {
    let request = GoogleLongRunning.GetOperationRequest().with {
      $0.name = name
    }
    return try await self.getOperation(request: request)
  }
}
