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

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

/// [Certificate Authority
/// Service][google.cloud.security.privateca.v1.CertificateAuthorityService]
/// manages private certificate authorities and issued certificates.
///
/// [google.cloud.security.privateca.v1.CertificateAuthorityService]: <doc:CertificateAuthorityService>
///
/// @Snippet(path: "CertificateAuthorityServiceQuickstart")
public class CertificateAuthorityServiceClient: Clients.CertificateAuthorityServiceProtocol {
  let inner: any Clients.CertificateAuthorityServiceStub
  let pollingErrorPolicy: GoogleCloudGax.PollingErrorPolicy
  let pollingBackoffPolicy: GoogleCloudGax.BackoffPolicy

  /// Creates a new `CertificateAuthorityServiceClient` instance.
  public init(_ options: GoogleCloudGax.ClientOptions = .init()) throws {
    var inner: any Clients.CertificateAuthorityServiceStub =
      try Clients.CertificateAuthorityServiceTransport(options)
    inner = Clients.CertificateAuthorityServiceRetry(inner, options: options)
    if let logger = options.logger {
      inner = Clients.CertificateAuthorityServiceLogging(inner, logger: logger)
    }
    self.inner = inner
    self.pollingErrorPolicy = options.pollingErrorPolicy
    self.pollingBackoffPolicy = options.pollingBackoffPolicy
  }

  /// Create a new [Certificate][google.cloud.security.privateca.v1.Certificate]
  /// in a given Project, Location from a particular
  /// [CaPool][google.cloud.security.privateca.v1.CaPool].
  ///
  /// [google.cloud.security.privateca.v1.CaPool]: <doc:CaPool>
  /// [google.cloud.security.privateca.v1.Certificate]: <doc:Certificate>
  ///
  /// @Snippet(path: "CertificateAuthorityService_CreateCertificate")
  public func createCertificate(
    request: CreateCertificateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.Certificate {
    try await self.inner.createCertificate(request: request, options: options)
  }

  /// Returns a [Certificate][google.cloud.security.privateca.v1.Certificate].
  ///
  /// [google.cloud.security.privateca.v1.Certificate]: <doc:Certificate>
  ///
  /// @Snippet(path: "CertificateAuthorityService_GetCertificate")
  public func getCertificate(
    request: GetCertificateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.Certificate {
    try await self.inner.getCertificate(request: request, options: options)
  }

  /// Lists [Certificates][google.cloud.security.privateca.v1.Certificate].
  ///
  /// [google.cloud.security.privateca.v1.Certificate]: <doc:Certificate>
  ///
  /// @Snippet(path: "CertificateAuthorityService_ListCertificates")
  public func listCertificates(
    request: ListCertificatesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.ListCertificatesResponse {
    try await self.inner.listCertificates(request: request, options: options)
  }

  /// Lists [Certificates][google.cloud.security.privateca.v1.Certificate].
  ///
  /// [google.cloud.security.privateca.v1.Certificate]: <doc:Certificate>
  ///
  /// @Snippet(path: "CertificateAuthorityService_ListCertificates")
  public func listCertificates(
    byItem: ListCertificatesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Certificate, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudSecurityPrivateCAV1.ListCertificatesResponse
      in
      var request = byItem
      request.pageToken = token
      return try await self.listCertificates(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate].
  ///
  /// [google.cloud.security.privateca.v1.Certificate]: <doc:Certificate>
  ///
  /// @Snippet(path: "CertificateAuthorityService_RevokeCertificate")
  public func revokeCertificate(
    request: RevokeCertificateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.Certificate {
    try await self.inner.revokeCertificate(request: request, options: options)
  }

  /// Update a [Certificate][google.cloud.security.privateca.v1.Certificate].
  /// Currently, the only field you can update is the
  /// [labels][google.cloud.security.privateca.v1.Certificate.labels] field.
  ///
  /// [google.cloud.security.privateca.v1.Certificate]: <doc:Certificate>
  /// [google.cloud.security.privateca.v1.Certificate.labels]: <doc:Certificate/labels>
  ///
  /// @Snippet(path: "CertificateAuthorityService_UpdateCertificate")
  public func updateCertificate(
    request: UpdateCertificateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.Certificate {
    try await self.inner.updateCertificate(request: request, options: options)
  }

  /// Activate a
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
  /// that is in state
  /// [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION]
  /// and is of type
  /// [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE].
  /// After the parent Certificate Authority signs a certificate signing request
  /// from
  /// [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr],
  /// this method can complete the activation process.
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  /// [google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION]: <doc:CertificateAuthority/State/awaitingUserActivation>
  /// [google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]: <doc:CertificateAuthority/Type_/subordinate>
  /// [google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr]: <doc:CertificateAuthorityService/fetchCertificateAuthorityCsr(request:)>
  ///
  /// @Snippet(path: "CertificateAuthorityService_ActivateCertificateAuthority")
  public func activateCertificateAuthority(
    request: ActivateCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.activateCertificateAuthority(request: request, options: options)
  }

  /// Activate a
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
  /// that is in state
  /// [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION]
  /// and is of type
  /// [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE].
  /// After the parent Certificate Authority signs a certificate signing request
  /// from
  /// [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr],
  /// this method can complete the activation process.
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  /// [google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION]: <doc:CertificateAuthority/State/awaitingUserActivation>
  /// [google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]: <doc:CertificateAuthority/Type_/subordinate>
  /// [google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr]: <doc:CertificateAuthorityService/fetchCertificateAuthorityCsr(request:)>
  ///
  /// @Snippet(path: "CertificateAuthorityService_ActivateCertificateAuthority")
  public func activateCertificateAuthority(
    withPolling: ActivateCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateAuthority>.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 CertificateAuthority(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.activateCertificateAuthority(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateAuthority>.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,
    )
  }

  /// Create a new
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
  /// in a given Project and Location.
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_CreateCertificateAuthority")
  public func createCertificateAuthority(
    request: CreateCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createCertificateAuthority(request: request, options: options)
  }

  /// Create a new
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
  /// in a given Project and Location.
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_CreateCertificateAuthority")
  public func createCertificateAuthority(
    withPolling: CreateCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateAuthority>.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 CertificateAuthority(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.createCertificateAuthority(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateAuthority>.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,
    )
  }

  /// Disable a
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_DisableCertificateAuthority")
  public func disableCertificateAuthority(
    request: DisableCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.disableCertificateAuthority(request: request, options: options)
  }

  /// Disable a
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_DisableCertificateAuthority")
  public func disableCertificateAuthority(
    withPolling: DisableCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateAuthority>.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 CertificateAuthority(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.disableCertificateAuthority(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateAuthority>.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,
    )
  }

  /// Enable a
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_EnableCertificateAuthority")
  public func enableCertificateAuthority(
    request: EnableCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.enableCertificateAuthority(request: request, options: options)
  }

  /// Enable a
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_EnableCertificateAuthority")
  public func enableCertificateAuthority(
    withPolling: EnableCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateAuthority>.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 CertificateAuthority(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.enableCertificateAuthority(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateAuthority>.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,
    )
  }

  /// Fetch a certificate signing request (CSR) from a
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
  /// that is in state
  /// [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION]
  /// and is of type
  /// [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE].
  /// The CSR must then be signed by the desired parent Certificate Authority,
  /// which could be another
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
  /// resource, or could be an on-prem certificate authority. See also
  /// [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  /// [google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION]: <doc:CertificateAuthority/State/awaitingUserActivation>
  /// [google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]: <doc:CertificateAuthority/Type_/subordinate>
  /// [google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority]: <doc:CertificateAuthorityService/activateCertificateAuthority(request:)>
  ///
  /// @Snippet(path: "CertificateAuthorityService_FetchCertificateAuthorityCsr")
  public func fetchCertificateAuthorityCsr(
    request: FetchCertificateAuthorityCsrRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.FetchCertificateAuthorityCsrResponse {
    try await self.inner.fetchCertificateAuthorityCsr(request: request, options: options)
  }

  /// Returns a
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_GetCertificateAuthority")
  public func getCertificateAuthority(
    request: GetCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateAuthority {
    try await self.inner.getCertificateAuthority(request: request, options: options)
  }

  /// Lists
  /// [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_ListCertificateAuthorities")
  public func listCertificateAuthorities(
    request: ListCertificateAuthoritiesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.ListCertificateAuthoritiesResponse {
    try await self.inner.listCertificateAuthorities(request: request, options: options)
  }

  /// Lists
  /// [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_ListCertificateAuthorities")
  public func listCertificateAuthorities(
    byItem: ListCertificateAuthoritiesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<CertificateAuthority, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudSecurityPrivateCAV1.ListCertificateAuthoritiesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listCertificateAuthorities(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Undelete a
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
  /// that has been deleted.
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_UndeleteCertificateAuthority")
  public func undeleteCertificateAuthority(
    request: UndeleteCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.undeleteCertificateAuthority(request: request, options: options)
  }

  /// Undelete a
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
  /// that has been deleted.
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_UndeleteCertificateAuthority")
  public func undeleteCertificateAuthority(
    withPolling: UndeleteCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateAuthority>.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 CertificateAuthority(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.undeleteCertificateAuthority(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateAuthority>.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,
    )
  }

  /// Delete a
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_DeleteCertificateAuthority")
  public func deleteCertificateAuthority(
    request: DeleteCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteCertificateAuthority(request: request, options: options)
  }

  /// Delete a
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_DeleteCertificateAuthority")
  public func deleteCertificateAuthority(
    withPolling: DeleteCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateAuthority>.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 CertificateAuthority(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.deleteCertificateAuthority(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateAuthority>.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,
    )
  }

  /// Update a
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_UpdateCertificateAuthority")
  public func updateCertificateAuthority(
    request: UpdateCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateCertificateAuthority(request: request, options: options)
  }

  /// Update a
  /// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
  ///
  /// [google.cloud.security.privateca.v1.CertificateAuthority]: <doc:CertificateAuthority>
  ///
  /// @Snippet(path: "CertificateAuthorityService_UpdateCertificateAuthority")
  public func updateCertificateAuthority(
    withPolling: UpdateCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateAuthority>.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 CertificateAuthority(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.updateCertificateAuthority(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateAuthority>.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,
    )
  }

  /// Create a [CaPool][google.cloud.security.privateca.v1.CaPool].
  ///
  /// [google.cloud.security.privateca.v1.CaPool]: <doc:CaPool>
  ///
  /// @Snippet(path: "CertificateAuthorityService_CreateCaPool")
  public func createCaPool(
    request: CreateCaPoolRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createCaPool(request: request, options: options)
  }

  /// Create a [CaPool][google.cloud.security.privateca.v1.CaPool].
  ///
  /// [google.cloud.security.privateca.v1.CaPool]: <doc:CaPool>
  ///
  /// @Snippet(path: "CertificateAuthorityService_CreateCaPool")
  public func createCaPool(
    withPolling: CreateCaPoolRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CaPool> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CaPool>.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 CaPool(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.createCaPool(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<CaPool>.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,
    )
  }

  /// Update a [CaPool][google.cloud.security.privateca.v1.CaPool].
  ///
  /// [google.cloud.security.privateca.v1.CaPool]: <doc:CaPool>
  ///
  /// @Snippet(path: "CertificateAuthorityService_UpdateCaPool")
  public func updateCaPool(
    request: UpdateCaPoolRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateCaPool(request: request, options: options)
  }

  /// Update a [CaPool][google.cloud.security.privateca.v1.CaPool].
  ///
  /// [google.cloud.security.privateca.v1.CaPool]: <doc:CaPool>
  ///
  /// @Snippet(path: "CertificateAuthorityService_UpdateCaPool")
  public func updateCaPool(
    withPolling: UpdateCaPoolRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CaPool> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CaPool>.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 CaPool(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.updateCaPool(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<CaPool>.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,
    )
  }

  /// Returns a [CaPool][google.cloud.security.privateca.v1.CaPool].
  ///
  /// [google.cloud.security.privateca.v1.CaPool]: <doc:CaPool>
  ///
  /// @Snippet(path: "CertificateAuthorityService_GetCaPool")
  public func getCaPool(
    request: GetCaPoolRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.CaPool {
    try await self.inner.getCaPool(request: request, options: options)
  }

  /// Lists [CaPools][google.cloud.security.privateca.v1.CaPool].
  ///
  /// [google.cloud.security.privateca.v1.CaPool]: <doc:CaPool>
  ///
  /// @Snippet(path: "CertificateAuthorityService_ListCaPools")
  public func listCaPools(
    request: ListCaPoolsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.ListCaPoolsResponse {
    try await self.inner.listCaPools(request: request, options: options)
  }

  /// Lists [CaPools][google.cloud.security.privateca.v1.CaPool].
  ///
  /// [google.cloud.security.privateca.v1.CaPool]: <doc:CaPool>
  ///
  /// @Snippet(path: "CertificateAuthorityService_ListCaPools")
  public func listCaPools(
    byItem: ListCaPoolsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<CaPool, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudSecurityPrivateCAV1.ListCaPoolsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listCaPools(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].
  ///
  /// [google.cloud.security.privateca.v1.CaPool]: <doc:CaPool>
  ///
  /// @Snippet(path: "CertificateAuthorityService_DeleteCaPool")
  public func deleteCaPool(
    request: DeleteCaPoolRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteCaPool(request: request, options: options)
  }

  /// Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].
  ///
  /// [google.cloud.security.privateca.v1.CaPool]: <doc:CaPool>
  ///
  /// @Snippet(path: "CertificateAuthorityService_DeleteCaPool")
  public func deleteCaPool(
    withPolling: DeleteCaPoolRequest, 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.deleteCaPool(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,
    )
  }

  /// FetchCaCerts returns the current trust anchor for the
  /// [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA
  /// certificate chains for all certificate authorities in the ENABLED,
  /// DISABLED, or STAGED states.
  ///
  /// [google.cloud.security.privateca.v1.CaPool]: <doc:CaPool>
  ///
  /// @Snippet(path: "CertificateAuthorityService_FetchCaCerts")
  public func fetchCaCerts(
    request: FetchCaCertsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.FetchCaCertsResponse {
    try await self.inner.fetchCaCerts(request: request, options: options)
  }

  /// Returns a
  /// [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].
  ///
  /// [google.cloud.security.privateca.v1.CertificateRevocationList]: <doc:CertificateRevocationList>
  ///
  /// @Snippet(path: "CertificateAuthorityService_GetCertificateRevocationList")
  public func getCertificateRevocationList(
    request: GetCertificateRevocationListRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateRevocationList {
    try await self.inner.getCertificateRevocationList(request: request, options: options)
  }

  /// Lists
  /// [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].
  ///
  /// [google.cloud.security.privateca.v1.CertificateRevocationList]: <doc:CertificateRevocationList>
  ///
  /// @Snippet(path: "CertificateAuthorityService_ListCertificateRevocationLists")
  public func listCertificateRevocationLists(
    request: ListCertificateRevocationListsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.ListCertificateRevocationListsResponse {
    try await self.inner.listCertificateRevocationLists(request: request, options: options)
  }

  /// Lists
  /// [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].
  ///
  /// [google.cloud.security.privateca.v1.CertificateRevocationList]: <doc:CertificateRevocationList>
  ///
  /// @Snippet(path: "CertificateAuthorityService_ListCertificateRevocationLists")
  public func listCertificateRevocationLists(
    byItem: ListCertificateRevocationListsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<CertificateRevocationList, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudSecurityPrivateCAV1.ListCertificateRevocationListsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listCertificateRevocationLists(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Update a
  /// [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].
  ///
  /// [google.cloud.security.privateca.v1.CertificateRevocationList]: <doc:CertificateRevocationList>
  ///
  /// @Snippet(path: "CertificateAuthorityService_UpdateCertificateRevocationList")
  public func updateCertificateRevocationList(
    request: UpdateCertificateRevocationListRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateCertificateRevocationList(request: request, options: options)
  }

  /// Update a
  /// [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].
  ///
  /// [google.cloud.security.privateca.v1.CertificateRevocationList]: <doc:CertificateRevocationList>
  ///
  /// @Snippet(path: "CertificateAuthorityService_UpdateCertificateRevocationList")
  public func updateCertificateRevocationList(
    withPolling: UpdateCertificateRevocationListRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateRevocationList> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateRevocationList>.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 CertificateRevocationList(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.updateCertificateRevocationList(
      request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateRevocationList>.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,
    )
  }

  /// Create a new
  /// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
  /// in a given Project and Location.
  ///
  /// [google.cloud.security.privateca.v1.CertificateTemplate]: <doc:CertificateTemplate>
  ///
  /// @Snippet(path: "CertificateAuthorityService_CreateCertificateTemplate")
  public func createCertificateTemplate(
    request: CreateCertificateTemplateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createCertificateTemplate(request: request, options: options)
  }

  /// Create a new
  /// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
  /// in a given Project and Location.
  ///
  /// [google.cloud.security.privateca.v1.CertificateTemplate]: <doc:CertificateTemplate>
  ///
  /// @Snippet(path: "CertificateAuthorityService_CreateCertificateTemplate")
  public func createCertificateTemplate(
    withPolling: CreateCertificateTemplateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateTemplate> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateTemplate>.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 CertificateTemplate(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.createCertificateTemplate(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateTemplate>.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,
    )
  }

  /// DeleteCertificateTemplate deletes a
  /// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
  ///
  /// [google.cloud.security.privateca.v1.CertificateTemplate]: <doc:CertificateTemplate>
  ///
  /// @Snippet(path: "CertificateAuthorityService_DeleteCertificateTemplate")
  public func deleteCertificateTemplate(
    request: DeleteCertificateTemplateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteCertificateTemplate(request: request, options: options)
  }

  /// DeleteCertificateTemplate deletes a
  /// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
  ///
  /// [google.cloud.security.privateca.v1.CertificateTemplate]: <doc:CertificateTemplate>
  ///
  /// @Snippet(path: "CertificateAuthorityService_DeleteCertificateTemplate")
  public func deleteCertificateTemplate(
    withPolling: DeleteCertificateTemplateRequest, 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.deleteCertificateTemplate(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,
    )
  }

  /// Returns a
  /// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
  ///
  /// [google.cloud.security.privateca.v1.CertificateTemplate]: <doc:CertificateTemplate>
  ///
  /// @Snippet(path: "CertificateAuthorityService_GetCertificateTemplate")
  public func getCertificateTemplate(
    request: GetCertificateTemplateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateTemplate {
    try await self.inner.getCertificateTemplate(request: request, options: options)
  }

  /// Lists
  /// [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].
  ///
  /// [google.cloud.security.privateca.v1.CertificateTemplate]: <doc:CertificateTemplate>
  ///
  /// @Snippet(path: "CertificateAuthorityService_ListCertificateTemplates")
  public func listCertificateTemplates(
    request: ListCertificateTemplatesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.ListCertificateTemplatesResponse {
    try await self.inner.listCertificateTemplates(request: request, options: options)
  }

  /// Lists
  /// [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].
  ///
  /// [google.cloud.security.privateca.v1.CertificateTemplate]: <doc:CertificateTemplate>
  ///
  /// @Snippet(path: "CertificateAuthorityService_ListCertificateTemplates")
  public func listCertificateTemplates(
    byItem: ListCertificateTemplatesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<CertificateTemplate, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudSecurityPrivateCAV1.ListCertificateTemplatesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listCertificateTemplates(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Update a
  /// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
  ///
  /// [google.cloud.security.privateca.v1.CertificateTemplate]: <doc:CertificateTemplate>
  ///
  /// @Snippet(path: "CertificateAuthorityService_UpdateCertificateTemplate")
  public func updateCertificateTemplate(
    request: UpdateCertificateTemplateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateCertificateTemplate(request: request, options: options)
  }

  /// Update a
  /// [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
  ///
  /// [google.cloud.security.privateca.v1.CertificateTemplate]: <doc:CertificateTemplate>
  ///
  /// @Snippet(path: "CertificateAuthorityService_UpdateCertificateTemplate")
  public func updateCertificateTemplate(
    withPolling: UpdateCertificateTemplateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateTemplate> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<CertificateTemplate>.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 CertificateTemplate(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.updateCertificateTemplate(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<CertificateTemplate>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Lists information about the supported locations for this service.
  ///
  /// This method lists locations based on the resource scope provided in
  /// the [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: *
  /// **Global locations**: If `name` is empty, the method lists the
  /// public locations available to all projects. * **Project-specific
  /// locations**: If `name` follows the format
  /// `projects/{project}`, the method lists locations visible to that
  /// specific project. This includes public, private, or other
  /// project-specific locations enabled for the project.
  ///
  /// For gRPC and client library implementations, the resource name is
  /// passed as the `name` field. For direct service calls, the resource
  /// name is
  /// incorporated into the request path based on the specific service
  /// implementation and version.
  ///
  /// [google.cloud.location.ListLocationsRequest.name]: https://www.google.com/search?q=Swift+google.cloud.location+GoogleCloudLocation.ListLocationsRequest/name
  ///
  /// @Snippet(path: "CertificateAuthorityService_ListLocations")
  public func listLocations(
    request: GoogleCloudLocation.ListLocationsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudLocation.ListLocationsResponse {
    try await self.inner.listLocations(request: request, options: options)
  }

  /// Lists information about the supported locations for this service.
  ///
  /// This method lists locations based on the resource scope provided in
  /// the [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: *
  /// **Global locations**: If `name` is empty, the method lists the
  /// public locations available to all projects. * **Project-specific
  /// locations**: If `name` follows the format
  /// `projects/{project}`, the method lists locations visible to that
  /// specific project. This includes public, private, or other
  /// project-specific locations enabled for the project.
  ///
  /// For gRPC and client library implementations, the resource name is
  /// passed as the `name` field. For direct service calls, the resource
  /// name is
  /// incorporated into the request path based on the specific service
  /// implementation and version.
  ///
  /// [google.cloud.location.ListLocationsRequest.name]: https://www.google.com/search?q=Swift+google.cloud.location+GoogleCloudLocation.ListLocationsRequest/name
  ///
  /// @Snippet(path: "CertificateAuthorityService_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: "CertificateAuthorityService_GetLocation")
  public func getLocation(
    request: GoogleCloudLocation.GetLocationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudLocation.Location {
    try await self.inner.getLocation(request: request, options: options)
  }

  /// Sets the access control policy on the specified resource. Replaces
  /// any existing policy.
  ///
  /// Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
  /// errors.
  ///
  /// @Snippet(path: "CertificateAuthorityService_SetIamPolicy")
  public func setIamPolicy(
    request: GoogleIAMV1.SetIamPolicyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleIAMV1.Policy {
    try await self.inner.setIamPolicy(request: request, options: options)
  }

  /// Gets the access control policy for a resource. Returns an empty policy
  /// if the resource exists and does not have a policy set.
  ///
  /// @Snippet(path: "CertificateAuthorityService_GetIamPolicy")
  public func getIamPolicy(
    request: GoogleIAMV1.GetIamPolicyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleIAMV1.Policy {
    try await self.inner.getIamPolicy(request: request, options: options)
  }

  /// Returns permissions that a caller has on the specified resource. If the
  /// resource does not exist, this will return an empty set of
  /// permissions, not a `NOT_FOUND` error.
  ///
  /// Note: This operation is designed to be used for building
  /// permission-aware UIs and command-line tools, not for authorization
  /// checking. This operation may "fail open" without warning.
  ///
  /// @Snippet(path: "CertificateAuthorityService_TestIamPermissions")
  public func testIamPermissions(
    request: GoogleIAMV1.TestIamPermissionsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleIAMV1.TestIamPermissionsResponse {
    try await self.inner.testIamPermissions(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: "CertificateAuthorityService_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: "CertificateAuthorityService_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: "CertificateAuthorityService_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: "CertificateAuthorityService_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: "CertificateAuthorityService_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 `CertificateAuthorityServiceClient`.
  ///
  /// To mock `CertificateAuthorityServiceClient` change your functions to receive
  /// `some CertificateAuthorityServiceProtocol` or `any CertificateAuthorityServiceProtocol`
  /// and pass a mock implementation in your tests.
  public protocol CertificateAuthorityServiceProtocol {
    /// See `CertificateAuthorityServiceClient.createCertificate`.
    func createCertificate(request: CreateCertificateRequest) async throws
      -> GoogleCloudSecurityPrivateCAV1.Certificate

    /// See `CertificateAuthorityServiceClient.createCertificate`.
    func createCertificate(
      parent: Swift.String,
      certificate: Certificate?,
      certificateId: Swift.String,
    ) async throws -> GoogleCloudSecurityPrivateCAV1.Certificate

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

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

    /// See `CertificateAuthorityServiceClient.listCertificates`.
    func listCertificates(request: ListCertificatesRequest) async throws
      -> GoogleCloudSecurityPrivateCAV1.ListCertificatesResponse

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

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

    /// See `CertificateAuthorityServiceClient.revokeCertificate`.
    func revokeCertificate(request: RevokeCertificateRequest) async throws
      -> GoogleCloudSecurityPrivateCAV1.Certificate

    /// See `CertificateAuthorityServiceClient.revokeCertificate`.
    func revokeCertificate(
      name: Swift.String,
    ) async throws -> GoogleCloudSecurityPrivateCAV1.Certificate

    /// See `CertificateAuthorityServiceClient.updateCertificate`.
    func updateCertificate(request: UpdateCertificateRequest) async throws
      -> GoogleCloudSecurityPrivateCAV1.Certificate

    /// See `CertificateAuthorityServiceClient.updateCertificate`.
    func updateCertificate(
      certificate: Certificate?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> GoogleCloudSecurityPrivateCAV1.Certificate

    /// See `CertificateAuthorityServiceClient.activateCertificateAuthority`.
    func activateCertificateAuthority(request: ActivateCertificateAuthorityRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.activateCertificateAuthority`.
    func activateCertificateAuthority(withPolling: ActivateCertificateAuthorityRequest) async throws
      -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.activateCertificateAuthority`.
    func activateCertificateAuthority(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.createCertificateAuthority`.
    func createCertificateAuthority(request: CreateCertificateAuthorityRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.createCertificateAuthority`.
    func createCertificateAuthority(withPolling: CreateCertificateAuthorityRequest) async throws
      -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.createCertificateAuthority`.
    func createCertificateAuthority(
      parent: Swift.String,
      certificateAuthority: CertificateAuthority?,
      certificateAuthorityId: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.disableCertificateAuthority`.
    func disableCertificateAuthority(request: DisableCertificateAuthorityRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.disableCertificateAuthority`.
    func disableCertificateAuthority(withPolling: DisableCertificateAuthorityRequest) async throws
      -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.disableCertificateAuthority`.
    func disableCertificateAuthority(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.enableCertificateAuthority`.
    func enableCertificateAuthority(request: EnableCertificateAuthorityRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.enableCertificateAuthority`.
    func enableCertificateAuthority(withPolling: EnableCertificateAuthorityRequest) async throws
      -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.enableCertificateAuthority`.
    func enableCertificateAuthority(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.fetchCertificateAuthorityCsr`.
    func fetchCertificateAuthorityCsr(request: FetchCertificateAuthorityCsrRequest) async throws
      -> GoogleCloudSecurityPrivateCAV1.FetchCertificateAuthorityCsrResponse

    /// See `CertificateAuthorityServiceClient.fetchCertificateAuthorityCsr`.
    func fetchCertificateAuthorityCsr(
      name: Swift.String,
    ) async throws -> GoogleCloudSecurityPrivateCAV1.FetchCertificateAuthorityCsrResponse

    /// See `CertificateAuthorityServiceClient.getCertificateAuthority`.
    func getCertificateAuthority(request: GetCertificateAuthorityRequest) async throws
      -> GoogleCloudSecurityPrivateCAV1.CertificateAuthority

    /// See `CertificateAuthorityServiceClient.getCertificateAuthority`.
    func getCertificateAuthority(
      name: Swift.String,
    ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateAuthority

    /// See `CertificateAuthorityServiceClient.listCertificateAuthorities`.
    func listCertificateAuthorities(request: ListCertificateAuthoritiesRequest) async throws
      -> GoogleCloudSecurityPrivateCAV1.ListCertificateAuthoritiesResponse

    /// See `CertificateAuthorityServiceClient.listCertificateAuthorities`.
    func listCertificateAuthorities(
      byItem: ListCertificateAuthoritiesRequest
    ) throws -> any AsyncSequence<CertificateAuthority, Swift.Error>

    /// See `CertificateAuthorityServiceClient.listCertificateAuthorities`.
    func listCertificateAuthorities(
      parent: Swift.String,
    ) throws -> any AsyncSequence<CertificateAuthority, Swift.Error>

    /// See `CertificateAuthorityServiceClient.undeleteCertificateAuthority`.
    func undeleteCertificateAuthority(request: UndeleteCertificateAuthorityRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.undeleteCertificateAuthority`.
    func undeleteCertificateAuthority(withPolling: UndeleteCertificateAuthorityRequest) async throws
      -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.undeleteCertificateAuthority`.
    func undeleteCertificateAuthority(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.deleteCertificateAuthority`.
    func deleteCertificateAuthority(request: DeleteCertificateAuthorityRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.deleteCertificateAuthority`.
    func deleteCertificateAuthority(withPolling: DeleteCertificateAuthorityRequest) async throws
      -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.deleteCertificateAuthority`.
    func deleteCertificateAuthority(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.updateCertificateAuthority`.
    func updateCertificateAuthority(request: UpdateCertificateAuthorityRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.updateCertificateAuthority`.
    func updateCertificateAuthority(withPolling: UpdateCertificateAuthorityRequest) async throws
      -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.updateCertificateAuthority`.
    func updateCertificateAuthority(
      certificateAuthority: CertificateAuthority?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.createCaPool`.
    func createCaPool(request: CreateCaPoolRequest) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.createCaPool`.
    func createCaPool(withPolling: CreateCaPoolRequest) async throws -> any GoogleCloudGax
      .PollableOperation<CaPool>

    /// See `CertificateAuthorityServiceClient.createCaPool`.
    func createCaPool(
      parent: Swift.String,
      caPool: CaPool?,
      caPoolId: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<CaPool>

    /// See `CertificateAuthorityServiceClient.updateCaPool`.
    func updateCaPool(request: UpdateCaPoolRequest) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.updateCaPool`.
    func updateCaPool(withPolling: UpdateCaPoolRequest) async throws -> any GoogleCloudGax
      .PollableOperation<CaPool>

    /// See `CertificateAuthorityServiceClient.updateCaPool`.
    func updateCaPool(
      caPool: CaPool?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> any GoogleCloudGax.PollableOperation<CaPool>

    /// See `CertificateAuthorityServiceClient.getCaPool`.
    func getCaPool(request: GetCaPoolRequest) async throws -> GoogleCloudSecurityPrivateCAV1.CaPool

    /// See `CertificateAuthorityServiceClient.getCaPool`.
    func getCaPool(
      name: Swift.String,
    ) async throws -> GoogleCloudSecurityPrivateCAV1.CaPool

    /// See `CertificateAuthorityServiceClient.listCaPools`.
    func listCaPools(request: ListCaPoolsRequest) async throws
      -> GoogleCloudSecurityPrivateCAV1.ListCaPoolsResponse

    /// See `CertificateAuthorityServiceClient.listCaPools`.
    func listCaPools(
      byItem: ListCaPoolsRequest
    ) throws -> any AsyncSequence<CaPool, Swift.Error>

    /// See `CertificateAuthorityServiceClient.listCaPools`.
    func listCaPools(
      parent: Swift.String,
    ) throws -> any AsyncSequence<CaPool, Swift.Error>

    /// See `CertificateAuthorityServiceClient.deleteCaPool`.
    func deleteCaPool(request: DeleteCaPoolRequest) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.deleteCaPool`.
    func deleteCaPool(withPolling: DeleteCaPoolRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

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

    /// See `CertificateAuthorityServiceClient.fetchCaCerts`.
    func fetchCaCerts(request: FetchCaCertsRequest) async throws
      -> GoogleCloudSecurityPrivateCAV1.FetchCaCertsResponse

    /// See `CertificateAuthorityServiceClient.fetchCaCerts`.
    func fetchCaCerts(
      caPool: Swift.String,
    ) async throws -> GoogleCloudSecurityPrivateCAV1.FetchCaCertsResponse

    /// See `CertificateAuthorityServiceClient.getCertificateRevocationList`.
    func getCertificateRevocationList(request: GetCertificateRevocationListRequest) async throws
      -> GoogleCloudSecurityPrivateCAV1.CertificateRevocationList

    /// See `CertificateAuthorityServiceClient.getCertificateRevocationList`.
    func getCertificateRevocationList(
      name: Swift.String,
    ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateRevocationList

    /// See `CertificateAuthorityServiceClient.listCertificateRevocationLists`.
    func listCertificateRevocationLists(request: ListCertificateRevocationListsRequest) async throws
      -> GoogleCloudSecurityPrivateCAV1.ListCertificateRevocationListsResponse

    /// See `CertificateAuthorityServiceClient.listCertificateRevocationLists`.
    func listCertificateRevocationLists(
      byItem: ListCertificateRevocationListsRequest
    ) throws -> any AsyncSequence<CertificateRevocationList, Swift.Error>

    /// See `CertificateAuthorityServiceClient.listCertificateRevocationLists`.
    func listCertificateRevocationLists(
      parent: Swift.String,
    ) throws -> any AsyncSequence<CertificateRevocationList, Swift.Error>

    /// See `CertificateAuthorityServiceClient.updateCertificateRevocationList`.
    func updateCertificateRevocationList(request: UpdateCertificateRevocationListRequest)
      async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.updateCertificateRevocationList`.
    func updateCertificateRevocationList(withPolling: UpdateCertificateRevocationListRequest)
      async throws -> any GoogleCloudGax.PollableOperation<CertificateRevocationList>

    /// See `CertificateAuthorityServiceClient.updateCertificateRevocationList`.
    func updateCertificateRevocationList(
      certificateRevocationList: CertificateRevocationList?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateRevocationList>

    /// See `CertificateAuthorityServiceClient.createCertificateTemplate`.
    func createCertificateTemplate(request: CreateCertificateTemplateRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.createCertificateTemplate`.
    func createCertificateTemplate(withPolling: CreateCertificateTemplateRequest) async throws
      -> any GoogleCloudGax.PollableOperation<CertificateTemplate>

    /// See `CertificateAuthorityServiceClient.createCertificateTemplate`.
    func createCertificateTemplate(
      parent: Swift.String,
      certificateTemplate: CertificateTemplate?,
      certificateTemplateId: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateTemplate>

    /// See `CertificateAuthorityServiceClient.deleteCertificateTemplate`.
    func deleteCertificateTemplate(request: DeleteCertificateTemplateRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.deleteCertificateTemplate`.
    func deleteCertificateTemplate(withPolling: DeleteCertificateTemplateRequest) async throws
      -> any GoogleCloudGax.PollableOperation<Void>

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

    /// See `CertificateAuthorityServiceClient.getCertificateTemplate`.
    func getCertificateTemplate(request: GetCertificateTemplateRequest) async throws
      -> GoogleCloudSecurityPrivateCAV1.CertificateTemplate

    /// See `CertificateAuthorityServiceClient.getCertificateTemplate`.
    func getCertificateTemplate(
      name: Swift.String,
    ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateTemplate

    /// See `CertificateAuthorityServiceClient.listCertificateTemplates`.
    func listCertificateTemplates(request: ListCertificateTemplatesRequest) async throws
      -> GoogleCloudSecurityPrivateCAV1.ListCertificateTemplatesResponse

    /// See `CertificateAuthorityServiceClient.listCertificateTemplates`.
    func listCertificateTemplates(
      byItem: ListCertificateTemplatesRequest
    ) throws -> any AsyncSequence<CertificateTemplate, Swift.Error>

    /// See `CertificateAuthorityServiceClient.listCertificateTemplates`.
    func listCertificateTemplates(
      parent: Swift.String,
    ) throws -> any AsyncSequence<CertificateTemplate, Swift.Error>

    /// See `CertificateAuthorityServiceClient.updateCertificateTemplate`.
    func updateCertificateTemplate(request: UpdateCertificateTemplateRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.updateCertificateTemplate`.
    func updateCertificateTemplate(withPolling: UpdateCertificateTemplateRequest) async throws
      -> any GoogleCloudGax.PollableOperation<CertificateTemplate>

    /// See `CertificateAuthorityServiceClient.updateCertificateTemplate`.
    func updateCertificateTemplate(
      certificateTemplate: CertificateTemplate?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateTemplate>

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

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

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

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

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

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

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

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

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

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

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

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

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

    /// See `CertificateAuthorityServiceClient.createCertificate`.
    func createCertificate(
      request: CreateCertificateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudSecurityPrivateCAV1.Certificate

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

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

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

    /// See `CertificateAuthorityServiceClient.revokeCertificate`.
    func revokeCertificate(
      request: RevokeCertificateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudSecurityPrivateCAV1.Certificate

    /// See `CertificateAuthorityServiceClient.updateCertificate`.
    func updateCertificate(
      request: UpdateCertificateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudSecurityPrivateCAV1.Certificate

    /// See `CertificateAuthorityServiceClient.activateCertificateAuthority`.
    func activateCertificateAuthority(
      request: ActivateCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.activateCertificateAuthority`.
    func activateCertificateAuthority(
      withPolling: ActivateCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.createCertificateAuthority`.
    func createCertificateAuthority(
      request: CreateCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.createCertificateAuthority`.
    func createCertificateAuthority(
      withPolling: CreateCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.disableCertificateAuthority`.
    func disableCertificateAuthority(
      request: DisableCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.disableCertificateAuthority`.
    func disableCertificateAuthority(
      withPolling: DisableCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.enableCertificateAuthority`.
    func enableCertificateAuthority(
      request: EnableCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.enableCertificateAuthority`.
    func enableCertificateAuthority(
      withPolling: EnableCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.fetchCertificateAuthorityCsr`.
    func fetchCertificateAuthorityCsr(
      request: FetchCertificateAuthorityCsrRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudSecurityPrivateCAV1.FetchCertificateAuthorityCsrResponse

    /// See `CertificateAuthorityServiceClient.getCertificateAuthority`.
    func getCertificateAuthority(
      request: GetCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateAuthority

    /// See `CertificateAuthorityServiceClient.listCertificateAuthorities`.
    func listCertificateAuthorities(
      request: ListCertificateAuthoritiesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudSecurityPrivateCAV1.ListCertificateAuthoritiesResponse

    /// See `CertificateAuthorityServiceClient.listCertificateAuthorities`.
    func listCertificateAuthorities(
      byItem: ListCertificateAuthoritiesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<CertificateAuthority, Swift.Error>

    /// See `CertificateAuthorityServiceClient.undeleteCertificateAuthority`.
    func undeleteCertificateAuthority(
      request: UndeleteCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.undeleteCertificateAuthority`.
    func undeleteCertificateAuthority(
      withPolling: UndeleteCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.deleteCertificateAuthority`.
    func deleteCertificateAuthority(
      request: DeleteCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.deleteCertificateAuthority`.
    func deleteCertificateAuthority(
      withPolling: DeleteCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.updateCertificateAuthority`.
    func updateCertificateAuthority(
      request: UpdateCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.updateCertificateAuthority`.
    func updateCertificateAuthority(
      withPolling: UpdateCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>

    /// See `CertificateAuthorityServiceClient.createCaPool`.
    func createCaPool(
      request: CreateCaPoolRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.createCaPool`.
    func createCaPool(
      withPolling: CreateCaPoolRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CaPool>

    /// See `CertificateAuthorityServiceClient.updateCaPool`.
    func updateCaPool(
      request: UpdateCaPoolRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.updateCaPool`.
    func updateCaPool(
      withPolling: UpdateCaPoolRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CaPool>

    /// See `CertificateAuthorityServiceClient.getCaPool`.
    func getCaPool(
      request: GetCaPoolRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudSecurityPrivateCAV1.CaPool

    /// See `CertificateAuthorityServiceClient.listCaPools`.
    func listCaPools(
      request: ListCaPoolsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudSecurityPrivateCAV1.ListCaPoolsResponse

    /// See `CertificateAuthorityServiceClient.listCaPools`.
    func listCaPools(
      byItem: ListCaPoolsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<CaPool, Swift.Error>

    /// See `CertificateAuthorityServiceClient.deleteCaPool`.
    func deleteCaPool(
      request: DeleteCaPoolRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.deleteCaPool`.
    func deleteCaPool(
      withPolling: DeleteCaPoolRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `CertificateAuthorityServiceClient.fetchCaCerts`.
    func fetchCaCerts(
      request: FetchCaCertsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudSecurityPrivateCAV1.FetchCaCertsResponse

    /// See `CertificateAuthorityServiceClient.getCertificateRevocationList`.
    func getCertificateRevocationList(
      request: GetCertificateRevocationListRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateRevocationList

    /// See `CertificateAuthorityServiceClient.listCertificateRevocationLists`.
    func listCertificateRevocationLists(
      request: ListCertificateRevocationListsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudSecurityPrivateCAV1.ListCertificateRevocationListsResponse

    /// See `CertificateAuthorityServiceClient.listCertificateRevocationLists`.
    func listCertificateRevocationLists(
      byItem: ListCertificateRevocationListsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<CertificateRevocationList, Swift.Error>

    /// See `CertificateAuthorityServiceClient.updateCertificateRevocationList`.
    func updateCertificateRevocationList(
      request: UpdateCertificateRevocationListRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.updateCertificateRevocationList`.
    func updateCertificateRevocationList(
      withPolling: UpdateCertificateRevocationListRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateRevocationList>

    /// See `CertificateAuthorityServiceClient.createCertificateTemplate`.
    func createCertificateTemplate(
      request: CreateCertificateTemplateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.createCertificateTemplate`.
    func createCertificateTemplate(
      withPolling: CreateCertificateTemplateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateTemplate>

    /// See `CertificateAuthorityServiceClient.deleteCertificateTemplate`.
    func deleteCertificateTemplate(
      request: DeleteCertificateTemplateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.deleteCertificateTemplate`.
    func deleteCertificateTemplate(
      withPolling: DeleteCertificateTemplateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `CertificateAuthorityServiceClient.getCertificateTemplate`.
    func getCertificateTemplate(
      request: GetCertificateTemplateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateTemplate

    /// See `CertificateAuthorityServiceClient.listCertificateTemplates`.
    func listCertificateTemplates(
      request: ListCertificateTemplatesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudSecurityPrivateCAV1.ListCertificateTemplatesResponse

    /// See `CertificateAuthorityServiceClient.listCertificateTemplates`.
    func listCertificateTemplates(
      byItem: ListCertificateTemplatesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<CertificateTemplate, Swift.Error>

    /// See `CertificateAuthorityServiceClient.updateCertificateTemplate`.
    func updateCertificateTemplate(
      request: UpdateCertificateTemplateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CertificateAuthorityServiceClient.updateCertificateTemplate`.
    func updateCertificateTemplate(
      withPolling: UpdateCertificateTemplateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<CertificateTemplate>

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

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

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

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

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

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

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

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

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

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

// Default implementations
extension Clients.CertificateAuthorityServiceProtocol {
  public func createCertificate(request: CreateCertificateRequest) async throws
    -> GoogleCloudSecurityPrivateCAV1.Certificate
  {
    try await self.createCertificate(request: request, options: .init())
  }

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

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

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

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

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

  public func listCertificates(request: ListCertificatesRequest) async throws
    -> GoogleCloudSecurityPrivateCAV1.ListCertificatesResponse
  {
    try await self.listCertificates(request: request, options: .init())
  }

  public func listCertificates(
    request: ListCertificatesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.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 -> GoogleCloudSecurityPrivateCAV1.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 revokeCertificate(request: RevokeCertificateRequest) async throws
    -> GoogleCloudSecurityPrivateCAV1.Certificate
  {
    try await self.revokeCertificate(request: request, options: .init())
  }

  public func revokeCertificate(
    request: RevokeCertificateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.Certificate {
    throw GoogleCloudGax.RequestError.unimplemented
  }

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

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

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

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

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

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

  public func activateCertificateAuthority(withPolling: ActivateCertificateAuthorityRequest)
    async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>
  {
    try await self.activateCertificateAuthority(withPolling: withPolling, options: .init())
  }

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

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

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

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

  public func createCertificateAuthority(withPolling: CreateCertificateAuthorityRequest)
    async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>
  {
    try await self.createCertificateAuthority(withPolling: withPolling, options: .init())
  }

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

  public func createCertificateAuthority(
    parent: Swift.String,
    certificateAuthority: CertificateAuthority?,
    certificateAuthorityId: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority> {
    let request = CreateCertificateAuthorityRequest().with {
      $0.parent = parent
      $0.certificateAuthority = certificateAuthority
      $0.certificateAuthorityId = certificateAuthorityId
    }
    return try await self.createCertificateAuthority(withPolling: request)
  }

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

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

  public func disableCertificateAuthority(withPolling: DisableCertificateAuthorityRequest)
    async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>
  {
    try await self.disableCertificateAuthority(withPolling: withPolling, options: .init())
  }

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

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

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

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

  public func enableCertificateAuthority(withPolling: EnableCertificateAuthorityRequest)
    async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>
  {
    try await self.enableCertificateAuthority(withPolling: withPolling, options: .init())
  }

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

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

  public func fetchCertificateAuthorityCsr(request: FetchCertificateAuthorityCsrRequest)
    async throws -> GoogleCloudSecurityPrivateCAV1.FetchCertificateAuthorityCsrResponse
  {
    try await self.fetchCertificateAuthorityCsr(request: request, options: .init())
  }

  public func fetchCertificateAuthorityCsr(
    request: FetchCertificateAuthorityCsrRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.FetchCertificateAuthorityCsrResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func fetchCertificateAuthorityCsr(
    name: Swift.String,
  ) async throws -> GoogleCloudSecurityPrivateCAV1.FetchCertificateAuthorityCsrResponse {
    let request = FetchCertificateAuthorityCsrRequest().with {
      $0.name = name
    }
    return try await self.fetchCertificateAuthorityCsr(request: request)
  }

  public func getCertificateAuthority(request: GetCertificateAuthorityRequest) async throws
    -> GoogleCloudSecurityPrivateCAV1.CertificateAuthority
  {
    try await self.getCertificateAuthority(request: request, options: .init())
  }

  public func getCertificateAuthority(
    request: GetCertificateAuthorityRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateAuthority {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getCertificateAuthority(
    name: Swift.String,
  ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateAuthority {
    let request = GetCertificateAuthorityRequest().with {
      $0.name = name
    }
    return try await self.getCertificateAuthority(request: request)
  }

  public func listCertificateAuthorities(request: ListCertificateAuthoritiesRequest) async throws
    -> GoogleCloudSecurityPrivateCAV1.ListCertificateAuthoritiesResponse
  {
    try await self.listCertificateAuthorities(request: request, options: .init())
  }

  public func listCertificateAuthorities(
    request: ListCertificateAuthoritiesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.ListCertificateAuthoritiesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listCertificateAuthorities(
    byItem: ListCertificateAuthoritiesRequest
  ) throws -> any AsyncSequence<CertificateAuthority, Swift.Error> {
    try self.listCertificateAuthorities(byItem: byItem, options: .init())
  }

  public func listCertificateAuthorities(
    byItem: ListCertificateAuthoritiesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<CertificateAuthority, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudSecurityPrivateCAV1.ListCertificateAuthoritiesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

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

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

  public func undeleteCertificateAuthority(withPolling: UndeleteCertificateAuthorityRequest)
    async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>
  {
    try await self.undeleteCertificateAuthority(withPolling: withPolling, options: .init())
  }

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

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

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

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

  public func deleteCertificateAuthority(withPolling: DeleteCertificateAuthorityRequest)
    async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>
  {
    try await self.deleteCertificateAuthority(withPolling: withPolling, options: .init())
  }

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

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

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

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

  public func updateCertificateAuthority(withPolling: UpdateCertificateAuthorityRequest)
    async throws -> any GoogleCloudGax.PollableOperation<CertificateAuthority>
  {
    try await self.updateCertificateAuthority(withPolling: withPolling, options: .init())
  }

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

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

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

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

  public func createCaPool(withPolling: CreateCaPoolRequest) async throws -> any GoogleCloudGax
    .PollableOperation<CaPool>
  {
    try await self.createCaPool(withPolling: withPolling, options: .init())
  }

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

  public func createCaPool(
    parent: Swift.String,
    caPool: CaPool?,
    caPoolId: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<CaPool> {
    let request = CreateCaPoolRequest().with {
      $0.parent = parent
      $0.caPool = caPool
      $0.caPoolId = caPoolId
    }
    return try await self.createCaPool(withPolling: request)
  }

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

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

  public func updateCaPool(withPolling: UpdateCaPoolRequest) async throws -> any GoogleCloudGax
    .PollableOperation<CaPool>
  {
    try await self.updateCaPool(withPolling: withPolling, options: .init())
  }

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

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

  public func getCaPool(request: GetCaPoolRequest) async throws
    -> GoogleCloudSecurityPrivateCAV1.CaPool
  {
    try await self.getCaPool(request: request, options: .init())
  }

  public func getCaPool(
    request: GetCaPoolRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.CaPool {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getCaPool(
    name: Swift.String,
  ) async throws -> GoogleCloudSecurityPrivateCAV1.CaPool {
    let request = GetCaPoolRequest().with {
      $0.name = name
    }
    return try await self.getCaPool(request: request)
  }

  public func listCaPools(request: ListCaPoolsRequest) async throws
    -> GoogleCloudSecurityPrivateCAV1.ListCaPoolsResponse
  {
    try await self.listCaPools(request: request, options: .init())
  }

  public func listCaPools(
    request: ListCaPoolsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.ListCaPoolsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listCaPools(
    byItem: ListCaPoolsRequest
  ) throws -> any AsyncSequence<CaPool, Swift.Error> {
    try self.listCaPools(byItem: byItem, options: .init())
  }

  public func listCaPools(
    byItem: ListCaPoolsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<CaPool, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudSecurityPrivateCAV1.ListCaPoolsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

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

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

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

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

  public func fetchCaCerts(request: FetchCaCertsRequest) async throws
    -> GoogleCloudSecurityPrivateCAV1.FetchCaCertsResponse
  {
    try await self.fetchCaCerts(request: request, options: .init())
  }

  public func fetchCaCerts(
    request: FetchCaCertsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.FetchCaCertsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func fetchCaCerts(
    caPool: Swift.String,
  ) async throws -> GoogleCloudSecurityPrivateCAV1.FetchCaCertsResponse {
    let request = FetchCaCertsRequest().with {
      $0.caPool = caPool
    }
    return try await self.fetchCaCerts(request: request)
  }

  public func getCertificateRevocationList(request: GetCertificateRevocationListRequest)
    async throws -> GoogleCloudSecurityPrivateCAV1.CertificateRevocationList
  {
    try await self.getCertificateRevocationList(request: request, options: .init())
  }

  public func getCertificateRevocationList(
    request: GetCertificateRevocationListRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateRevocationList {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getCertificateRevocationList(
    name: Swift.String,
  ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateRevocationList {
    let request = GetCertificateRevocationListRequest().with {
      $0.name = name
    }
    return try await self.getCertificateRevocationList(request: request)
  }

  public func listCertificateRevocationLists(request: ListCertificateRevocationListsRequest)
    async throws -> GoogleCloudSecurityPrivateCAV1.ListCertificateRevocationListsResponse
  {
    try await self.listCertificateRevocationLists(request: request, options: .init())
  }

  public func listCertificateRevocationLists(
    request: ListCertificateRevocationListsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.ListCertificateRevocationListsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listCertificateRevocationLists(
    byItem: ListCertificateRevocationListsRequest
  ) throws -> any AsyncSequence<CertificateRevocationList, Swift.Error> {
    try self.listCertificateRevocationLists(byItem: byItem, options: .init())
  }

  public func listCertificateRevocationLists(
    byItem: ListCertificateRevocationListsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<CertificateRevocationList, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudSecurityPrivateCAV1.ListCertificateRevocationListsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

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

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

  public func updateCertificateRevocationList(withPolling: UpdateCertificateRevocationListRequest)
    async throws -> any GoogleCloudGax.PollableOperation<CertificateRevocationList>
  {
    try await self.updateCertificateRevocationList(withPolling: withPolling, options: .init())
  }

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

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

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

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

  public func createCertificateTemplate(withPolling: CreateCertificateTemplateRequest) async throws
    -> any GoogleCloudGax.PollableOperation<CertificateTemplate>
  {
    try await self.createCertificateTemplate(withPolling: withPolling, options: .init())
  }

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

  public func createCertificateTemplate(
    parent: Swift.String,
    certificateTemplate: CertificateTemplate?,
    certificateTemplateId: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateTemplate> {
    let request = CreateCertificateTemplateRequest().with {
      $0.parent = parent
      $0.certificateTemplate = certificateTemplate
      $0.certificateTemplateId = certificateTemplateId
    }
    return try await self.createCertificateTemplate(withPolling: request)
  }

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

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

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

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

  public func getCertificateTemplate(request: GetCertificateTemplateRequest) async throws
    -> GoogleCloudSecurityPrivateCAV1.CertificateTemplate
  {
    try await self.getCertificateTemplate(request: request, options: .init())
  }

  public func getCertificateTemplate(
    request: GetCertificateTemplateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateTemplate {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getCertificateTemplate(
    name: Swift.String,
  ) async throws -> GoogleCloudSecurityPrivateCAV1.CertificateTemplate {
    let request = GetCertificateTemplateRequest().with {
      $0.name = name
    }
    return try await self.getCertificateTemplate(request: request)
  }

  public func listCertificateTemplates(request: ListCertificateTemplatesRequest) async throws
    -> GoogleCloudSecurityPrivateCAV1.ListCertificateTemplatesResponse
  {
    try await self.listCertificateTemplates(request: request, options: .init())
  }

  public func listCertificateTemplates(
    request: ListCertificateTemplatesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudSecurityPrivateCAV1.ListCertificateTemplatesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listCertificateTemplates(
    byItem: ListCertificateTemplatesRequest
  ) throws -> any AsyncSequence<CertificateTemplate, Swift.Error> {
    try self.listCertificateTemplates(byItem: byItem, options: .init())
  }

  public func listCertificateTemplates(
    byItem: ListCertificateTemplatesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<CertificateTemplate, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudSecurityPrivateCAV1.ListCertificateTemplatesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

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

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

  public func updateCertificateTemplate(withPolling: UpdateCertificateTemplateRequest) async throws
    -> any GoogleCloudGax.PollableOperation<CertificateTemplate>
  {
    try await self.updateCertificateTemplate(withPolling: withPolling, options: .init())
  }

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

  public func updateCertificateTemplate(
    certificateTemplate: CertificateTemplate?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> any GoogleCloudGax.PollableOperation<CertificateTemplate> {
    let request = UpdateCertificateTemplateRequest().with {
      $0.certificateTemplate = certificateTemplate
      $0.updateMask = updateMask
    }
    return try await self.updateCertificateTemplate(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 setIamPolicy(request: GoogleIAMV1.SetIamPolicyRequest) async throws
    -> GoogleIAMV1.Policy
  {
    try await self.setIamPolicy(request: request, options: .init())
  }

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

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

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

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

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

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