// 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
import struct Logging.Logger

extension Clients {
  final class ArtifactRegistryLogging: ArtifactRegistryStub {
    let inner: any ArtifactRegistryStub
    let logger: Logger

    public init(_ inner: any ArtifactRegistryStub, logger: Logger) {
      var logger = logger
      logger[metadataKey: "gcp.artifact.id"] = "google-devtools-artifactregistry-v1"
      logger[metadataKey: "gcp.client.service"] = "artifactregistry"
      logger[metadataKey: "gcp.experimental.swift.client"] = "ArtifactRegistry"
      self.inner = inner
      self.logger = logger
    }

    func _intercept<Input, Output>(
      request: Input,
      options: GoogleCloudGax.RequestOptions,
      name: Swift.String,
      action: (Input, GoogleCloudGax.RequestOptions) async throws -> Output,
    ) async throws -> Output {
      var logger = logger
      logger[metadataKey: "gcp.experimental.swift.request.id"] = "\(UUID())"
      logger[metadataKey: "gcp.experimental.swift.method"] = .string(name)
      logger.debug("enter  : \(request) \(options)")
      do {
        let output = try await action(request, options)
        logger.debug("success: \(request) \(options) \(output)")
        return output
      } catch let error {
        logger.debug("error  : \(request) \(options) \(error)")
        throw error
      }
    }

    public func listDockerImages(
      request: ListDockerImagesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListDockerImagesResponse {
      try await self._intercept(
        request: request,
        options: options,
        name: "listDockerImages",
        action: {
          (r: ListDockerImagesRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.ListDockerImagesResponse
          in
          return try await self.inner.listDockerImages(request: r, options: o)
        })
    }

    public func getDockerImage(
      request: GetDockerImageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.DockerImage {
      try await self._intercept(
        request: request,
        options: options,
        name: "getDockerImage",
        action: {
          (r: GetDockerImageRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.DockerImage
          in
          return try await self.inner.getDockerImage(request: r, options: o)
        })
    }

    public func listMavenArtifacts(
      request: ListMavenArtifactsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListMavenArtifactsResponse {
      try await self._intercept(
        request: request,
        options: options,
        name: "listMavenArtifacts",
        action: {
          (r: ListMavenArtifactsRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.ListMavenArtifactsResponse
          in
          return try await self.inner.listMavenArtifacts(request: r, options: o)
        })
    }

    public func getMavenArtifact(
      request: GetMavenArtifactRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.MavenArtifact {
      try await self._intercept(
        request: request,
        options: options,
        name: "getMavenArtifact",
        action: {
          (r: GetMavenArtifactRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.MavenArtifact
          in
          return try await self.inner.getMavenArtifact(request: r, options: o)
        })
    }

    public func listNpmPackages(
      request: ListNpmPackagesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListNpmPackagesResponse {
      try await self._intercept(
        request: request,
        options: options,
        name: "listNpmPackages",
        action: {
          (r: ListNpmPackagesRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.ListNpmPackagesResponse
          in
          return try await self.inner.listNpmPackages(request: r, options: o)
        })
    }

    public func getNpmPackage(
      request: GetNpmPackageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.NpmPackage {
      try await self._intercept(
        request: request,
        options: options,
        name: "getNpmPackage",
        action: {
          (r: GetNpmPackageRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.NpmPackage
          in
          return try await self.inner.getNpmPackage(request: r, options: o)
        })
    }

    public func listPythonPackages(
      request: ListPythonPackagesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListPythonPackagesResponse {
      try await self._intercept(
        request: request,
        options: options,
        name: "listPythonPackages",
        action: {
          (r: ListPythonPackagesRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.ListPythonPackagesResponse
          in
          return try await self.inner.listPythonPackages(request: r, options: o)
        })
    }

    public func getPythonPackage(
      request: GetPythonPackageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.PythonPackage {
      try await self._intercept(
        request: request,
        options: options,
        name: "getPythonPackage",
        action: {
          (r: GetPythonPackageRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.PythonPackage
          in
          return try await self.inner.getPythonPackage(request: r, options: o)
        })
    }

    public func importAptArtifacts(
      request: ImportAptArtifactsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation {
      try await self._intercept(
        request: request,
        options: options,
        name: "importAptArtifacts",
        action: {
          (r: ImportAptArtifactsRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleLongRunning.Operation
          in
          return try await self.inner.importAptArtifacts(request: r, options: o)
        })
    }

    public func importYumArtifacts(
      request: ImportYumArtifactsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation {
      try await self._intercept(
        request: request,
        options: options,
        name: "importYumArtifacts",
        action: {
          (r: ImportYumArtifactsRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleLongRunning.Operation
          in
          return try await self.inner.importYumArtifacts(request: r, options: o)
        })
    }

    public func listRepositories(
      request: ListRepositoriesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListRepositoriesResponse {
      try await self._intercept(
        request: request,
        options: options,
        name: "listRepositories",
        action: {
          (r: ListRepositoriesRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.ListRepositoriesResponse
          in
          return try await self.inner.listRepositories(request: r, options: o)
        })
    }

    public func getRepository(
      request: GetRepositoryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Repository {
      try await self._intercept(
        request: request,
        options: options,
        name: "getRepository",
        action: {
          (r: GetRepositoryRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.Repository
          in
          return try await self.inner.getRepository(request: r, options: o)
        })
    }

    public func createRepository(
      request: CreateRepositoryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation {
      try await self._intercept(
        request: request,
        options: options,
        name: "createRepository",
        action: {
          (r: CreateRepositoryRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleLongRunning.Operation
          in
          return try await self.inner.createRepository(request: r, options: o)
        })
    }

    public func updateRepository(
      request: UpdateRepositoryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Repository {
      try await self._intercept(
        request: request,
        options: options,
        name: "updateRepository",
        action: {
          (r: UpdateRepositoryRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.Repository
          in
          return try await self.inner.updateRepository(request: r, options: o)
        })
    }

    public func deleteRepository(
      request: DeleteRepositoryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation {
      try await self._intercept(
        request: request,
        options: options,
        name: "deleteRepository",
        action: {
          (r: DeleteRepositoryRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleLongRunning.Operation
          in
          return try await self.inner.deleteRepository(request: r, options: o)
        })
    }

    public func listPackages(
      request: ListPackagesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListPackagesResponse {
      try await self._intercept(
        request: request,
        options: options,
        name: "listPackages",
        action: {
          (r: ListPackagesRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.ListPackagesResponse
          in
          return try await self.inner.listPackages(request: r, options: o)
        })
    }

    public func getPackage(
      request: GetPackageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Package {
      try await self._intercept(
        request: request,
        options: options,
        name: "getPackage",
        action: {
          (r: GetPackageRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.Package
          in
          return try await self.inner.getPackage(request: r, options: o)
        })
    }

    public func deletePackage(
      request: DeletePackageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation {
      try await self._intercept(
        request: request,
        options: options,
        name: "deletePackage",
        action: {
          (r: DeletePackageRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleLongRunning.Operation
          in
          return try await self.inner.deletePackage(request: r, options: o)
        })
    }

    public func listVersions(
      request: ListVersionsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListVersionsResponse {
      try await self._intercept(
        request: request,
        options: options,
        name: "listVersions",
        action: {
          (r: ListVersionsRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.ListVersionsResponse
          in
          return try await self.inner.listVersions(request: r, options: o)
        })
    }

    public func getVersion(
      request: GetVersionRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Version {
      try await self._intercept(
        request: request,
        options: options,
        name: "getVersion",
        action: {
          (r: GetVersionRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.Version
          in
          return try await self.inner.getVersion(request: r, options: o)
        })
    }

    public func deleteVersion(
      request: DeleteVersionRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation {
      try await self._intercept(
        request: request,
        options: options,
        name: "deleteVersion",
        action: {
          (r: DeleteVersionRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleLongRunning.Operation
          in
          return try await self.inner.deleteVersion(request: r, options: o)
        })
    }

    public func batchDeleteVersions(
      request: BatchDeleteVersionsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation {
      try await self._intercept(
        request: request,
        options: options,
        name: "batchDeleteVersions",
        action: {
          (r: BatchDeleteVersionsRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleLongRunning.Operation
          in
          return try await self.inner.batchDeleteVersions(request: r, options: o)
        })
    }

    public func updateVersion(
      request: UpdateVersionRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Version {
      try await self._intercept(
        request: request,
        options: options,
        name: "updateVersion",
        action: {
          (r: UpdateVersionRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.Version
          in
          return try await self.inner.updateVersion(request: r, options: o)
        })
    }

    public func listFiles(
      request: ListFilesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListFilesResponse {
      try await self._intercept(
        request: request,
        options: options,
        name: "listFiles",
        action: {
          (r: ListFilesRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.ListFilesResponse
          in
          return try await self.inner.listFiles(request: r, options: o)
        })
    }

    public func getFile(
      request: GetFileRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.File {
      try await self._intercept(
        request: request,
        options: options,
        name: "getFile",
        action: {
          (r: GetFileRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.File
          in
          return try await self.inner.getFile(request: r, options: o)
        })
    }

    public func deleteFile(
      request: DeleteFileRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation {
      try await self._intercept(
        request: request,
        options: options,
        name: "deleteFile",
        action: {
          (r: DeleteFileRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleLongRunning.Operation
          in
          return try await self.inner.deleteFile(request: r, options: o)
        })
    }

    public func updateFile(
      request: UpdateFileRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.File {
      try await self._intercept(
        request: request,
        options: options,
        name: "updateFile",
        action: {
          (r: UpdateFileRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.File
          in
          return try await self.inner.updateFile(request: r, options: o)
        })
    }

    public func listTags(
      request: ListTagsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListTagsResponse {
      try await self._intercept(
        request: request,
        options: options,
        name: "listTags",
        action: {
          (r: ListTagsRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.ListTagsResponse
          in
          return try await self.inner.listTags(request: r, options: o)
        })
    }

    public func getTag(
      request: GetTagRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Tag {
      try await self._intercept(
        request: request,
        options: options,
        name: "getTag",
        action: {
          (r: GetTagRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.Tag
          in
          return try await self.inner.getTag(request: r, options: o)
        })
    }

    public func createTag(
      request: CreateTagRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Tag {
      try await self._intercept(
        request: request,
        options: options,
        name: "createTag",
        action: {
          (r: CreateTagRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.Tag
          in
          return try await self.inner.createTag(request: r, options: o)
        })
    }

    public func updateTag(
      request: UpdateTagRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Tag {
      try await self._intercept(
        request: request,
        options: options,
        name: "updateTag",
        action: {
          (r: UpdateTagRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.Tag
          in
          return try await self.inner.updateTag(request: r, options: o)
        })
    }

    public func deleteTag(
      request: DeleteTagRequest, options: GoogleCloudGax.RequestOptions
    ) async throws {
      try await self._intercept(
        request: request,
        options: options,
        name: "deleteTag",
        action: { (r: DeleteTagRequest, o: GoogleCloudGax.RequestOptions) async throws -> Void in
          return try await self.inner.deleteTag(request: r, options: o)
        })
    }

    public func createRule(
      request: CreateRuleRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Rule {
      try await self._intercept(
        request: request,
        options: options,
        name: "createRule",
        action: {
          (r: CreateRuleRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.Rule
          in
          return try await self.inner.createRule(request: r, options: o)
        })
    }

    public func listRules(
      request: ListRulesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListRulesResponse {
      try await self._intercept(
        request: request,
        options: options,
        name: "listRules",
        action: {
          (r: ListRulesRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.ListRulesResponse
          in
          return try await self.inner.listRules(request: r, options: o)
        })
    }

    public func getRule(
      request: GetRuleRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Rule {
      try await self._intercept(
        request: request,
        options: options,
        name: "getRule",
        action: {
          (r: GetRuleRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.Rule
          in
          return try await self.inner.getRule(request: r, options: o)
        })
    }

    public func updateRule(
      request: UpdateRuleRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Rule {
      try await self._intercept(
        request: request,
        options: options,
        name: "updateRule",
        action: {
          (r: UpdateRuleRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.Rule
          in
          return try await self.inner.updateRule(request: r, options: o)
        })
    }

    public func deleteRule(
      request: DeleteRuleRequest, options: GoogleCloudGax.RequestOptions
    ) async throws {
      try await self._intercept(
        request: request,
        options: options,
        name: "deleteRule",
        action: { (r: DeleteRuleRequest, o: GoogleCloudGax.RequestOptions) async throws -> Void in
          return try await self.inner.deleteRule(request: r, options: o)
        })
    }

    public func setIamPolicy(
      request: GoogleIAMV1.SetIamPolicyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleIAMV1.Policy {
      try await self._intercept(
        request: request,
        options: options,
        name: "setIamPolicy",
        action: {
          (r: GoogleIAMV1.SetIamPolicyRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleIAMV1.Policy
          in
          return try await self.inner.setIamPolicy(request: r, options: o)
        })
    }

    public func getIamPolicy(
      request: GoogleIAMV1.GetIamPolicyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleIAMV1.Policy {
      try await self._intercept(
        request: request,
        options: options,
        name: "getIamPolicy",
        action: {
          (r: GoogleIAMV1.GetIamPolicyRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleIAMV1.Policy
          in
          return try await self.inner.getIamPolicy(request: r, options: o)
        })
    }

    public func testIamPermissions(
      request: GoogleIAMV1.TestIamPermissionsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleIAMV1.TestIamPermissionsResponse {
      try await self._intercept(
        request: request,
        options: options,
        name: "testIamPermissions",
        action: {
          (r: GoogleIAMV1.TestIamPermissionsRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleIAMV1.TestIamPermissionsResponse
          in
          return try await self.inner.testIamPermissions(request: r, options: o)
        })
    }

    public func getProjectSettings(
      request: GetProjectSettingsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ProjectSettings {
      try await self._intercept(
        request: request,
        options: options,
        name: "getProjectSettings",
        action: {
          (r: GetProjectSettingsRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.ProjectSettings
          in
          return try await self.inner.getProjectSettings(request: r, options: o)
        })
    }

    public func updateProjectSettings(
      request: UpdateProjectSettingsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ProjectSettings {
      try await self._intercept(
        request: request,
        options: options,
        name: "updateProjectSettings",
        action: {
          (r: UpdateProjectSettingsRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.ProjectSettings
          in
          return try await self.inner.updateProjectSettings(request: r, options: o)
        })
    }

    public func getVpcscconfig(
      request: GetVPCSCConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.VPCSCConfig {
      try await self._intercept(
        request: request,
        options: options,
        name: "getVpcscconfig",
        action: {
          (r: GetVPCSCConfigRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.VPCSCConfig
          in
          return try await self.inner.getVpcscconfig(request: r, options: o)
        })
    }

    public func updateVpcscconfig(
      request: UpdateVPCSCConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.VPCSCConfig {
      try await self._intercept(
        request: request,
        options: options,
        name: "updateVpcscconfig",
        action: {
          (r: UpdateVPCSCConfigRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.VPCSCConfig
          in
          return try await self.inner.updateVpcscconfig(request: r, options: o)
        })
    }

    public func updatePackage(
      request: UpdatePackageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Package {
      try await self._intercept(
        request: request,
        options: options,
        name: "updatePackage",
        action: {
          (r: UpdatePackageRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.Package
          in
          return try await self.inner.updatePackage(request: r, options: o)
        })
    }

    public func listAttachments(
      request: ListAttachmentsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.ListAttachmentsResponse {
      try await self._intercept(
        request: request,
        options: options,
        name: "listAttachments",
        action: {
          (r: ListAttachmentsRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.ListAttachmentsResponse
          in
          return try await self.inner.listAttachments(request: r, options: o)
        })
    }

    public func getAttachment(
      request: GetAttachmentRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudArtifactRegistryV1.Attachment {
      try await self._intercept(
        request: request,
        options: options,
        name: "getAttachment",
        action: {
          (r: GetAttachmentRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudArtifactRegistryV1.Attachment
          in
          return try await self.inner.getAttachment(request: r, options: o)
        })
    }

    public func createAttachment(
      request: CreateAttachmentRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation {
      try await self._intercept(
        request: request,
        options: options,
        name: "createAttachment",
        action: {
          (r: CreateAttachmentRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleLongRunning.Operation
          in
          return try await self.inner.createAttachment(request: r, options: o)
        })
    }

    public func deleteAttachment(
      request: DeleteAttachmentRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation {
      try await self._intercept(
        request: request,
        options: options,
        name: "deleteAttachment",
        action: {
          (r: DeleteAttachmentRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleLongRunning.Operation
          in
          return try await self.inner.deleteAttachment(request: r, options: o)
        })
    }

    public func exportArtifact(
      request: ExportArtifactRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation {
      try await self._intercept(
        request: request,
        options: options,
        name: "exportArtifact",
        action: {
          (r: ExportArtifactRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleLongRunning.Operation
          in
          return try await self.inner.exportArtifact(request: r, options: o)
        })
    }

    public func listLocations(
      request: GoogleCloudLocation.ListLocationsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudLocation.ListLocationsResponse {
      try await self._intercept(
        request: request,
        options: options,
        name: "listLocations",
        action: {
          (r: GoogleCloudLocation.ListLocationsRequest, o: GoogleCloudGax.RequestOptions)
            async throws -> GoogleCloudLocation.ListLocationsResponse
          in
          return try await self.inner.listLocations(request: r, options: o)
        })
    }

    public func getLocation(
      request: GoogleCloudLocation.GetLocationRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudLocation.Location {
      try await self._intercept(
        request: request,
        options: options,
        name: "getLocation",
        action: {
          (r: GoogleCloudLocation.GetLocationRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleCloudLocation.Location
          in
          return try await self.inner.getLocation(request: r, options: o)
        })
    }

    public func getOperation(
      request: GoogleLongRunning.GetOperationRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation {
      try await self._intercept(
        request: request,
        options: options,
        name: "getOperation",
        action: {
          (r: GoogleLongRunning.GetOperationRequest, o: GoogleCloudGax.RequestOptions) async throws
            -> GoogleLongRunning.Operation
          in
          return try await self.inner.getOperation(request: r, options: o)
        })
    }
  }
}
