// 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 GoogleLongRunning
import GoogleRpc
import GoogleCloudGax

/// API Overview
///
/// Certificates Manager API allows customers to see and manage all their TLS
/// certificates.
///
/// Certificates Manager API service provides methods to manage certificates,
/// group them into collections, and create serving configuration that can be
/// easily applied to other Cloud resources e.g. Target Proxies.
///
/// Data Model
///
/// The Certificates Manager service exposes the following resources:
///
/// * `Certificate` that describes a single TLS certificate.
/// * `CertificateMap` that describes a collection of certificates that can be
/// attached to a target resource.
/// * `CertificateMapEntry` that describes a single configuration entry that
/// consists of a SNI and a group of certificates. It's a subresource of
/// CertificateMap.
///
/// Certificate, CertificateMap and CertificateMapEntry IDs
/// have to fully match the regexp `[a-z0-9-]{1,63}`. In other words,
/// - only lower case letters, digits, and hyphen are allowed
/// - length of the resource ID has to be in [1,63] range.
///
/// Provides methods to manage Cloud Certificate Manager entities.
///
/// @Snippet(path: "CertificateManagerQuickstart")
public class CertificateManagerClient: Clients.CertificateManagerProtocol {
  let inner: any Clients.CertificateManagerStub
  let pollingErrorPolicy: GoogleCloudGax.PollingErrorPolicy
  let pollingBackoffPolicy: GoogleCloudGax.BackoffPolicy

  /// Creates a new `CertificateManagerClient` instance.
  public init(_ options: GoogleCloudGax.ClientOptions = .init()) throws {
    var inner: any Clients.CertificateManagerStub = try Clients.CertificateManagerTransport(options)
    inner = Clients.CertificateManagerRetry(inner, options: options)
    if let logger = options.logger {
      inner = Clients.CertificateManagerLogging(inner, logger: logger)
    }
    self.inner = inner
    self.pollingErrorPolicy = options.pollingErrorPolicy
    self.pollingBackoffPolicy = options.pollingBackoffPolicy
  }

  /// Lists Certificates in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_ListCertificates")
  public func listCertificates(
    request: ListCertificatesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.ListCertificatesResponse {
    try await self.inner.listCertificates(request: request, options: options)
  }

  /// Lists Certificates in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_ListCertificates")
  public func listCertificates(
    byItem: ListCertificatesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Certificate, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudCertificateManagerV1.ListCertificatesResponse
      in
      var request = byItem
      request.pageToken = token
      return try await self.listCertificates(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets details of a single Certificate.
  ///
  /// @Snippet(path: "CertificateManager_GetCertificate")
  public func getCertificate(
    request: GetCertificateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.Certificate {
    try await self.inner.getCertificate(request: request, options: options)
  }

  /// Creates a new Certificate in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_CreateCertificate")
  public func createCertificate(
    request: CreateCertificateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createCertificate(request: request, options: options)
  }

  /// Creates a new Certificate in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_CreateCertificate")
  public func createCertificate(
    withPolling: CreateCertificateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Certificate> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<Certificate>.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 Certificate(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.createCertificate(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Certificate>.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 Certificate.
  ///
  /// @Snippet(path: "CertificateManager_UpdateCertificate")
  public func updateCertificate(
    request: UpdateCertificateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateCertificate(request: request, options: options)
  }

  /// Updates a Certificate.
  ///
  /// @Snippet(path: "CertificateManager_UpdateCertificate")
  public func updateCertificate(
    withPolling: UpdateCertificateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Certificate> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<Certificate>.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 Certificate(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.updateCertificate(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Certificate>.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 a single Certificate.
  ///
  /// @Snippet(path: "CertificateManager_DeleteCertificate")
  public func deleteCertificate(
    request: DeleteCertificateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteCertificate(request: request, options: options)
  }

  /// Deletes a single Certificate.
  ///
  /// @Snippet(path: "CertificateManager_DeleteCertificate")
  public func deleteCertificate(
    withPolling: DeleteCertificateRequest, 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.deleteCertificate(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 CertificateMaps in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_ListCertificateMaps")
  public func listCertificateMaps(
    request: ListCertificateMapsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.ListCertificateMapsResponse {
    try await self.inner.listCertificateMaps(request: request, options: options)
  }

  /// Lists CertificateMaps in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_ListCertificateMaps")
  public func listCertificateMaps(
    byItem: ListCertificateMapsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<CertificateMap, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudCertificateManagerV1.ListCertificateMapsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listCertificateMaps(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets details of a single CertificateMap.
  ///
  /// @Snippet(path: "CertificateManager_GetCertificateMap")
  public func getCertificateMap(
    request: GetCertificateMapRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.CertificateMap {
    try await self.inner.getCertificateMap(request: request, options: options)
  }

  /// Creates a new CertificateMap in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_CreateCertificateMap")
  public func createCertificateMap(
    request: CreateCertificateMapRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createCertificateMap(request: request, options: options)
  }

  /// Creates a new CertificateMap in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_CreateCertificateMap")
  public func createCertificateMap(
    withPolling: CreateCertificateMapRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMap> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateMap>.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 CertificateMap(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.createCertificateMap(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateMap>.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 CertificateMap.
  ///
  /// @Snippet(path: "CertificateManager_UpdateCertificateMap")
  public func updateCertificateMap(
    request: UpdateCertificateMapRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateCertificateMap(request: request, options: options)
  }

  /// Updates a CertificateMap.
  ///
  /// @Snippet(path: "CertificateManager_UpdateCertificateMap")
  public func updateCertificateMap(
    withPolling: UpdateCertificateMapRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMap> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateMap>.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 CertificateMap(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.updateCertificateMap(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateMap>.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 a single CertificateMap. A Certificate Map can't be deleted
  /// if it contains Certificate Map Entries. Remove all the entries from
  /// the map before calling this method.
  ///
  /// @Snippet(path: "CertificateManager_DeleteCertificateMap")
  public func deleteCertificateMap(
    request: DeleteCertificateMapRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteCertificateMap(request: request, options: options)
  }

  /// Deletes a single CertificateMap. A Certificate Map can't be deleted
  /// if it contains Certificate Map Entries. Remove all the entries from
  /// the map before calling this method.
  ///
  /// @Snippet(path: "CertificateManager_DeleteCertificateMap")
  public func deleteCertificateMap(
    withPolling: DeleteCertificateMapRequest, 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.deleteCertificateMap(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 CertificateMapEntries in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_ListCertificateMapEntries")
  public func listCertificateMapEntries(
    request: ListCertificateMapEntriesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.ListCertificateMapEntriesResponse {
    try await self.inner.listCertificateMapEntries(request: request, options: options)
  }

  /// Lists CertificateMapEntries in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_ListCertificateMapEntries")
  public func listCertificateMapEntries(
    byItem: ListCertificateMapEntriesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<CertificateMapEntry, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudCertificateManagerV1.ListCertificateMapEntriesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listCertificateMapEntries(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets details of a single CertificateMapEntry.
  ///
  /// @Snippet(path: "CertificateManager_GetCertificateMapEntry")
  public func getCertificateMapEntry(
    request: GetCertificateMapEntryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.CertificateMapEntry {
    try await self.inner.getCertificateMapEntry(request: request, options: options)
  }

  /// Creates a new CertificateMapEntry in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_CreateCertificateMapEntry")
  public func createCertificateMapEntry(
    request: CreateCertificateMapEntryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createCertificateMapEntry(request: request, options: options)
  }

  /// Creates a new CertificateMapEntry in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_CreateCertificateMapEntry")
  public func createCertificateMapEntry(
    withPolling: CreateCertificateMapEntryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMapEntry> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateMapEntry>.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 CertificateMapEntry(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.createCertificateMapEntry(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateMapEntry>.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 CertificateMapEntry.
  ///
  /// @Snippet(path: "CertificateManager_UpdateCertificateMapEntry")
  public func updateCertificateMapEntry(
    request: UpdateCertificateMapEntryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateCertificateMapEntry(request: request, options: options)
  }

  /// Updates a CertificateMapEntry.
  ///
  /// @Snippet(path: "CertificateManager_UpdateCertificateMapEntry")
  public func updateCertificateMapEntry(
    withPolling: UpdateCertificateMapEntryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMapEntry> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateMapEntry>.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 CertificateMapEntry(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.updateCertificateMapEntry(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateMapEntry>.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 a single CertificateMapEntry.
  ///
  /// @Snippet(path: "CertificateManager_DeleteCertificateMapEntry")
  public func deleteCertificateMapEntry(
    request: DeleteCertificateMapEntryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteCertificateMapEntry(request: request, options: options)
  }

  /// Deletes a single CertificateMapEntry.
  ///
  /// @Snippet(path: "CertificateManager_DeleteCertificateMapEntry")
  public func deleteCertificateMapEntry(
    withPolling: DeleteCertificateMapEntryRequest, 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.deleteCertificateMapEntry(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 DnsAuthorizations in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_ListDnsAuthorizations")
  public func listDnsAuthorizations(
    request: ListDnsAuthorizationsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.ListDnsAuthorizationsResponse {
    try await self.inner.listDnsAuthorizations(request: request, options: options)
  }

  /// Lists DnsAuthorizations in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_ListDnsAuthorizations")
  public func listDnsAuthorizations(
    byItem: ListDnsAuthorizationsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<DnsAuthorization, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudCertificateManagerV1.ListDnsAuthorizationsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listDnsAuthorizations(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets details of a single DnsAuthorization.
  ///
  /// @Snippet(path: "CertificateManager_GetDnsAuthorization")
  public func getDnsAuthorization(
    request: GetDnsAuthorizationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.DnsAuthorization {
    try await self.inner.getDnsAuthorization(request: request, options: options)
  }

  /// Creates a new DnsAuthorization in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_CreateDnsAuthorization")
  public func createDnsAuthorization(
    request: CreateDnsAuthorizationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createDnsAuthorization(request: request, options: options)
  }

  /// Creates a new DnsAuthorization in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_CreateDnsAuthorization")
  public func createDnsAuthorization(
    withPolling: CreateDnsAuthorizationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<DnsAuthorization> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<DnsAuthorization>.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 DnsAuthorization(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.createDnsAuthorization(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<DnsAuthorization>.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 DnsAuthorization.
  ///
  /// @Snippet(path: "CertificateManager_UpdateDnsAuthorization")
  public func updateDnsAuthorization(
    request: UpdateDnsAuthorizationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateDnsAuthorization(request: request, options: options)
  }

  /// Updates a DnsAuthorization.
  ///
  /// @Snippet(path: "CertificateManager_UpdateDnsAuthorization")
  public func updateDnsAuthorization(
    withPolling: UpdateDnsAuthorizationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<DnsAuthorization> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<DnsAuthorization>.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 DnsAuthorization(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.updateDnsAuthorization(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<DnsAuthorization>.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 a single DnsAuthorization.
  ///
  /// @Snippet(path: "CertificateManager_DeleteDnsAuthorization")
  public func deleteDnsAuthorization(
    request: DeleteDnsAuthorizationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteDnsAuthorization(request: request, options: options)
  }

  /// Deletes a single DnsAuthorization.
  ///
  /// @Snippet(path: "CertificateManager_DeleteDnsAuthorization")
  public func deleteDnsAuthorization(
    withPolling: DeleteDnsAuthorizationRequest, 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.deleteDnsAuthorization(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 CertificateIssuanceConfigs in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_ListCertificateIssuanceConfigs")
  public func listCertificateIssuanceConfigs(
    request: ListCertificateIssuanceConfigsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.ListCertificateIssuanceConfigsResponse {
    try await self.inner.listCertificateIssuanceConfigs(request: request, options: options)
  }

  /// Lists CertificateIssuanceConfigs in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_ListCertificateIssuanceConfigs")
  public func listCertificateIssuanceConfigs(
    byItem: ListCertificateIssuanceConfigsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<CertificateIssuanceConfig, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudCertificateManagerV1.ListCertificateIssuanceConfigsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listCertificateIssuanceConfigs(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets details of a single CertificateIssuanceConfig.
  ///
  /// @Snippet(path: "CertificateManager_GetCertificateIssuanceConfig")
  public func getCertificateIssuanceConfig(
    request: GetCertificateIssuanceConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.CertificateIssuanceConfig {
    try await self.inner.getCertificateIssuanceConfig(request: request, options: options)
  }

  /// Creates a new CertificateIssuanceConfig in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_CreateCertificateIssuanceConfig")
  public func createCertificateIssuanceConfig(
    request: CreateCertificateIssuanceConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createCertificateIssuanceConfig(request: request, options: options)
  }

  /// Creates a new CertificateIssuanceConfig in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_CreateCertificateIssuanceConfig")
  public func createCertificateIssuanceConfig(
    withPolling: CreateCertificateIssuanceConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateIssuanceConfig> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateIssuanceConfig>.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 CertificateIssuanceConfig(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.createCertificateIssuanceConfig(
      request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateIssuanceConfig>.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 a single CertificateIssuanceConfig.
  ///
  /// @Snippet(path: "CertificateManager_DeleteCertificateIssuanceConfig")
  public func deleteCertificateIssuanceConfig(
    request: DeleteCertificateIssuanceConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteCertificateIssuanceConfig(request: request, options: options)
  }

  /// Deletes a single CertificateIssuanceConfig.
  ///
  /// @Snippet(path: "CertificateManager_DeleteCertificateIssuanceConfig")
  public func deleteCertificateIssuanceConfig(
    withPolling: DeleteCertificateIssuanceConfigRequest, 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.deleteCertificateIssuanceConfig(
      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 TrustConfigs in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_ListTrustConfigs")
  public func listTrustConfigs(
    request: ListTrustConfigsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.ListTrustConfigsResponse {
    try await self.inner.listTrustConfigs(request: request, options: options)
  }

  /// Lists TrustConfigs in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_ListTrustConfigs")
  public func listTrustConfigs(
    byItem: ListTrustConfigsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<TrustConfig, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudCertificateManagerV1.ListTrustConfigsResponse
      in
      var request = byItem
      request.pageToken = token
      return try await self.listTrustConfigs(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets details of a single TrustConfig.
  ///
  /// @Snippet(path: "CertificateManager_GetTrustConfig")
  public func getTrustConfig(
    request: GetTrustConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.TrustConfig {
    try await self.inner.getTrustConfig(request: request, options: options)
  }

  /// Creates a new TrustConfig in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_CreateTrustConfig")
  public func createTrustConfig(
    request: CreateTrustConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createTrustConfig(request: request, options: options)
  }

  /// Creates a new TrustConfig in a given project and location.
  ///
  /// @Snippet(path: "CertificateManager_CreateTrustConfig")
  public func createTrustConfig(
    withPolling: CreateTrustConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<TrustConfig> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<TrustConfig>.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 TrustConfig(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.createTrustConfig(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<TrustConfig>.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 TrustConfig.
  ///
  /// @Snippet(path: "CertificateManager_UpdateTrustConfig")
  public func updateTrustConfig(
    request: UpdateTrustConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateTrustConfig(request: request, options: options)
  }

  /// Updates a TrustConfig.
  ///
  /// @Snippet(path: "CertificateManager_UpdateTrustConfig")
  public func updateTrustConfig(
    withPolling: UpdateTrustConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<TrustConfig> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<TrustConfig>.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 TrustConfig(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.updateTrustConfig(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<TrustConfig>.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 a single TrustConfig.
  ///
  /// @Snippet(path: "CertificateManager_DeleteTrustConfig")
  public func deleteTrustConfig(
    request: DeleteTrustConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteTrustConfig(request: request, options: options)
  }

  /// Deletes a single TrustConfig.
  ///
  /// @Snippet(path: "CertificateManager_DeleteTrustConfig")
  public func deleteTrustConfig(
    withPolling: DeleteTrustConfigRequest, 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.deleteTrustConfig(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 information about the supported locations for this service.
  ///
  /// @Snippet(path: "CertificateManager_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.
  ///
  /// @Snippet(path: "CertificateManager_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: "CertificateManager_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: "CertificateManager_ListOperations")
  public func listOperations(
    request: GoogleLongRunning.ListOperationsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.ListOperationsResponse {
    try await self.inner.listOperations(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: "CertificateManager_ListOperations")
  public func listOperations(
    byItem: GoogleLongRunning.ListOperationsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<GoogleLongRunning.Operation, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleLongRunning.ListOperationsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listOperations(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// 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: "CertificateManager_GetOperation")
  func getOperation(
    request: GoogleLongRunning.GetOperationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.getOperation(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: "CertificateManager_DeleteOperation")
  public func deleteOperation(
    request: GoogleLongRunning.DeleteOperationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.deleteOperation(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: "CertificateManager_CancelOperation")
  public func cancelOperation(
    request: GoogleLongRunning.CancelOperationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.cancelOperation(request: request, options: options)
  }
}

extension Clients {
  /// A Swift protocol to mock `CertificateManagerClient`.
  ///
  /// To mock `CertificateManagerClient` change your functions to receive
  /// `some CertificateManagerProtocol` or `any CertificateManagerProtocol`
  /// and pass a mock implementation in your tests.
  public protocol CertificateManagerProtocol {
    /// See `CertificateManagerClient.listCertificates`.
    func listCertificates(request: ListCertificatesRequest) async throws
      -> GoogleCloudCertificateManagerV1.ListCertificatesResponse

    /// See `CertificateManagerClient.listCertificates`.
    func listCertificates(
      byItem: ListCertificatesRequest
    ) throws -> any AsyncSequence<Certificate, Swift.Error>

    /// See `CertificateManagerClient.listCertificates`.
    func listCertificates(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Certificate, Swift.Error>

    /// See `CertificateManagerClient.getCertificate`.
    func getCertificate(request: GetCertificateRequest) async throws
      -> GoogleCloudCertificateManagerV1.Certificate

    /// See `CertificateManagerClient.getCertificate`.
    func getCertificate(
      name: Swift.String,
    ) async throws -> GoogleCloudCertificateManagerV1.Certificate

    /// See `CertificateManagerClient.createCertificate`.
    func createCertificate(request: CreateCertificateRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.createCertificate`.
    func createCertificate(withPolling: CreateCertificateRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Certificate>

    /// See `CertificateManagerClient.createCertificate`.
    func createCertificate(
      parent: Swift.String,
      certificate: Certificate?,
      certificateId: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<Certificate>

    /// See `CertificateManagerClient.updateCertificate`.
    func updateCertificate(request: UpdateCertificateRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.updateCertificate`.
    func updateCertificate(withPolling: UpdateCertificateRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Certificate>

    /// See `CertificateManagerClient.updateCertificate`.
    func updateCertificate(
      certificate: Certificate?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> any GoogleCloudGax.PollableOperation<Certificate>

    /// See `CertificateManagerClient.deleteCertificate`.
    func deleteCertificate(request: DeleteCertificateRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.deleteCertificate`.
    func deleteCertificate(withPolling: DeleteCertificateRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

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

    /// See `CertificateManagerClient.listCertificateMaps`.
    func listCertificateMaps(request: ListCertificateMapsRequest) async throws
      -> GoogleCloudCertificateManagerV1.ListCertificateMapsResponse

    /// See `CertificateManagerClient.listCertificateMaps`.
    func listCertificateMaps(
      byItem: ListCertificateMapsRequest
    ) throws -> any AsyncSequence<CertificateMap, Swift.Error>

    /// See `CertificateManagerClient.listCertificateMaps`.
    func listCertificateMaps(
      parent: Swift.String,
    ) throws -> any AsyncSequence<CertificateMap, Swift.Error>

    /// See `CertificateManagerClient.getCertificateMap`.
    func getCertificateMap(request: GetCertificateMapRequest) async throws
      -> GoogleCloudCertificateManagerV1.CertificateMap

    /// See `CertificateManagerClient.getCertificateMap`.
    func getCertificateMap(
      name: Swift.String,
    ) async throws -> GoogleCloudCertificateManagerV1.CertificateMap

    /// See `CertificateManagerClient.createCertificateMap`.
    func createCertificateMap(request: CreateCertificateMapRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.createCertificateMap`.
    func createCertificateMap(withPolling: CreateCertificateMapRequest) async throws
      -> any GoogleCloudGax.PollableOperation<CertificateMap>

    /// See `CertificateManagerClient.createCertificateMap`.
    func createCertificateMap(
      parent: Swift.String,
      certificateMap: CertificateMap?,
      certificateMapId: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMap>

    /// See `CertificateManagerClient.updateCertificateMap`.
    func updateCertificateMap(request: UpdateCertificateMapRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.updateCertificateMap`.
    func updateCertificateMap(withPolling: UpdateCertificateMapRequest) async throws
      -> any GoogleCloudGax.PollableOperation<CertificateMap>

    /// See `CertificateManagerClient.updateCertificateMap`.
    func updateCertificateMap(
      certificateMap: CertificateMap?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMap>

    /// See `CertificateManagerClient.deleteCertificateMap`.
    func deleteCertificateMap(request: DeleteCertificateMapRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.deleteCertificateMap`.
    func deleteCertificateMap(withPolling: DeleteCertificateMapRequest) async throws
      -> any GoogleCloudGax.PollableOperation<Void>

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

    /// See `CertificateManagerClient.listCertificateMapEntries`.
    func listCertificateMapEntries(request: ListCertificateMapEntriesRequest) async throws
      -> GoogleCloudCertificateManagerV1.ListCertificateMapEntriesResponse

    /// See `CertificateManagerClient.listCertificateMapEntries`.
    func listCertificateMapEntries(
      byItem: ListCertificateMapEntriesRequest
    ) throws -> any AsyncSequence<CertificateMapEntry, Swift.Error>

    /// See `CertificateManagerClient.listCertificateMapEntries`.
    func listCertificateMapEntries(
      parent: Swift.String,
    ) throws -> any AsyncSequence<CertificateMapEntry, Swift.Error>

    /// See `CertificateManagerClient.getCertificateMapEntry`.
    func getCertificateMapEntry(request: GetCertificateMapEntryRequest) async throws
      -> GoogleCloudCertificateManagerV1.CertificateMapEntry

    /// See `CertificateManagerClient.getCertificateMapEntry`.
    func getCertificateMapEntry(
      name: Swift.String,
    ) async throws -> GoogleCloudCertificateManagerV1.CertificateMapEntry

    /// See `CertificateManagerClient.createCertificateMapEntry`.
    func createCertificateMapEntry(request: CreateCertificateMapEntryRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.createCertificateMapEntry`.
    func createCertificateMapEntry(withPolling: CreateCertificateMapEntryRequest) async throws
      -> any GoogleCloudGax.PollableOperation<CertificateMapEntry>

    /// See `CertificateManagerClient.createCertificateMapEntry`.
    func createCertificateMapEntry(
      parent: Swift.String,
      certificateMapEntry: CertificateMapEntry?,
      certificateMapEntryId: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMapEntry>

    /// See `CertificateManagerClient.updateCertificateMapEntry`.
    func updateCertificateMapEntry(request: UpdateCertificateMapEntryRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.updateCertificateMapEntry`.
    func updateCertificateMapEntry(withPolling: UpdateCertificateMapEntryRequest) async throws
      -> any GoogleCloudGax.PollableOperation<CertificateMapEntry>

    /// See `CertificateManagerClient.updateCertificateMapEntry`.
    func updateCertificateMapEntry(
      certificateMapEntry: CertificateMapEntry?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMapEntry>

    /// See `CertificateManagerClient.deleteCertificateMapEntry`.
    func deleteCertificateMapEntry(request: DeleteCertificateMapEntryRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.deleteCertificateMapEntry`.
    func deleteCertificateMapEntry(withPolling: DeleteCertificateMapEntryRequest) async throws
      -> any GoogleCloudGax.PollableOperation<Void>

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

    /// See `CertificateManagerClient.listDnsAuthorizations`.
    func listDnsAuthorizations(request: ListDnsAuthorizationsRequest) async throws
      -> GoogleCloudCertificateManagerV1.ListDnsAuthorizationsResponse

    /// See `CertificateManagerClient.listDnsAuthorizations`.
    func listDnsAuthorizations(
      byItem: ListDnsAuthorizationsRequest
    ) throws -> any AsyncSequence<DnsAuthorization, Swift.Error>

    /// See `CertificateManagerClient.listDnsAuthorizations`.
    func listDnsAuthorizations(
      parent: Swift.String,
    ) throws -> any AsyncSequence<DnsAuthorization, Swift.Error>

    /// See `CertificateManagerClient.getDnsAuthorization`.
    func getDnsAuthorization(request: GetDnsAuthorizationRequest) async throws
      -> GoogleCloudCertificateManagerV1.DnsAuthorization

    /// See `CertificateManagerClient.getDnsAuthorization`.
    func getDnsAuthorization(
      name: Swift.String,
    ) async throws -> GoogleCloudCertificateManagerV1.DnsAuthorization

    /// See `CertificateManagerClient.createDnsAuthorization`.
    func createDnsAuthorization(request: CreateDnsAuthorizationRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.createDnsAuthorization`.
    func createDnsAuthorization(withPolling: CreateDnsAuthorizationRequest) async throws
      -> any GoogleCloudGax.PollableOperation<DnsAuthorization>

    /// See `CertificateManagerClient.createDnsAuthorization`.
    func createDnsAuthorization(
      parent: Swift.String,
      dnsAuthorization: DnsAuthorization?,
      dnsAuthorizationId: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<DnsAuthorization>

    /// See `CertificateManagerClient.updateDnsAuthorization`.
    func updateDnsAuthorization(request: UpdateDnsAuthorizationRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.updateDnsAuthorization`.
    func updateDnsAuthorization(withPolling: UpdateDnsAuthorizationRequest) async throws
      -> any GoogleCloudGax.PollableOperation<DnsAuthorization>

    /// See `CertificateManagerClient.updateDnsAuthorization`.
    func updateDnsAuthorization(
      dnsAuthorization: DnsAuthorization?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> any GoogleCloudGax.PollableOperation<DnsAuthorization>

    /// See `CertificateManagerClient.deleteDnsAuthorization`.
    func deleteDnsAuthorization(request: DeleteDnsAuthorizationRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.deleteDnsAuthorization`.
    func deleteDnsAuthorization(withPolling: DeleteDnsAuthorizationRequest) async throws
      -> any GoogleCloudGax.PollableOperation<Void>

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

    /// See `CertificateManagerClient.listCertificateIssuanceConfigs`.
    func listCertificateIssuanceConfigs(request: ListCertificateIssuanceConfigsRequest) async throws
      -> GoogleCloudCertificateManagerV1.ListCertificateIssuanceConfigsResponse

    /// See `CertificateManagerClient.listCertificateIssuanceConfigs`.
    func listCertificateIssuanceConfigs(
      byItem: ListCertificateIssuanceConfigsRequest
    ) throws -> any AsyncSequence<CertificateIssuanceConfig, Swift.Error>

    /// See `CertificateManagerClient.listCertificateIssuanceConfigs`.
    func listCertificateIssuanceConfigs(
      parent: Swift.String,
    ) throws -> any AsyncSequence<CertificateIssuanceConfig, Swift.Error>

    /// See `CertificateManagerClient.getCertificateIssuanceConfig`.
    func getCertificateIssuanceConfig(request: GetCertificateIssuanceConfigRequest) async throws
      -> GoogleCloudCertificateManagerV1.CertificateIssuanceConfig

    /// See `CertificateManagerClient.getCertificateIssuanceConfig`.
    func getCertificateIssuanceConfig(
      name: Swift.String,
    ) async throws -> GoogleCloudCertificateManagerV1.CertificateIssuanceConfig

    /// See `CertificateManagerClient.createCertificateIssuanceConfig`.
    func createCertificateIssuanceConfig(request: CreateCertificateIssuanceConfigRequest)
      async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.createCertificateIssuanceConfig`.
    func createCertificateIssuanceConfig(withPolling: CreateCertificateIssuanceConfigRequest)
      async throws -> any GoogleCloudGax.PollableOperation<CertificateIssuanceConfig>

    /// See `CertificateManagerClient.createCertificateIssuanceConfig`.
    func createCertificateIssuanceConfig(
      parent: Swift.String,
      certificateIssuanceConfig: CertificateIssuanceConfig?,
      certificateIssuanceConfigId: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateIssuanceConfig>

    /// See `CertificateManagerClient.deleteCertificateIssuanceConfig`.
    func deleteCertificateIssuanceConfig(request: DeleteCertificateIssuanceConfigRequest)
      async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.deleteCertificateIssuanceConfig`.
    func deleteCertificateIssuanceConfig(withPolling: DeleteCertificateIssuanceConfigRequest)
      async throws -> any GoogleCloudGax.PollableOperation<Void>

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

    /// See `CertificateManagerClient.listTrustConfigs`.
    func listTrustConfigs(request: ListTrustConfigsRequest) async throws
      -> GoogleCloudCertificateManagerV1.ListTrustConfigsResponse

    /// See `CertificateManagerClient.listTrustConfigs`.
    func listTrustConfigs(
      byItem: ListTrustConfigsRequest
    ) throws -> any AsyncSequence<TrustConfig, Swift.Error>

    /// See `CertificateManagerClient.listTrustConfigs`.
    func listTrustConfigs(
      parent: Swift.String,
    ) throws -> any AsyncSequence<TrustConfig, Swift.Error>

    /// See `CertificateManagerClient.getTrustConfig`.
    func getTrustConfig(request: GetTrustConfigRequest) async throws
      -> GoogleCloudCertificateManagerV1.TrustConfig

    /// See `CertificateManagerClient.getTrustConfig`.
    func getTrustConfig(
      name: Swift.String,
    ) async throws -> GoogleCloudCertificateManagerV1.TrustConfig

    /// See `CertificateManagerClient.createTrustConfig`.
    func createTrustConfig(request: CreateTrustConfigRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.createTrustConfig`.
    func createTrustConfig(withPolling: CreateTrustConfigRequest) async throws -> any GoogleCloudGax
      .PollableOperation<TrustConfig>

    /// See `CertificateManagerClient.createTrustConfig`.
    func createTrustConfig(
      parent: Swift.String,
      trustConfig: TrustConfig?,
      trustConfigId: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<TrustConfig>

    /// See `CertificateManagerClient.updateTrustConfig`.
    func updateTrustConfig(request: UpdateTrustConfigRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.updateTrustConfig`.
    func updateTrustConfig(withPolling: UpdateTrustConfigRequest) async throws -> any GoogleCloudGax
      .PollableOperation<TrustConfig>

    /// See `CertificateManagerClient.updateTrustConfig`.
    func updateTrustConfig(
      trustConfig: TrustConfig?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> any GoogleCloudGax.PollableOperation<TrustConfig>

    /// See `CertificateManagerClient.deleteTrustConfig`.
    func deleteTrustConfig(request: DeleteTrustConfigRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.deleteTrustConfig`.
    func deleteTrustConfig(withPolling: DeleteTrustConfigRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

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

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

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

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

    /// See `CertificateManagerClient.listOperations`.
    func listOperations(request: GoogleLongRunning.ListOperationsRequest) async throws
      -> GoogleLongRunning.ListOperationsResponse

    /// See `CertificateManagerClient.listOperations`.
    func listOperations(
      byItem: GoogleLongRunning.ListOperationsRequest
    ) throws -> any AsyncSequence<GoogleLongRunning.Operation, Swift.Error>

    /// See `CertificateManagerClient.listOperations`.
    func listOperations(
      name: Swift.String,
      filter: Swift.String,
    ) throws -> any AsyncSequence<GoogleLongRunning.Operation, Swift.Error>

    /// See `CertificateManagerClient.deleteOperation`.
    func deleteOperation(request: GoogleLongRunning.DeleteOperationRequest) async throws

    /// See `CertificateManagerClient.deleteOperation`.
    func deleteOperation(
      name: Swift.String,
    ) async throws

    /// See `CertificateManagerClient.cancelOperation`.
    func cancelOperation(request: GoogleLongRunning.CancelOperationRequest) async throws

    /// See `CertificateManagerClient.cancelOperation`.
    func cancelOperation(
      name: Swift.String,
    ) async throws

    /// See `CertificateManagerClient.listCertificates`.
    func listCertificates(
      request: ListCertificatesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudCertificateManagerV1.ListCertificatesResponse

    /// See `CertificateManagerClient.listCertificates`.
    func listCertificates(
      byItem: ListCertificatesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Certificate, Swift.Error>

    /// See `CertificateManagerClient.getCertificate`.
    func getCertificate(
      request: GetCertificateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudCertificateManagerV1.Certificate

    /// See `CertificateManagerClient.createCertificate`.
    func createCertificate(
      request: CreateCertificateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.createCertificate`.
    func createCertificate(
      withPolling: CreateCertificateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Certificate>

    /// See `CertificateManagerClient.updateCertificate`.
    func updateCertificate(
      request: UpdateCertificateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.updateCertificate`.
    func updateCertificate(
      withPolling: UpdateCertificateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Certificate>

    /// See `CertificateManagerClient.deleteCertificate`.
    func deleteCertificate(
      request: DeleteCertificateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.deleteCertificate`.
    func deleteCertificate(
      withPolling: DeleteCertificateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `CertificateManagerClient.listCertificateMaps`.
    func listCertificateMaps(
      request: ListCertificateMapsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudCertificateManagerV1.ListCertificateMapsResponse

    /// See `CertificateManagerClient.listCertificateMaps`.
    func listCertificateMaps(
      byItem: ListCertificateMapsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<CertificateMap, Swift.Error>

    /// See `CertificateManagerClient.getCertificateMap`.
    func getCertificateMap(
      request: GetCertificateMapRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudCertificateManagerV1.CertificateMap

    /// See `CertificateManagerClient.createCertificateMap`.
    func createCertificateMap(
      request: CreateCertificateMapRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.createCertificateMap`.
    func createCertificateMap(
      withPolling: CreateCertificateMapRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMap>

    /// See `CertificateManagerClient.updateCertificateMap`.
    func updateCertificateMap(
      request: UpdateCertificateMapRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.updateCertificateMap`.
    func updateCertificateMap(
      withPolling: UpdateCertificateMapRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMap>

    /// See `CertificateManagerClient.deleteCertificateMap`.
    func deleteCertificateMap(
      request: DeleteCertificateMapRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.deleteCertificateMap`.
    func deleteCertificateMap(
      withPolling: DeleteCertificateMapRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `CertificateManagerClient.listCertificateMapEntries`.
    func listCertificateMapEntries(
      request: ListCertificateMapEntriesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudCertificateManagerV1.ListCertificateMapEntriesResponse

    /// See `CertificateManagerClient.listCertificateMapEntries`.
    func listCertificateMapEntries(
      byItem: ListCertificateMapEntriesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<CertificateMapEntry, Swift.Error>

    /// See `CertificateManagerClient.getCertificateMapEntry`.
    func getCertificateMapEntry(
      request: GetCertificateMapEntryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudCertificateManagerV1.CertificateMapEntry

    /// See `CertificateManagerClient.createCertificateMapEntry`.
    func createCertificateMapEntry(
      request: CreateCertificateMapEntryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.createCertificateMapEntry`.
    func createCertificateMapEntry(
      withPolling: CreateCertificateMapEntryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMapEntry>

    /// See `CertificateManagerClient.updateCertificateMapEntry`.
    func updateCertificateMapEntry(
      request: UpdateCertificateMapEntryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.updateCertificateMapEntry`.
    func updateCertificateMapEntry(
      withPolling: UpdateCertificateMapEntryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMapEntry>

    /// See `CertificateManagerClient.deleteCertificateMapEntry`.
    func deleteCertificateMapEntry(
      request: DeleteCertificateMapEntryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.deleteCertificateMapEntry`.
    func deleteCertificateMapEntry(
      withPolling: DeleteCertificateMapEntryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `CertificateManagerClient.listDnsAuthorizations`.
    func listDnsAuthorizations(
      request: ListDnsAuthorizationsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudCertificateManagerV1.ListDnsAuthorizationsResponse

    /// See `CertificateManagerClient.listDnsAuthorizations`.
    func listDnsAuthorizations(
      byItem: ListDnsAuthorizationsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<DnsAuthorization, Swift.Error>

    /// See `CertificateManagerClient.getDnsAuthorization`.
    func getDnsAuthorization(
      request: GetDnsAuthorizationRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudCertificateManagerV1.DnsAuthorization

    /// See `CertificateManagerClient.createDnsAuthorization`.
    func createDnsAuthorization(
      request: CreateDnsAuthorizationRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.createDnsAuthorization`.
    func createDnsAuthorization(
      withPolling: CreateDnsAuthorizationRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<DnsAuthorization>

    /// See `CertificateManagerClient.updateDnsAuthorization`.
    func updateDnsAuthorization(
      request: UpdateDnsAuthorizationRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.updateDnsAuthorization`.
    func updateDnsAuthorization(
      withPolling: UpdateDnsAuthorizationRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<DnsAuthorization>

    /// See `CertificateManagerClient.deleteDnsAuthorization`.
    func deleteDnsAuthorization(
      request: DeleteDnsAuthorizationRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.deleteDnsAuthorization`.
    func deleteDnsAuthorization(
      withPolling: DeleteDnsAuthorizationRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `CertificateManagerClient.listCertificateIssuanceConfigs`.
    func listCertificateIssuanceConfigs(
      request: ListCertificateIssuanceConfigsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudCertificateManagerV1.ListCertificateIssuanceConfigsResponse

    /// See `CertificateManagerClient.listCertificateIssuanceConfigs`.
    func listCertificateIssuanceConfigs(
      byItem: ListCertificateIssuanceConfigsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<CertificateIssuanceConfig, Swift.Error>

    /// See `CertificateManagerClient.getCertificateIssuanceConfig`.
    func getCertificateIssuanceConfig(
      request: GetCertificateIssuanceConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudCertificateManagerV1.CertificateIssuanceConfig

    /// See `CertificateManagerClient.createCertificateIssuanceConfig`.
    func createCertificateIssuanceConfig(
      request: CreateCertificateIssuanceConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.createCertificateIssuanceConfig`.
    func createCertificateIssuanceConfig(
      withPolling: CreateCertificateIssuanceConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateIssuanceConfig>

    /// See `CertificateManagerClient.deleteCertificateIssuanceConfig`.
    func deleteCertificateIssuanceConfig(
      request: DeleteCertificateIssuanceConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.deleteCertificateIssuanceConfig`.
    func deleteCertificateIssuanceConfig(
      withPolling: DeleteCertificateIssuanceConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `CertificateManagerClient.listTrustConfigs`.
    func listTrustConfigs(
      request: ListTrustConfigsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudCertificateManagerV1.ListTrustConfigsResponse

    /// See `CertificateManagerClient.listTrustConfigs`.
    func listTrustConfigs(
      byItem: ListTrustConfigsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<TrustConfig, Swift.Error>

    /// See `CertificateManagerClient.getTrustConfig`.
    func getTrustConfig(
      request: GetTrustConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudCertificateManagerV1.TrustConfig

    /// See `CertificateManagerClient.createTrustConfig`.
    func createTrustConfig(
      request: CreateTrustConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.createTrustConfig`.
    func createTrustConfig(
      withPolling: CreateTrustConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<TrustConfig>

    /// See `CertificateManagerClient.updateTrustConfig`.
    func updateTrustConfig(
      request: UpdateTrustConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.updateTrustConfig`.
    func updateTrustConfig(
      withPolling: UpdateTrustConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<TrustConfig>

    /// See `CertificateManagerClient.deleteTrustConfig`.
    func deleteTrustConfig(
      request: DeleteTrustConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateManagerClient.deleteTrustConfig`.
    func deleteTrustConfig(
      withPolling: DeleteTrustConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

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

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

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

    /// See `CertificateManagerClient.listOperations`.
    func listOperations(
      request: GoogleLongRunning.ListOperationsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.ListOperationsResponse

    /// See `CertificateManagerClient.listOperations`.
    func listOperations(
      byItem: GoogleLongRunning.ListOperationsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<GoogleLongRunning.Operation, Swift.Error>

    /// See `CertificateManagerClient.deleteOperation`.
    func deleteOperation(
      request: GoogleLongRunning.DeleteOperationRequest, options: GoogleCloudGax.RequestOptions
    ) async throws

    /// See `CertificateManagerClient.cancelOperation`.
    func cancelOperation(
      request: GoogleLongRunning.CancelOperationRequest, options: GoogleCloudGax.RequestOptions
    ) async throws
  }
}

// Default implementations
extension Clients.CertificateManagerProtocol {
  public func listCertificates(request: ListCertificatesRequest) async throws
    -> GoogleCloudCertificateManagerV1.ListCertificatesResponse
  {
    try await self.listCertificates(request: request, options: .init())
  }

  public func listCertificates(
    request: ListCertificatesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.ListCertificatesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listCertificates(
    byItem: ListCertificatesRequest
  ) throws -> any AsyncSequence<Certificate, Swift.Error> {
    try self.listCertificates(byItem: byItem, options: .init())
  }

  public func listCertificates(
    byItem: ListCertificatesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Certificate, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudCertificateManagerV1.ListCertificatesResponse
      in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func getCertificate(request: GetCertificateRequest) async throws
    -> GoogleCloudCertificateManagerV1.Certificate
  {
    try await self.getCertificate(request: request, options: .init())
  }

  public func getCertificate(
    request: GetCertificateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.Certificate {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getCertificate(
    name: Swift.String,
  ) async throws -> GoogleCloudCertificateManagerV1.Certificate {
    let request = GetCertificateRequest().with {
      $0.name = name
    }
    return try await self.getCertificate(request: request)
  }

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

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

  public func createCertificate(withPolling: CreateCertificateRequest) async throws
    -> any GoogleCloudGax.PollableOperation<Certificate>
  {
    try await self.createCertificate(withPolling: withPolling, options: .init())
  }

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

  public func createCertificate(
    parent: Swift.String,
    certificate: Certificate?,
    certificateId: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Certificate> {
    let request = CreateCertificateRequest().with {
      $0.parent = parent
      $0.certificate = certificate
      $0.certificateId = certificateId
    }
    return try await self.createCertificate(withPolling: request)
  }

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

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

  public func updateCertificate(withPolling: UpdateCertificateRequest) async throws
    -> any GoogleCloudGax.PollableOperation<Certificate>
  {
    try await self.updateCertificate(withPolling: withPolling, options: .init())
  }

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

  public func updateCertificate(
    certificate: Certificate?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> any GoogleCloudGax.PollableOperation<Certificate> {
    let request = UpdateCertificateRequest().with {
      $0.certificate = certificate
      $0.updateMask = updateMask
    }
    return try await self.updateCertificate(withPolling: request)
  }

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

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

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

  public func deleteCertificate(
    withPolling: DeleteCertificateRequest, 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 deleteCertificate(
    name: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let request = DeleteCertificateRequest().with {
      $0.name = name
    }
    return try await self.deleteCertificate(withPolling: request)
  }

  public func listCertificateMaps(request: ListCertificateMapsRequest) async throws
    -> GoogleCloudCertificateManagerV1.ListCertificateMapsResponse
  {
    try await self.listCertificateMaps(request: request, options: .init())
  }

  public func listCertificateMaps(
    request: ListCertificateMapsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.ListCertificateMapsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listCertificateMaps(
    byItem: ListCertificateMapsRequest
  ) throws -> any AsyncSequence<CertificateMap, Swift.Error> {
    try self.listCertificateMaps(byItem: byItem, options: .init())
  }

  public func listCertificateMaps(
    byItem: ListCertificateMapsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<CertificateMap, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudCertificateManagerV1.ListCertificateMapsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func getCertificateMap(request: GetCertificateMapRequest) async throws
    -> GoogleCloudCertificateManagerV1.CertificateMap
  {
    try await self.getCertificateMap(request: request, options: .init())
  }

  public func getCertificateMap(
    request: GetCertificateMapRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.CertificateMap {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getCertificateMap(
    name: Swift.String,
  ) async throws -> GoogleCloudCertificateManagerV1.CertificateMap {
    let request = GetCertificateMapRequest().with {
      $0.name = name
    }
    return try await self.getCertificateMap(request: request)
  }

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

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

  public func createCertificateMap(withPolling: CreateCertificateMapRequest) async throws
    -> any GoogleCloudGax.PollableOperation<CertificateMap>
  {
    try await self.createCertificateMap(withPolling: withPolling, options: .init())
  }

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

  public func createCertificateMap(
    parent: Swift.String,
    certificateMap: CertificateMap?,
    certificateMapId: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMap> {
    let request = CreateCertificateMapRequest().with {
      $0.parent = parent
      $0.certificateMap = certificateMap
      $0.certificateMapId = certificateMapId
    }
    return try await self.createCertificateMap(withPolling: request)
  }

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

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

  public func updateCertificateMap(withPolling: UpdateCertificateMapRequest) async throws
    -> any GoogleCloudGax.PollableOperation<CertificateMap>
  {
    try await self.updateCertificateMap(withPolling: withPolling, options: .init())
  }

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

  public func updateCertificateMap(
    certificateMap: CertificateMap?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMap> {
    let request = UpdateCertificateMapRequest().with {
      $0.certificateMap = certificateMap
      $0.updateMask = updateMask
    }
    return try await self.updateCertificateMap(withPolling: request)
  }

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

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

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

  public func deleteCertificateMap(
    withPolling: DeleteCertificateMapRequest, 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 deleteCertificateMap(
    name: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let request = DeleteCertificateMapRequest().with {
      $0.name = name
    }
    return try await self.deleteCertificateMap(withPolling: request)
  }

  public func listCertificateMapEntries(request: ListCertificateMapEntriesRequest) async throws
    -> GoogleCloudCertificateManagerV1.ListCertificateMapEntriesResponse
  {
    try await self.listCertificateMapEntries(request: request, options: .init())
  }

  public func listCertificateMapEntries(
    request: ListCertificateMapEntriesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.ListCertificateMapEntriesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listCertificateMapEntries(
    byItem: ListCertificateMapEntriesRequest
  ) throws -> any AsyncSequence<CertificateMapEntry, Swift.Error> {
    try self.listCertificateMapEntries(byItem: byItem, options: .init())
  }

  public func listCertificateMapEntries(
    byItem: ListCertificateMapEntriesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<CertificateMapEntry, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudCertificateManagerV1.ListCertificateMapEntriesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func getCertificateMapEntry(request: GetCertificateMapEntryRequest) async throws
    -> GoogleCloudCertificateManagerV1.CertificateMapEntry
  {
    try await self.getCertificateMapEntry(request: request, options: .init())
  }

  public func getCertificateMapEntry(
    request: GetCertificateMapEntryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.CertificateMapEntry {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getCertificateMapEntry(
    name: Swift.String,
  ) async throws -> GoogleCloudCertificateManagerV1.CertificateMapEntry {
    let request = GetCertificateMapEntryRequest().with {
      $0.name = name
    }
    return try await self.getCertificateMapEntry(request: request)
  }

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

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

  public func createCertificateMapEntry(withPolling: CreateCertificateMapEntryRequest) async throws
    -> any GoogleCloudGax.PollableOperation<CertificateMapEntry>
  {
    try await self.createCertificateMapEntry(withPolling: withPolling, options: .init())
  }

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

  public func createCertificateMapEntry(
    parent: Swift.String,
    certificateMapEntry: CertificateMapEntry?,
    certificateMapEntryId: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMapEntry> {
    let request = CreateCertificateMapEntryRequest().with {
      $0.parent = parent
      $0.certificateMapEntry = certificateMapEntry
      $0.certificateMapEntryId = certificateMapEntryId
    }
    return try await self.createCertificateMapEntry(withPolling: request)
  }

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

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

  public func updateCertificateMapEntry(withPolling: UpdateCertificateMapEntryRequest) async throws
    -> any GoogleCloudGax.PollableOperation<CertificateMapEntry>
  {
    try await self.updateCertificateMapEntry(withPolling: withPolling, options: .init())
  }

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

  public func updateCertificateMapEntry(
    certificateMapEntry: CertificateMapEntry?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateMapEntry> {
    let request = UpdateCertificateMapEntryRequest().with {
      $0.certificateMapEntry = certificateMapEntry
      $0.updateMask = updateMask
    }
    return try await self.updateCertificateMapEntry(withPolling: request)
  }

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

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

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

  public func deleteCertificateMapEntry(
    withPolling: DeleteCertificateMapEntryRequest, 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 deleteCertificateMapEntry(
    name: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let request = DeleteCertificateMapEntryRequest().with {
      $0.name = name
    }
    return try await self.deleteCertificateMapEntry(withPolling: request)
  }

  public func listDnsAuthorizations(request: ListDnsAuthorizationsRequest) async throws
    -> GoogleCloudCertificateManagerV1.ListDnsAuthorizationsResponse
  {
    try await self.listDnsAuthorizations(request: request, options: .init())
  }

  public func listDnsAuthorizations(
    request: ListDnsAuthorizationsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.ListDnsAuthorizationsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listDnsAuthorizations(
    byItem: ListDnsAuthorizationsRequest
  ) throws -> any AsyncSequence<DnsAuthorization, Swift.Error> {
    try self.listDnsAuthorizations(byItem: byItem, options: .init())
  }

  public func listDnsAuthorizations(
    byItem: ListDnsAuthorizationsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<DnsAuthorization, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudCertificateManagerV1.ListDnsAuthorizationsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func getDnsAuthorization(request: GetDnsAuthorizationRequest) async throws
    -> GoogleCloudCertificateManagerV1.DnsAuthorization
  {
    try await self.getDnsAuthorization(request: request, options: .init())
  }

  public func getDnsAuthorization(
    request: GetDnsAuthorizationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.DnsAuthorization {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getDnsAuthorization(
    name: Swift.String,
  ) async throws -> GoogleCloudCertificateManagerV1.DnsAuthorization {
    let request = GetDnsAuthorizationRequest().with {
      $0.name = name
    }
    return try await self.getDnsAuthorization(request: request)
  }

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

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

  public func createDnsAuthorization(withPolling: CreateDnsAuthorizationRequest) async throws
    -> any GoogleCloudGax.PollableOperation<DnsAuthorization>
  {
    try await self.createDnsAuthorization(withPolling: withPolling, options: .init())
  }

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

  public func createDnsAuthorization(
    parent: Swift.String,
    dnsAuthorization: DnsAuthorization?,
    dnsAuthorizationId: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<DnsAuthorization> {
    let request = CreateDnsAuthorizationRequest().with {
      $0.parent = parent
      $0.dnsAuthorization = dnsAuthorization
      $0.dnsAuthorizationId = dnsAuthorizationId
    }
    return try await self.createDnsAuthorization(withPolling: request)
  }

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

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

  public func updateDnsAuthorization(withPolling: UpdateDnsAuthorizationRequest) async throws
    -> any GoogleCloudGax.PollableOperation<DnsAuthorization>
  {
    try await self.updateDnsAuthorization(withPolling: withPolling, options: .init())
  }

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

  public func updateDnsAuthorization(
    dnsAuthorization: DnsAuthorization?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> any GoogleCloudGax.PollableOperation<DnsAuthorization> {
    let request = UpdateDnsAuthorizationRequest().with {
      $0.dnsAuthorization = dnsAuthorization
      $0.updateMask = updateMask
    }
    return try await self.updateDnsAuthorization(withPolling: request)
  }

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

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

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

  public func deleteDnsAuthorization(
    withPolling: DeleteDnsAuthorizationRequest, 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 deleteDnsAuthorization(
    name: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let request = DeleteDnsAuthorizationRequest().with {
      $0.name = name
    }
    return try await self.deleteDnsAuthorization(withPolling: request)
  }

  public func listCertificateIssuanceConfigs(request: ListCertificateIssuanceConfigsRequest)
    async throws -> GoogleCloudCertificateManagerV1.ListCertificateIssuanceConfigsResponse
  {
    try await self.listCertificateIssuanceConfigs(request: request, options: .init())
  }

  public func listCertificateIssuanceConfigs(
    request: ListCertificateIssuanceConfigsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.ListCertificateIssuanceConfigsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listCertificateIssuanceConfigs(
    byItem: ListCertificateIssuanceConfigsRequest
  ) throws -> any AsyncSequence<CertificateIssuanceConfig, Swift.Error> {
    try self.listCertificateIssuanceConfigs(byItem: byItem, options: .init())
  }

  public func listCertificateIssuanceConfigs(
    byItem: ListCertificateIssuanceConfigsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<CertificateIssuanceConfig, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudCertificateManagerV1.ListCertificateIssuanceConfigsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func getCertificateIssuanceConfig(request: GetCertificateIssuanceConfigRequest)
    async throws -> GoogleCloudCertificateManagerV1.CertificateIssuanceConfig
  {
    try await self.getCertificateIssuanceConfig(request: request, options: .init())
  }

  public func getCertificateIssuanceConfig(
    request: GetCertificateIssuanceConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.CertificateIssuanceConfig {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getCertificateIssuanceConfig(
    name: Swift.String,
  ) async throws -> GoogleCloudCertificateManagerV1.CertificateIssuanceConfig {
    let request = GetCertificateIssuanceConfigRequest().with {
      $0.name = name
    }
    return try await self.getCertificateIssuanceConfig(request: request)
  }

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

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

  public func createCertificateIssuanceConfig(withPolling: CreateCertificateIssuanceConfigRequest)
    async throws -> any GoogleCloudGax.PollableOperation<CertificateIssuanceConfig>
  {
    try await self.createCertificateIssuanceConfig(withPolling: withPolling, options: .init())
  }

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

  public func createCertificateIssuanceConfig(
    parent: Swift.String,
    certificateIssuanceConfig: CertificateIssuanceConfig?,
    certificateIssuanceConfigId: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateIssuanceConfig> {
    let request = CreateCertificateIssuanceConfigRequest().with {
      $0.parent = parent
      $0.certificateIssuanceConfig = certificateIssuanceConfig
      $0.certificateIssuanceConfigId = certificateIssuanceConfigId
    }
    return try await self.createCertificateIssuanceConfig(withPolling: request)
  }

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

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

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

  public func deleteCertificateIssuanceConfig(
    withPolling: DeleteCertificateIssuanceConfigRequest, 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 deleteCertificateIssuanceConfig(
    name: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let request = DeleteCertificateIssuanceConfigRequest().with {
      $0.name = name
    }
    return try await self.deleteCertificateIssuanceConfig(withPolling: request)
  }

  public func listTrustConfigs(request: ListTrustConfigsRequest) async throws
    -> GoogleCloudCertificateManagerV1.ListTrustConfigsResponse
  {
    try await self.listTrustConfigs(request: request, options: .init())
  }

  public func listTrustConfigs(
    request: ListTrustConfigsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.ListTrustConfigsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listTrustConfigs(
    byItem: ListTrustConfigsRequest
  ) throws -> any AsyncSequence<TrustConfig, Swift.Error> {
    try self.listTrustConfigs(byItem: byItem, options: .init())
  }

  public func listTrustConfigs(
    byItem: ListTrustConfigsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<TrustConfig, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudCertificateManagerV1.ListTrustConfigsResponse
      in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func getTrustConfig(request: GetTrustConfigRequest) async throws
    -> GoogleCloudCertificateManagerV1.TrustConfig
  {
    try await self.getTrustConfig(request: request, options: .init())
  }

  public func getTrustConfig(
    request: GetTrustConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudCertificateManagerV1.TrustConfig {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getTrustConfig(
    name: Swift.String,
  ) async throws -> GoogleCloudCertificateManagerV1.TrustConfig {
    let request = GetTrustConfigRequest().with {
      $0.name = name
    }
    return try await self.getTrustConfig(request: request)
  }

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

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

  public func createTrustConfig(withPolling: CreateTrustConfigRequest) async throws
    -> any GoogleCloudGax.PollableOperation<TrustConfig>
  {
    try await self.createTrustConfig(withPolling: withPolling, options: .init())
  }

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

  public func createTrustConfig(
    parent: Swift.String,
    trustConfig: TrustConfig?,
    trustConfigId: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<TrustConfig> {
    let request = CreateTrustConfigRequest().with {
      $0.parent = parent
      $0.trustConfig = trustConfig
      $0.trustConfigId = trustConfigId
    }
    return try await self.createTrustConfig(withPolling: request)
  }

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

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

  public func updateTrustConfig(withPolling: UpdateTrustConfigRequest) async throws
    -> any GoogleCloudGax.PollableOperation<TrustConfig>
  {
    try await self.updateTrustConfig(withPolling: withPolling, options: .init())
  }

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

  public func updateTrustConfig(
    trustConfig: TrustConfig?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> any GoogleCloudGax.PollableOperation<TrustConfig> {
    let request = UpdateTrustConfigRequest().with {
      $0.trustConfig = trustConfig
      $0.updateMask = updateMask
    }
    return try await self.updateTrustConfig(withPolling: request)
  }

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

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

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

  public func deleteTrustConfig(
    withPolling: DeleteTrustConfigRequest, 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 deleteTrustConfig(
    name: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Void> {
    let request = DeleteTrustConfigRequest().with {
      $0.name = name
    }
    return try await self.deleteTrustConfig(withPolling: request)
  }

  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 listOperations(request: GoogleLongRunning.ListOperationsRequest) async throws
    -> GoogleLongRunning.ListOperationsResponse
  {
    try await self.listOperations(request: request, options: .init())
  }

  public func listOperations(
    request: GoogleLongRunning.ListOperationsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.ListOperationsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listOperations(
    byItem: GoogleLongRunning.ListOperationsRequest
  ) throws -> any AsyncSequence<GoogleLongRunning.Operation, Swift.Error> {
    try self.listOperations(byItem: byItem, options: .init())
  }

  public func listOperations(
    byItem: GoogleLongRunning.ListOperationsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<GoogleLongRunning.Operation, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleLongRunning.ListOperationsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func listOperations(
    name: Swift.String,
    filter: Swift.String,
  ) throws -> any AsyncSequence<GoogleLongRunning.Operation, Swift.Error> {
    let request = GoogleLongRunning.ListOperationsRequest().with {
      $0.name = name
      $0.filter = filter
    }
    return try self.listOperations(byItem: request)
  }

  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)
  }

  public func deleteOperation(request: GoogleLongRunning.DeleteOperationRequest) async throws {
    try await self.deleteOperation(request: request, options: .init())
  }

  public func deleteOperation(
    request: GoogleLongRunning.DeleteOperationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    throw GoogleCloudGax.RequestError.unimplemented
  }

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

  public func cancelOperation(request: GoogleLongRunning.CancelOperationRequest) async throws {
    try await self.cancelOperation(request: request, options: .init())
  }

  public func cancelOperation(
    request: GoogleLongRunning.CancelOperationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    throw GoogleCloudGax.RequestError.unimplemented
  }

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