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

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

/// Provides natural language translation operations.
///
/// @Snippet(path: "TranslationServiceQuickstart")
public class TranslationServiceClient: Clients.TranslationServiceProtocol {
  let inner: any Clients.TranslationServiceStub
  let pollingErrorPolicy: GoogleCloudGax.PollingErrorPolicy
  let pollingBackoffPolicy: GoogleCloudGax.BackoffPolicy

  /// Creates a new `TranslationServiceClient` instance.
  public init(_ options: GoogleCloudGax.ClientOptions = .init()) throws {
    var inner: any Clients.TranslationServiceStub = try Clients.TranslationServiceTransport(options)
    inner = Clients.TranslationServiceRetry(inner, options: options)
    if let logger = options.logger {
      inner = Clients.TranslationServiceLogging(inner, logger: logger)
    }
    self.inner = inner
    self.pollingErrorPolicy = options.pollingErrorPolicy
    self.pollingBackoffPolicy = options.pollingBackoffPolicy
  }

  /// Translates input text and returns translated text.
  ///
  /// @Snippet(path: "TranslationService_TranslateText")
  public func translateText(
    request: TranslateTextRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.TranslateTextResponse {
    try await self.inner.translateText(request: request, options: options)
  }

  /// Romanize input text written in non-Latin scripts to Latin text.
  ///
  /// @Snippet(path: "TranslationService_RomanizeText")
  public func romanizeText(
    request: RomanizeTextRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.RomanizeTextResponse {
    try await self.inner.romanizeText(request: request, options: options)
  }

  /// Detects the language of text within a request.
  ///
  /// @Snippet(path: "TranslationService_DetectLanguage")
  public func detectLanguage(
    request: DetectLanguageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.DetectLanguageResponse {
    try await self.inner.detectLanguage(request: request, options: options)
  }

  /// Returns a list of supported languages for translation.
  ///
  /// @Snippet(path: "TranslationService_GetSupportedLanguages")
  public func getSupportedLanguages(
    request: GetSupportedLanguagesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.SupportedLanguages {
    try await self.inner.getSupportedLanguages(request: request, options: options)
  }

  /// Translates documents in synchronous mode.
  ///
  /// @Snippet(path: "TranslationService_TranslateDocument")
  public func translateDocument(
    request: TranslateDocumentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.TranslateDocumentResponse {
    try await self.inner.translateDocument(request: request, options: options)
  }

  /// Translates a large volume of text in asynchronous batch mode.
  /// This function provides real-time output as the inputs are being processed.
  /// If caller cancels a request, the partial results (for an input file, it's
  /// all or nothing) may still be available on the specified output location.
  ///
  /// This call returns immediately and you can
  /// use google.longrunning.Operation.name to poll the status of the call.
  ///
  /// @Snippet(path: "TranslationService_BatchTranslateText")
  public func batchTranslateText(
    request: BatchTranslateTextRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.batchTranslateText(request: request, options: options)
  }

  /// Translates a large volume of text in asynchronous batch mode.
  /// This function provides real-time output as the inputs are being processed.
  /// If caller cancels a request, the partial results (for an input file, it's
  /// all or nothing) may still be available on the specified output location.
  ///
  /// This call returns immediately and you can
  /// use google.longrunning.Operation.name to poll the status of the call.
  ///
  /// @Snippet(path: "TranslationService_BatchTranslateText")
  public func batchTranslateText(
    withPolling: BatchTranslateTextRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<BatchTranslateResponse> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<BatchTranslateResponse>.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 BatchTranslateResponse(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.batchTranslateText(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<BatchTranslateResponse>.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,
    )
  }

  /// Translates a large volume of document in asynchronous batch mode.
  /// This function provides real-time output as the inputs are being processed.
  /// If caller cancels a request, the partial results (for an input file, it's
  /// all or nothing) may still be available on the specified output location.
  ///
  /// This call returns immediately and you can use
  /// google.longrunning.Operation.name to poll the status of the call.
  ///
  /// @Snippet(path: "TranslationService_BatchTranslateDocument")
  public func batchTranslateDocument(
    request: BatchTranslateDocumentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.batchTranslateDocument(request: request, options: options)
  }

  /// Translates a large volume of document in asynchronous batch mode.
  /// This function provides real-time output as the inputs are being processed.
  /// If caller cancels a request, the partial results (for an input file, it's
  /// all or nothing) may still be available on the specified output location.
  ///
  /// This call returns immediately and you can use
  /// google.longrunning.Operation.name to poll the status of the call.
  ///
  /// @Snippet(path: "TranslationService_BatchTranslateDocument")
  public func batchTranslateDocument(
    withPolling: BatchTranslateDocumentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<BatchTranslateDocumentResponse> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<BatchTranslateDocumentResponse>.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 BatchTranslateDocumentResponse(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.batchTranslateDocument(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<BatchTranslateDocumentResponse>.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,
    )
  }

  /// Creates a glossary and returns the long-running operation. Returns
  /// NOT_FOUND, if the project doesn't exist.
  ///
  /// @Snippet(path: "TranslationService_CreateGlossary")
  public func createGlossary(
    request: CreateGlossaryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createGlossary(request: request, options: options)
  }

  /// Creates a glossary and returns the long-running operation. Returns
  /// NOT_FOUND, if the project doesn't exist.
  ///
  /// @Snippet(path: "TranslationService_CreateGlossary")
  public func createGlossary(
    withPolling: CreateGlossaryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Glossary> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<Glossary>.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 Glossary(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.createGlossary(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Glossary>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Updates a glossary. A LRO is used since the update can be async if the
  /// glossary's entry file is updated.
  ///
  /// @Snippet(path: "TranslationService_UpdateGlossary")
  public func updateGlossary(
    request: UpdateGlossaryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateGlossary(request: request, options: options)
  }

  /// Updates a glossary. A LRO is used since the update can be async if the
  /// glossary's entry file is updated.
  ///
  /// @Snippet(path: "TranslationService_UpdateGlossary")
  public func updateGlossary(
    withPolling: UpdateGlossaryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Glossary> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<Glossary>.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 Glossary(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.updateGlossary(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Glossary>.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 glossaries in a project. Returns NOT_FOUND, if the project doesn't
  /// exist.
  ///
  /// @Snippet(path: "TranslationService_ListGlossaries")
  public func listGlossaries(
    request: ListGlossariesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListGlossariesResponse {
    try await self.inner.listGlossaries(request: request, options: options)
  }

  /// Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't
  /// exist.
  ///
  /// @Snippet(path: "TranslationService_ListGlossaries")
  public func listGlossaries(
    byItem: ListGlossariesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Glossary, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListGlossariesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listGlossaries(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets a glossary. Returns NOT_FOUND, if the glossary doesn't
  /// exist.
  ///
  /// @Snippet(path: "TranslationService_GetGlossary")
  public func getGlossary(
    request: GetGlossaryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.Glossary {
    try await self.inner.getGlossary(request: request, options: options)
  }

  /// Deletes a glossary, or cancels glossary construction
  /// if the glossary isn't created yet.
  /// Returns NOT_FOUND, if the glossary doesn't exist.
  ///
  /// @Snippet(path: "TranslationService_DeleteGlossary")
  public func deleteGlossary(
    request: DeleteGlossaryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteGlossary(request: request, options: options)
  }

  /// Deletes a glossary, or cancels glossary construction
  /// if the glossary isn't created yet.
  /// Returns NOT_FOUND, if the glossary doesn't exist.
  ///
  /// @Snippet(path: "TranslationService_DeleteGlossary")
  public func deleteGlossary(
    withPolling: DeleteGlossaryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<DeleteGlossaryResponse> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<DeleteGlossaryResponse>.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 DeleteGlossaryResponse(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.deleteGlossary(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<DeleteGlossaryResponse>.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,
    )
  }

  /// Gets a single glossary entry by the given id.
  ///
  /// @Snippet(path: "TranslationService_GetGlossaryEntry")
  public func getGlossaryEntry(
    request: GetGlossaryEntryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.GlossaryEntry {
    try await self.inner.getGlossaryEntry(request: request, options: options)
  }

  /// List the entries for the glossary.
  ///
  /// @Snippet(path: "TranslationService_ListGlossaryEntries")
  public func listGlossaryEntries(
    request: ListGlossaryEntriesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListGlossaryEntriesResponse {
    try await self.inner.listGlossaryEntries(request: request, options: options)
  }

  /// List the entries for the glossary.
  ///
  /// @Snippet(path: "TranslationService_ListGlossaryEntries")
  public func listGlossaryEntries(
    byItem: ListGlossaryEntriesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<GlossaryEntry, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListGlossaryEntriesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listGlossaryEntries(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Creates a glossary entry.
  ///
  /// @Snippet(path: "TranslationService_CreateGlossaryEntry")
  public func createGlossaryEntry(
    request: CreateGlossaryEntryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.GlossaryEntry {
    try await self.inner.createGlossaryEntry(request: request, options: options)
  }

  /// Updates a glossary entry.
  ///
  /// @Snippet(path: "TranslationService_UpdateGlossaryEntry")
  public func updateGlossaryEntry(
    request: UpdateGlossaryEntryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.GlossaryEntry {
    try await self.inner.updateGlossaryEntry(request: request, options: options)
  }

  /// Deletes a single entry from the glossary
  ///
  /// @Snippet(path: "TranslationService_DeleteGlossaryEntry")
  public func deleteGlossaryEntry(
    request: DeleteGlossaryEntryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.deleteGlossaryEntry(request: request, options: options)
  }

  /// Creates a Dataset.
  ///
  /// @Snippet(path: "TranslationService_CreateDataset")
  public func createDataset(
    request: CreateDatasetRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createDataset(request: request, options: options)
  }

  /// Creates a Dataset.
  ///
  /// @Snippet(path: "TranslationService_CreateDataset")
  public func createDataset(
    withPolling: CreateDatasetRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Dataset> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<Dataset>.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 Dataset(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.createDataset(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Dataset>.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,
    )
  }

  /// Gets a Dataset.
  ///
  /// @Snippet(path: "TranslationService_GetDataset")
  public func getDataset(
    request: GetDatasetRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.Dataset {
    try await self.inner.getDataset(request: request, options: options)
  }

  /// Lists datasets.
  ///
  /// @Snippet(path: "TranslationService_ListDatasets")
  public func listDatasets(
    request: ListDatasetsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListDatasetsResponse {
    try await self.inner.listDatasets(request: request, options: options)
  }

  /// Lists datasets.
  ///
  /// @Snippet(path: "TranslationService_ListDatasets")
  public func listDatasets(
    byItem: ListDatasetsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Dataset, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListDatasetsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listDatasets(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Deletes a dataset and all of its contents.
  ///
  /// @Snippet(path: "TranslationService_DeleteDataset")
  public func deleteDataset(
    request: DeleteDatasetRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteDataset(request: request, options: options)
  }

  /// Deletes a dataset and all of its contents.
  ///
  /// @Snippet(path: "TranslationService_DeleteDataset")
  public func deleteDataset(
    withPolling: DeleteDatasetRequest, 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.deleteDataset(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,
    )
  }

  /// Creates an Adaptive MT dataset.
  ///
  /// @Snippet(path: "TranslationService_CreateAdaptiveMtDataset")
  public func createAdaptiveMtDataset(
    request: CreateAdaptiveMtDatasetRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.AdaptiveMtDataset {
    try await self.inner.createAdaptiveMtDataset(request: request, options: options)
  }

  /// Deletes an Adaptive MT dataset, including all its entries and associated
  /// metadata.
  ///
  /// @Snippet(path: "TranslationService_DeleteAdaptiveMtDataset")
  public func deleteAdaptiveMtDataset(
    request: DeleteAdaptiveMtDatasetRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.deleteAdaptiveMtDataset(request: request, options: options)
  }

  /// Gets the Adaptive MT dataset.
  ///
  /// @Snippet(path: "TranslationService_GetAdaptiveMtDataset")
  public func getAdaptiveMtDataset(
    request: GetAdaptiveMtDatasetRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.AdaptiveMtDataset {
    try await self.inner.getAdaptiveMtDataset(request: request, options: options)
  }

  /// Lists all Adaptive MT datasets for which the caller has read permission.
  ///
  /// @Snippet(path: "TranslationService_ListAdaptiveMtDatasets")
  public func listAdaptiveMtDatasets(
    request: ListAdaptiveMtDatasetsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtDatasetsResponse {
    try await self.inner.listAdaptiveMtDatasets(request: request, options: options)
  }

  /// Lists all Adaptive MT datasets for which the caller has read permission.
  ///
  /// @Snippet(path: "TranslationService_ListAdaptiveMtDatasets")
  public func listAdaptiveMtDatasets(
    byItem: ListAdaptiveMtDatasetsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<AdaptiveMtDataset, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtDatasetsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listAdaptiveMtDatasets(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Translate text using Adaptive MT.
  ///
  /// @Snippet(path: "TranslationService_AdaptiveMtTranslate")
  public func adaptiveMtTranslate(
    request: AdaptiveMtTranslateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.AdaptiveMtTranslateResponse {
    try await self.inner.adaptiveMtTranslate(request: request, options: options)
  }

  /// Gets and AdaptiveMtFile
  ///
  /// @Snippet(path: "TranslationService_GetAdaptiveMtFile")
  public func getAdaptiveMtFile(
    request: GetAdaptiveMtFileRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.AdaptiveMtFile {
    try await self.inner.getAdaptiveMtFile(request: request, options: options)
  }

  /// Deletes an AdaptiveMtFile along with its sentences.
  ///
  /// @Snippet(path: "TranslationService_DeleteAdaptiveMtFile")
  public func deleteAdaptiveMtFile(
    request: DeleteAdaptiveMtFileRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.deleteAdaptiveMtFile(request: request, options: options)
  }

  /// Imports an AdaptiveMtFile and adds all of its sentences into the
  /// AdaptiveMtDataset.
  ///
  /// @Snippet(path: "TranslationService_ImportAdaptiveMtFile")
  public func importAdaptiveMtFile(
    request: ImportAdaptiveMtFileRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ImportAdaptiveMtFileResponse {
    try await self.inner.importAdaptiveMtFile(request: request, options: options)
  }

  /// Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.
  ///
  /// @Snippet(path: "TranslationService_ListAdaptiveMtFiles")
  public func listAdaptiveMtFiles(
    request: ListAdaptiveMtFilesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtFilesResponse {
    try await self.inner.listAdaptiveMtFiles(request: request, options: options)
  }

  /// Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.
  ///
  /// @Snippet(path: "TranslationService_ListAdaptiveMtFiles")
  public func listAdaptiveMtFiles(
    byItem: ListAdaptiveMtFilesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<AdaptiveMtFile, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtFilesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listAdaptiveMtFiles(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Lists all AdaptiveMtSentences under a given file/dataset.
  ///
  /// @Snippet(path: "TranslationService_ListAdaptiveMtSentences")
  public func listAdaptiveMtSentences(
    request: ListAdaptiveMtSentencesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtSentencesResponse {
    try await self.inner.listAdaptiveMtSentences(request: request, options: options)
  }

  /// Lists all AdaptiveMtSentences under a given file/dataset.
  ///
  /// @Snippet(path: "TranslationService_ListAdaptiveMtSentences")
  public func listAdaptiveMtSentences(
    byItem: ListAdaptiveMtSentencesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<AdaptiveMtSentence, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtSentencesResponse
      in
      var request = byItem
      request.pageToken = token
      return try await self.listAdaptiveMtSentences(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Import sentence pairs into translation Dataset.
  ///
  /// @Snippet(path: "TranslationService_ImportData")
  public func importData(
    request: ImportDataRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.importData(request: request, options: options)
  }

  /// Import sentence pairs into translation Dataset.
  ///
  /// @Snippet(path: "TranslationService_ImportData")
  public func importData(
    withPolling: ImportDataRequest, 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.importData(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Exports dataset's data to the provided output location.
  ///
  /// @Snippet(path: "TranslationService_ExportData")
  public func exportData(
    request: ExportDataRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.exportData(request: request, options: options)
  }

  /// Exports dataset's data to the provided output location.
  ///
  /// @Snippet(path: "TranslationService_ExportData")
  public func exportData(
    withPolling: ExportDataRequest, 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.exportData(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Lists sentence pairs in the dataset.
  ///
  /// @Snippet(path: "TranslationService_ListExamples")
  public func listExamples(
    request: ListExamplesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListExamplesResponse {
    try await self.inner.listExamples(request: request, options: options)
  }

  /// Lists sentence pairs in the dataset.
  ///
  /// @Snippet(path: "TranslationService_ListExamples")
  public func listExamples(
    byItem: ListExamplesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Example, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListExamplesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listExamples(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Creates a Model.
  ///
  /// @Snippet(path: "TranslationService_CreateModel")
  public func createModel(
    request: CreateModelRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createModel(request: request, options: options)
  }

  /// Creates a Model.
  ///
  /// @Snippet(path: "TranslationService_CreateModel")
  public func createModel(
    withPolling: CreateModelRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Model> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws -> GoogleCloudGax._PollableOperationImpl<Model>.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 Model(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.createModel(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Model>.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 models.
  ///
  /// @Snippet(path: "TranslationService_ListModels")
  public func listModels(
    request: ListModelsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListModelsResponse {
    try await self.inner.listModels(request: request, options: options)
  }

  /// Lists models.
  ///
  /// @Snippet(path: "TranslationService_ListModels")
  public func listModels(
    byItem: ListModelsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Model, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListModelsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listModels(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Gets a model.
  ///
  /// @Snippet(path: "TranslationService_GetModel")
  public func getModel(
    request: GetModelRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.Model {
    try await self.inner.getModel(request: request, options: options)
  }

  /// Deletes a model.
  ///
  /// @Snippet(path: "TranslationService_DeleteModel")
  public func deleteModel(
    request: DeleteModelRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteModel(request: request, options: options)
  }

  /// Deletes a model.
  ///
  /// @Snippet(path: "TranslationService_DeleteModel")
  public func deleteModel(
    withPolling: DeleteModelRequest, 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.deleteModel(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Void>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Lists information about the supported locations for this service.
  ///
  /// @Snippet(path: "TranslationService_ListLocations")
  public func listLocations(
    request: GoogleCloudLocation.ListLocationsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudLocation.ListLocationsResponse {
    try await self.inner.listLocations(request: request, options: options)
  }

  /// Lists information about the supported locations for this service.
  ///
  /// @Snippet(path: "TranslationService_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: "TranslationService_GetLocation")
  public func getLocation(
    request: GoogleCloudLocation.GetLocationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudLocation.Location {
    try await self.inner.getLocation(request: request, options: options)
  }

  /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
  ///
  /// [google.longrunning.Operations]: https://www.google.com/search?q=Swift+google.longrunning+Operations
  ///
  /// @Snippet(path: "TranslationService_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: "TranslationService_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: "TranslationService_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: "TranslationService_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: "TranslationService_CancelOperation")
  public func cancelOperation(
    request: GoogleLongRunning.CancelOperationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.cancelOperation(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: "TranslationService_WaitOperation")
  public func waitOperation(
    request: GoogleLongRunning.WaitOperationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.waitOperation(request: request, options: options)
  }
}

extension Clients {
  /// A Swift protocol to mock `TranslationServiceClient`.
  ///
  /// To mock `TranslationServiceClient` change your functions to receive
  /// `some TranslationServiceProtocol` or `any TranslationServiceProtocol`
  /// and pass a mock implementation in your tests.
  public protocol TranslationServiceProtocol {
    /// See `TranslationServiceClient.translateText`.
    func translateText(request: TranslateTextRequest) async throws
      -> GoogleCloudTranslateV3.TranslateTextResponse

    /// See `TranslationServiceClient.translateText`.
    func translateText(
      parent: Swift.String,
      targetLanguageCode: Swift.String,
      contents: [Swift.String],
    ) async throws -> GoogleCloudTranslateV3.TranslateTextResponse

    /// See `TranslationServiceClient.translateText`.
    func translateText(
      parent: Swift.String,
      model: Swift.String,
      mimeType: Swift.String,
      sourceLanguageCode: Swift.String,
      targetLanguageCode: Swift.String,
      contents: [Swift.String],
    ) async throws -> GoogleCloudTranslateV3.TranslateTextResponse

    /// See `TranslationServiceClient.romanizeText`.
    func romanizeText(request: RomanizeTextRequest) async throws
      -> GoogleCloudTranslateV3.RomanizeTextResponse

    /// See `TranslationServiceClient.romanizeText`.
    func romanizeText(
      parent: Swift.String,
      contents: [Swift.String],
    ) async throws -> GoogleCloudTranslateV3.RomanizeTextResponse

    /// See `TranslationServiceClient.detectLanguage`.
    func detectLanguage(request: DetectLanguageRequest) async throws
      -> GoogleCloudTranslateV3.DetectLanguageResponse

    /// See `TranslationServiceClient.detectLanguage`.
    func detectLanguage(
      parent: Swift.String,
      model: Swift.String,
      mimeType: Swift.String,
      content: Swift.String,
    ) async throws -> GoogleCloudTranslateV3.DetectLanguageResponse

    /// See `TranslationServiceClient.getSupportedLanguages`.
    func getSupportedLanguages(request: GetSupportedLanguagesRequest) async throws
      -> GoogleCloudTranslateV3.SupportedLanguages

    /// See `TranslationServiceClient.getSupportedLanguages`.
    func getSupportedLanguages(
      parent: Swift.String,
      model: Swift.String,
      displayLanguageCode: Swift.String,
    ) async throws -> GoogleCloudTranslateV3.SupportedLanguages

    /// See `TranslationServiceClient.translateDocument`.
    func translateDocument(request: TranslateDocumentRequest) async throws
      -> GoogleCloudTranslateV3.TranslateDocumentResponse

    /// See `TranslationServiceClient.batchTranslateText`.
    func batchTranslateText(request: BatchTranslateTextRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.batchTranslateText`.
    func batchTranslateText(withPolling: BatchTranslateTextRequest) async throws
      -> any GoogleCloudGax.PollableOperation<BatchTranslateResponse>

    /// See `TranslationServiceClient.batchTranslateDocument`.
    func batchTranslateDocument(request: BatchTranslateDocumentRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.batchTranslateDocument`.
    func batchTranslateDocument(withPolling: BatchTranslateDocumentRequest) async throws
      -> any GoogleCloudGax.PollableOperation<BatchTranslateDocumentResponse>

    /// See `TranslationServiceClient.batchTranslateDocument`.
    func batchTranslateDocument(
      parent: Swift.String,
      sourceLanguageCode: Swift.String,
      targetLanguageCodes: [Swift.String],
      inputConfigs: [BatchDocumentInputConfig],
      outputConfig: BatchDocumentOutputConfig?,
    ) async throws -> any GoogleCloudGax.PollableOperation<BatchTranslateDocumentResponse>

    /// See `TranslationServiceClient.createGlossary`.
    func createGlossary(request: CreateGlossaryRequest) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.createGlossary`.
    func createGlossary(withPolling: CreateGlossaryRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Glossary>

    /// See `TranslationServiceClient.createGlossary`.
    func createGlossary(
      parent: Swift.String,
      glossary: Glossary?,
    ) async throws -> any GoogleCloudGax.PollableOperation<Glossary>

    /// See `TranslationServiceClient.updateGlossary`.
    func updateGlossary(request: UpdateGlossaryRequest) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.updateGlossary`.
    func updateGlossary(withPolling: UpdateGlossaryRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Glossary>

    /// See `TranslationServiceClient.updateGlossary`.
    func updateGlossary(
      glossary: Glossary?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> any GoogleCloudGax.PollableOperation<Glossary>

    /// See `TranslationServiceClient.listGlossaries`.
    func listGlossaries(request: ListGlossariesRequest) async throws
      -> GoogleCloudTranslateV3.ListGlossariesResponse

    /// See `TranslationServiceClient.listGlossaries`.
    func listGlossaries(
      byItem: ListGlossariesRequest
    ) throws -> any AsyncSequence<Glossary, Swift.Error>

    /// See `TranslationServiceClient.listGlossaries`.
    func listGlossaries(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Glossary, Swift.Error>

    /// See `TranslationServiceClient.getGlossary`.
    func getGlossary(request: GetGlossaryRequest) async throws -> GoogleCloudTranslateV3.Glossary

    /// See `TranslationServiceClient.getGlossary`.
    func getGlossary(
      name: Swift.String,
    ) async throws -> GoogleCloudTranslateV3.Glossary

    /// See `TranslationServiceClient.deleteGlossary`.
    func deleteGlossary(request: DeleteGlossaryRequest) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.deleteGlossary`.
    func deleteGlossary(withPolling: DeleteGlossaryRequest) async throws -> any GoogleCloudGax
      .PollableOperation<DeleteGlossaryResponse>

    /// See `TranslationServiceClient.deleteGlossary`.
    func deleteGlossary(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<DeleteGlossaryResponse>

    /// See `TranslationServiceClient.getGlossaryEntry`.
    func getGlossaryEntry(request: GetGlossaryEntryRequest) async throws
      -> GoogleCloudTranslateV3.GlossaryEntry

    /// See `TranslationServiceClient.getGlossaryEntry`.
    func getGlossaryEntry(
      name: Swift.String,
    ) async throws -> GoogleCloudTranslateV3.GlossaryEntry

    /// See `TranslationServiceClient.listGlossaryEntries`.
    func listGlossaryEntries(request: ListGlossaryEntriesRequest) async throws
      -> GoogleCloudTranslateV3.ListGlossaryEntriesResponse

    /// See `TranslationServiceClient.listGlossaryEntries`.
    func listGlossaryEntries(
      byItem: ListGlossaryEntriesRequest
    ) throws -> any AsyncSequence<GlossaryEntry, Swift.Error>

    /// See `TranslationServiceClient.listGlossaryEntries`.
    func listGlossaryEntries(
      parent: Swift.String,
    ) throws -> any AsyncSequence<GlossaryEntry, Swift.Error>

    /// See `TranslationServiceClient.createGlossaryEntry`.
    func createGlossaryEntry(request: CreateGlossaryEntryRequest) async throws
      -> GoogleCloudTranslateV3.GlossaryEntry

    /// See `TranslationServiceClient.createGlossaryEntry`.
    func createGlossaryEntry(
      parent: Swift.String,
      glossaryEntry: GlossaryEntry?,
    ) async throws -> GoogleCloudTranslateV3.GlossaryEntry

    /// See `TranslationServiceClient.updateGlossaryEntry`.
    func updateGlossaryEntry(request: UpdateGlossaryEntryRequest) async throws
      -> GoogleCloudTranslateV3.GlossaryEntry

    /// See `TranslationServiceClient.updateGlossaryEntry`.
    func updateGlossaryEntry(
      glossaryEntry: GlossaryEntry?,
    ) async throws -> GoogleCloudTranslateV3.GlossaryEntry

    /// See `TranslationServiceClient.deleteGlossaryEntry`.
    func deleteGlossaryEntry(request: DeleteGlossaryEntryRequest) async throws

    /// See `TranslationServiceClient.deleteGlossaryEntry`.
    func deleteGlossaryEntry(
      name: Swift.String,
    ) async throws

    /// See `TranslationServiceClient.createDataset`.
    func createDataset(request: CreateDatasetRequest) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.createDataset`.
    func createDataset(withPolling: CreateDatasetRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Dataset>

    /// See `TranslationServiceClient.createDataset`.
    func createDataset(
      parent: Swift.String,
      dataset: Dataset?,
    ) async throws -> any GoogleCloudGax.PollableOperation<Dataset>

    /// See `TranslationServiceClient.getDataset`.
    func getDataset(request: GetDatasetRequest) async throws -> GoogleCloudTranslateV3.Dataset

    /// See `TranslationServiceClient.getDataset`.
    func getDataset(
      name: Swift.String,
    ) async throws -> GoogleCloudTranslateV3.Dataset

    /// See `TranslationServiceClient.listDatasets`.
    func listDatasets(request: ListDatasetsRequest) async throws
      -> GoogleCloudTranslateV3.ListDatasetsResponse

    /// See `TranslationServiceClient.listDatasets`.
    func listDatasets(
      byItem: ListDatasetsRequest
    ) throws -> any AsyncSequence<Dataset, Swift.Error>

    /// See `TranslationServiceClient.listDatasets`.
    func listDatasets(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Dataset, Swift.Error>

    /// See `TranslationServiceClient.deleteDataset`.
    func deleteDataset(request: DeleteDatasetRequest) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.deleteDataset`.
    func deleteDataset(withPolling: DeleteDatasetRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

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

    /// See `TranslationServiceClient.createAdaptiveMtDataset`.
    func createAdaptiveMtDataset(request: CreateAdaptiveMtDatasetRequest) async throws
      -> GoogleCloudTranslateV3.AdaptiveMtDataset

    /// See `TranslationServiceClient.createAdaptiveMtDataset`.
    func createAdaptiveMtDataset(
      parent: Swift.String,
      adaptiveMtDataset: AdaptiveMtDataset?,
    ) async throws -> GoogleCloudTranslateV3.AdaptiveMtDataset

    /// See `TranslationServiceClient.deleteAdaptiveMtDataset`.
    func deleteAdaptiveMtDataset(request: DeleteAdaptiveMtDatasetRequest) async throws

    /// See `TranslationServiceClient.deleteAdaptiveMtDataset`.
    func deleteAdaptiveMtDataset(
      name: Swift.String,
    ) async throws

    /// See `TranslationServiceClient.getAdaptiveMtDataset`.
    func getAdaptiveMtDataset(request: GetAdaptiveMtDatasetRequest) async throws
      -> GoogleCloudTranslateV3.AdaptiveMtDataset

    /// See `TranslationServiceClient.getAdaptiveMtDataset`.
    func getAdaptiveMtDataset(
      name: Swift.String,
    ) async throws -> GoogleCloudTranslateV3.AdaptiveMtDataset

    /// See `TranslationServiceClient.listAdaptiveMtDatasets`.
    func listAdaptiveMtDatasets(request: ListAdaptiveMtDatasetsRequest) async throws
      -> GoogleCloudTranslateV3.ListAdaptiveMtDatasetsResponse

    /// See `TranslationServiceClient.listAdaptiveMtDatasets`.
    func listAdaptiveMtDatasets(
      byItem: ListAdaptiveMtDatasetsRequest
    ) throws -> any AsyncSequence<AdaptiveMtDataset, Swift.Error>

    /// See `TranslationServiceClient.listAdaptiveMtDatasets`.
    func listAdaptiveMtDatasets(
      parent: Swift.String,
    ) throws -> any AsyncSequence<AdaptiveMtDataset, Swift.Error>

    /// See `TranslationServiceClient.adaptiveMtTranslate`.
    func adaptiveMtTranslate(request: AdaptiveMtTranslateRequest) async throws
      -> GoogleCloudTranslateV3.AdaptiveMtTranslateResponse

    /// See `TranslationServiceClient.adaptiveMtTranslate`.
    func adaptiveMtTranslate(
      parent: Swift.String,
      content: [Swift.String],
    ) async throws -> GoogleCloudTranslateV3.AdaptiveMtTranslateResponse

    /// See `TranslationServiceClient.getAdaptiveMtFile`.
    func getAdaptiveMtFile(request: GetAdaptiveMtFileRequest) async throws
      -> GoogleCloudTranslateV3.AdaptiveMtFile

    /// See `TranslationServiceClient.getAdaptiveMtFile`.
    func getAdaptiveMtFile(
      name: Swift.String,
    ) async throws -> GoogleCloudTranslateV3.AdaptiveMtFile

    /// See `TranslationServiceClient.deleteAdaptiveMtFile`.
    func deleteAdaptiveMtFile(request: DeleteAdaptiveMtFileRequest) async throws

    /// See `TranslationServiceClient.deleteAdaptiveMtFile`.
    func deleteAdaptiveMtFile(
      name: Swift.String,
    ) async throws

    /// See `TranslationServiceClient.importAdaptiveMtFile`.
    func importAdaptiveMtFile(request: ImportAdaptiveMtFileRequest) async throws
      -> GoogleCloudTranslateV3.ImportAdaptiveMtFileResponse

    /// See `TranslationServiceClient.importAdaptiveMtFile`.
    func importAdaptiveMtFile(
      parent: Swift.String,
    ) async throws -> GoogleCloudTranslateV3.ImportAdaptiveMtFileResponse

    /// See `TranslationServiceClient.listAdaptiveMtFiles`.
    func listAdaptiveMtFiles(request: ListAdaptiveMtFilesRequest) async throws
      -> GoogleCloudTranslateV3.ListAdaptiveMtFilesResponse

    /// See `TranslationServiceClient.listAdaptiveMtFiles`.
    func listAdaptiveMtFiles(
      byItem: ListAdaptiveMtFilesRequest
    ) throws -> any AsyncSequence<AdaptiveMtFile, Swift.Error>

    /// See `TranslationServiceClient.listAdaptiveMtFiles`.
    func listAdaptiveMtFiles(
      parent: Swift.String,
    ) throws -> any AsyncSequence<AdaptiveMtFile, Swift.Error>

    /// See `TranslationServiceClient.listAdaptiveMtSentences`.
    func listAdaptiveMtSentences(request: ListAdaptiveMtSentencesRequest) async throws
      -> GoogleCloudTranslateV3.ListAdaptiveMtSentencesResponse

    /// See `TranslationServiceClient.listAdaptiveMtSentences`.
    func listAdaptiveMtSentences(
      byItem: ListAdaptiveMtSentencesRequest
    ) throws -> any AsyncSequence<AdaptiveMtSentence, Swift.Error>

    /// See `TranslationServiceClient.listAdaptiveMtSentences`.
    func listAdaptiveMtSentences(
      parent: Swift.String,
    ) throws -> any AsyncSequence<AdaptiveMtSentence, Swift.Error>

    /// See `TranslationServiceClient.importData`.
    func importData(request: ImportDataRequest) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.importData`.
    func importData(withPolling: ImportDataRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

    /// See `TranslationServiceClient.importData`.
    func importData(
      dataset: Swift.String,
      inputConfig: DatasetInputConfig?,
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `TranslationServiceClient.exportData`.
    func exportData(request: ExportDataRequest) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.exportData`.
    func exportData(withPolling: ExportDataRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

    /// See `TranslationServiceClient.exportData`.
    func exportData(
      dataset: Swift.String,
      outputConfig: DatasetOutputConfig?,
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `TranslationServiceClient.listExamples`.
    func listExamples(request: ListExamplesRequest) async throws
      -> GoogleCloudTranslateV3.ListExamplesResponse

    /// See `TranslationServiceClient.listExamples`.
    func listExamples(
      byItem: ListExamplesRequest
    ) throws -> any AsyncSequence<Example, Swift.Error>

    /// See `TranslationServiceClient.listExamples`.
    func listExamples(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Example, Swift.Error>

    /// See `TranslationServiceClient.createModel`.
    func createModel(request: CreateModelRequest) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.createModel`.
    func createModel(withPolling: CreateModelRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Model>

    /// See `TranslationServiceClient.createModel`.
    func createModel(
      parent: Swift.String,
      model: Model?,
    ) async throws -> any GoogleCloudGax.PollableOperation<Model>

    /// See `TranslationServiceClient.listModels`.
    func listModels(request: ListModelsRequest) async throws
      -> GoogleCloudTranslateV3.ListModelsResponse

    /// See `TranslationServiceClient.listModels`.
    func listModels(
      byItem: ListModelsRequest
    ) throws -> any AsyncSequence<Model, Swift.Error>

    /// See `TranslationServiceClient.listModels`.
    func listModels(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Model, Swift.Error>

    /// See `TranslationServiceClient.getModel`.
    func getModel(request: GetModelRequest) async throws -> GoogleCloudTranslateV3.Model

    /// See `TranslationServiceClient.getModel`.
    func getModel(
      name: Swift.String,
    ) async throws -> GoogleCloudTranslateV3.Model

    /// See `TranslationServiceClient.deleteModel`.
    func deleteModel(request: DeleteModelRequest) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.deleteModel`.
    func deleteModel(withPolling: DeleteModelRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

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

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

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

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

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

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

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

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

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

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

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

    /// See `TranslationServiceClient.waitOperation`.
    func waitOperation(request: GoogleLongRunning.WaitOperationRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.translateText`.
    func translateText(
      request: TranslateTextRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.TranslateTextResponse

    /// See `TranslationServiceClient.romanizeText`.
    func romanizeText(
      request: RomanizeTextRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.RomanizeTextResponse

    /// See `TranslationServiceClient.detectLanguage`.
    func detectLanguage(
      request: DetectLanguageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.DetectLanguageResponse

    /// See `TranslationServiceClient.getSupportedLanguages`.
    func getSupportedLanguages(
      request: GetSupportedLanguagesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.SupportedLanguages

    /// See `TranslationServiceClient.translateDocument`.
    func translateDocument(
      request: TranslateDocumentRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.TranslateDocumentResponse

    /// See `TranslationServiceClient.batchTranslateText`.
    func batchTranslateText(
      request: BatchTranslateTextRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.batchTranslateText`.
    func batchTranslateText(
      withPolling: BatchTranslateTextRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<BatchTranslateResponse>

    /// See `TranslationServiceClient.batchTranslateDocument`.
    func batchTranslateDocument(
      request: BatchTranslateDocumentRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.batchTranslateDocument`.
    func batchTranslateDocument(
      withPolling: BatchTranslateDocumentRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<BatchTranslateDocumentResponse>

    /// See `TranslationServiceClient.createGlossary`.
    func createGlossary(
      request: CreateGlossaryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.createGlossary`.
    func createGlossary(
      withPolling: CreateGlossaryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Glossary>

    /// See `TranslationServiceClient.updateGlossary`.
    func updateGlossary(
      request: UpdateGlossaryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.updateGlossary`.
    func updateGlossary(
      withPolling: UpdateGlossaryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Glossary>

    /// See `TranslationServiceClient.listGlossaries`.
    func listGlossaries(
      request: ListGlossariesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.ListGlossariesResponse

    /// See `TranslationServiceClient.listGlossaries`.
    func listGlossaries(
      byItem: ListGlossariesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Glossary, Swift.Error>

    /// See `TranslationServiceClient.getGlossary`.
    func getGlossary(
      request: GetGlossaryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.Glossary

    /// See `TranslationServiceClient.deleteGlossary`.
    func deleteGlossary(
      request: DeleteGlossaryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.deleteGlossary`.
    func deleteGlossary(
      withPolling: DeleteGlossaryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<DeleteGlossaryResponse>

    /// See `TranslationServiceClient.getGlossaryEntry`.
    func getGlossaryEntry(
      request: GetGlossaryEntryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.GlossaryEntry

    /// See `TranslationServiceClient.listGlossaryEntries`.
    func listGlossaryEntries(
      request: ListGlossaryEntriesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.ListGlossaryEntriesResponse

    /// See `TranslationServiceClient.listGlossaryEntries`.
    func listGlossaryEntries(
      byItem: ListGlossaryEntriesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<GlossaryEntry, Swift.Error>

    /// See `TranslationServiceClient.createGlossaryEntry`.
    func createGlossaryEntry(
      request: CreateGlossaryEntryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.GlossaryEntry

    /// See `TranslationServiceClient.updateGlossaryEntry`.
    func updateGlossaryEntry(
      request: UpdateGlossaryEntryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.GlossaryEntry

    /// See `TranslationServiceClient.deleteGlossaryEntry`.
    func deleteGlossaryEntry(
      request: DeleteGlossaryEntryRequest, options: GoogleCloudGax.RequestOptions
    ) async throws

    /// See `TranslationServiceClient.createDataset`.
    func createDataset(
      request: CreateDatasetRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.createDataset`.
    func createDataset(
      withPolling: CreateDatasetRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Dataset>

    /// See `TranslationServiceClient.getDataset`.
    func getDataset(
      request: GetDatasetRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.Dataset

    /// See `TranslationServiceClient.listDatasets`.
    func listDatasets(
      request: ListDatasetsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.ListDatasetsResponse

    /// See `TranslationServiceClient.listDatasets`.
    func listDatasets(
      byItem: ListDatasetsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Dataset, Swift.Error>

    /// See `TranslationServiceClient.deleteDataset`.
    func deleteDataset(
      request: DeleteDatasetRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.deleteDataset`.
    func deleteDataset(
      withPolling: DeleteDatasetRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `TranslationServiceClient.createAdaptiveMtDataset`.
    func createAdaptiveMtDataset(
      request: CreateAdaptiveMtDatasetRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.AdaptiveMtDataset

    /// See `TranslationServiceClient.deleteAdaptiveMtDataset`.
    func deleteAdaptiveMtDataset(
      request: DeleteAdaptiveMtDatasetRequest, options: GoogleCloudGax.RequestOptions
    ) async throws

    /// See `TranslationServiceClient.getAdaptiveMtDataset`.
    func getAdaptiveMtDataset(
      request: GetAdaptiveMtDatasetRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.AdaptiveMtDataset

    /// See `TranslationServiceClient.listAdaptiveMtDatasets`.
    func listAdaptiveMtDatasets(
      request: ListAdaptiveMtDatasetsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtDatasetsResponse

    /// See `TranslationServiceClient.listAdaptiveMtDatasets`.
    func listAdaptiveMtDatasets(
      byItem: ListAdaptiveMtDatasetsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<AdaptiveMtDataset, Swift.Error>

    /// See `TranslationServiceClient.adaptiveMtTranslate`.
    func adaptiveMtTranslate(
      request: AdaptiveMtTranslateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.AdaptiveMtTranslateResponse

    /// See `TranslationServiceClient.getAdaptiveMtFile`.
    func getAdaptiveMtFile(
      request: GetAdaptiveMtFileRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.AdaptiveMtFile

    /// See `TranslationServiceClient.deleteAdaptiveMtFile`.
    func deleteAdaptiveMtFile(
      request: DeleteAdaptiveMtFileRequest, options: GoogleCloudGax.RequestOptions
    ) async throws

    /// See `TranslationServiceClient.importAdaptiveMtFile`.
    func importAdaptiveMtFile(
      request: ImportAdaptiveMtFileRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.ImportAdaptiveMtFileResponse

    /// See `TranslationServiceClient.listAdaptiveMtFiles`.
    func listAdaptiveMtFiles(
      request: ListAdaptiveMtFilesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtFilesResponse

    /// See `TranslationServiceClient.listAdaptiveMtFiles`.
    func listAdaptiveMtFiles(
      byItem: ListAdaptiveMtFilesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<AdaptiveMtFile, Swift.Error>

    /// See `TranslationServiceClient.listAdaptiveMtSentences`.
    func listAdaptiveMtSentences(
      request: ListAdaptiveMtSentencesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtSentencesResponse

    /// See `TranslationServiceClient.listAdaptiveMtSentences`.
    func listAdaptiveMtSentences(
      byItem: ListAdaptiveMtSentencesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<AdaptiveMtSentence, Swift.Error>

    /// See `TranslationServiceClient.importData`.
    func importData(
      request: ImportDataRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.importData`.
    func importData(
      withPolling: ImportDataRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `TranslationServiceClient.exportData`.
    func exportData(
      request: ExportDataRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.exportData`.
    func exportData(
      withPolling: ExportDataRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `TranslationServiceClient.listExamples`.
    func listExamples(
      request: ListExamplesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.ListExamplesResponse

    /// See `TranslationServiceClient.listExamples`.
    func listExamples(
      byItem: ListExamplesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Example, Swift.Error>

    /// See `TranslationServiceClient.createModel`.
    func createModel(
      request: CreateModelRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.createModel`.
    func createModel(
      withPolling: CreateModelRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Model>

    /// See `TranslationServiceClient.listModels`.
    func listModels(
      request: ListModelsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.ListModelsResponse

    /// See `TranslationServiceClient.listModels`.
    func listModels(
      byItem: ListModelsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Model, Swift.Error>

    /// See `TranslationServiceClient.getModel`.
    func getModel(
      request: GetModelRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudTranslateV3.Model

    /// See `TranslationServiceClient.deleteModel`.
    func deleteModel(
      request: DeleteModelRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `TranslationServiceClient.deleteModel`.
    func deleteModel(
      withPolling: DeleteModelRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

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

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

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

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

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

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

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

    /// See `TranslationServiceClient.waitOperation`.
    func waitOperation(
      request: GoogleLongRunning.WaitOperationRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation
  }
}

// Default implementations
extension Clients.TranslationServiceProtocol {
  public func translateText(request: TranslateTextRequest) async throws
    -> GoogleCloudTranslateV3.TranslateTextResponse
  {
    try await self.translateText(request: request, options: .init())
  }

  public func translateText(
    request: TranslateTextRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.TranslateTextResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func translateText(
    parent: Swift.String,
    targetLanguageCode: Swift.String,
    contents: [Swift.String],
  ) async throws -> GoogleCloudTranslateV3.TranslateTextResponse {
    let request = TranslateTextRequest().with {
      $0.parent = parent
      $0.targetLanguageCode = targetLanguageCode
      $0.contents = contents
    }
    return try await self.translateText(request: request)
  }

  public func translateText(
    parent: Swift.String,
    model: Swift.String,
    mimeType: Swift.String,
    sourceLanguageCode: Swift.String,
    targetLanguageCode: Swift.String,
    contents: [Swift.String],
  ) async throws -> GoogleCloudTranslateV3.TranslateTextResponse {
    let request = TranslateTextRequest().with {
      $0.parent = parent
      $0.model = model
      $0.mimeType = mimeType
      $0.sourceLanguageCode = sourceLanguageCode
      $0.targetLanguageCode = targetLanguageCode
      $0.contents = contents
    }
    return try await self.translateText(request: request)
  }

  public func romanizeText(request: RomanizeTextRequest) async throws
    -> GoogleCloudTranslateV3.RomanizeTextResponse
  {
    try await self.romanizeText(request: request, options: .init())
  }

  public func romanizeText(
    request: RomanizeTextRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.RomanizeTextResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func romanizeText(
    parent: Swift.String,
    contents: [Swift.String],
  ) async throws -> GoogleCloudTranslateV3.RomanizeTextResponse {
    let request = RomanizeTextRequest().with {
      $0.parent = parent
      $0.contents = contents
    }
    return try await self.romanizeText(request: request)
  }

  public func detectLanguage(request: DetectLanguageRequest) async throws
    -> GoogleCloudTranslateV3.DetectLanguageResponse
  {
    try await self.detectLanguage(request: request, options: .init())
  }

  public func detectLanguage(
    request: DetectLanguageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.DetectLanguageResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func detectLanguage(
    parent: Swift.String,
    model: Swift.String,
    mimeType: Swift.String,
    content: Swift.String,
  ) async throws -> GoogleCloudTranslateV3.DetectLanguageResponse {
    let request = DetectLanguageRequest().with {
      $0.parent = parent
      $0.model = model
      $0.mimeType = mimeType
      $0.source = .content(content)
    }
    return try await self.detectLanguage(request: request)
  }

  public func getSupportedLanguages(request: GetSupportedLanguagesRequest) async throws
    -> GoogleCloudTranslateV3.SupportedLanguages
  {
    try await self.getSupportedLanguages(request: request, options: .init())
  }

  public func getSupportedLanguages(
    request: GetSupportedLanguagesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.SupportedLanguages {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getSupportedLanguages(
    parent: Swift.String,
    model: Swift.String,
    displayLanguageCode: Swift.String,
  ) async throws -> GoogleCloudTranslateV3.SupportedLanguages {
    let request = GetSupportedLanguagesRequest().with {
      $0.parent = parent
      $0.model = model
      $0.displayLanguageCode = displayLanguageCode
    }
    return try await self.getSupportedLanguages(request: request)
  }

  public func translateDocument(request: TranslateDocumentRequest) async throws
    -> GoogleCloudTranslateV3.TranslateDocumentResponse
  {
    try await self.translateDocument(request: request, options: .init())
  }

  public func translateDocument(
    request: TranslateDocumentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.TranslateDocumentResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

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

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

  public func batchTranslateText(withPolling: BatchTranslateTextRequest) async throws
    -> any GoogleCloudGax.PollableOperation<BatchTranslateResponse>
  {
    try await self.batchTranslateText(withPolling: withPolling, options: .init())
  }

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

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

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

  public func batchTranslateDocument(withPolling: BatchTranslateDocumentRequest) async throws
    -> any GoogleCloudGax.PollableOperation<BatchTranslateDocumentResponse>
  {
    try await self.batchTranslateDocument(withPolling: withPolling, options: .init())
  }

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

  public func batchTranslateDocument(
    parent: Swift.String,
    sourceLanguageCode: Swift.String,
    targetLanguageCodes: [Swift.String],
    inputConfigs: [BatchDocumentInputConfig],
    outputConfig: BatchDocumentOutputConfig?,
  ) async throws -> any GoogleCloudGax.PollableOperation<BatchTranslateDocumentResponse> {
    let request = BatchTranslateDocumentRequest().with {
      $0.parent = parent
      $0.sourceLanguageCode = sourceLanguageCode
      $0.targetLanguageCodes = targetLanguageCodes
      $0.inputConfigs = inputConfigs
      $0.outputConfig = outputConfig
    }
    return try await self.batchTranslateDocument(withPolling: request)
  }

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

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

  public func createGlossary(withPolling: CreateGlossaryRequest) async throws -> any GoogleCloudGax
    .PollableOperation<Glossary>
  {
    try await self.createGlossary(withPolling: withPolling, options: .init())
  }

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

  public func createGlossary(
    parent: Swift.String,
    glossary: Glossary?,
  ) async throws -> any GoogleCloudGax.PollableOperation<Glossary> {
    let request = CreateGlossaryRequest().with {
      $0.parent = parent
      $0.glossary = glossary
    }
    return try await self.createGlossary(withPolling: request)
  }

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

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

  public func updateGlossary(withPolling: UpdateGlossaryRequest) async throws -> any GoogleCloudGax
    .PollableOperation<Glossary>
  {
    try await self.updateGlossary(withPolling: withPolling, options: .init())
  }

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

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

  public func listGlossaries(request: ListGlossariesRequest) async throws
    -> GoogleCloudTranslateV3.ListGlossariesResponse
  {
    try await self.listGlossaries(request: request, options: .init())
  }

  public func listGlossaries(
    request: ListGlossariesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListGlossariesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listGlossaries(
    byItem: ListGlossariesRequest
  ) throws -> any AsyncSequence<Glossary, Swift.Error> {
    try self.listGlossaries(byItem: byItem, options: .init())
  }

  public func listGlossaries(
    byItem: ListGlossariesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Glossary, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListGlossariesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func getGlossary(request: GetGlossaryRequest) async throws
    -> GoogleCloudTranslateV3.Glossary
  {
    try await self.getGlossary(request: request, options: .init())
  }

  public func getGlossary(
    request: GetGlossaryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.Glossary {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getGlossary(
    name: Swift.String,
  ) async throws -> GoogleCloudTranslateV3.Glossary {
    let request = GetGlossaryRequest().with {
      $0.name = name
    }
    return try await self.getGlossary(request: request)
  }

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

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

  public func deleteGlossary(withPolling: DeleteGlossaryRequest) async throws -> any GoogleCloudGax
    .PollableOperation<DeleteGlossaryResponse>
  {
    try await self.deleteGlossary(withPolling: withPolling, options: .init())
  }

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

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

  public func getGlossaryEntry(request: GetGlossaryEntryRequest) async throws
    -> GoogleCloudTranslateV3.GlossaryEntry
  {
    try await self.getGlossaryEntry(request: request, options: .init())
  }

  public func getGlossaryEntry(
    request: GetGlossaryEntryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.GlossaryEntry {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getGlossaryEntry(
    name: Swift.String,
  ) async throws -> GoogleCloudTranslateV3.GlossaryEntry {
    let request = GetGlossaryEntryRequest().with {
      $0.name = name
    }
    return try await self.getGlossaryEntry(request: request)
  }

  public func listGlossaryEntries(request: ListGlossaryEntriesRequest) async throws
    -> GoogleCloudTranslateV3.ListGlossaryEntriesResponse
  {
    try await self.listGlossaryEntries(request: request, options: .init())
  }

  public func listGlossaryEntries(
    request: ListGlossaryEntriesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListGlossaryEntriesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listGlossaryEntries(
    byItem: ListGlossaryEntriesRequest
  ) throws -> any AsyncSequence<GlossaryEntry, Swift.Error> {
    try self.listGlossaryEntries(byItem: byItem, options: .init())
  }

  public func listGlossaryEntries(
    byItem: ListGlossaryEntriesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<GlossaryEntry, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListGlossaryEntriesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func createGlossaryEntry(request: CreateGlossaryEntryRequest) async throws
    -> GoogleCloudTranslateV3.GlossaryEntry
  {
    try await self.createGlossaryEntry(request: request, options: .init())
  }

  public func createGlossaryEntry(
    request: CreateGlossaryEntryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.GlossaryEntry {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func createGlossaryEntry(
    parent: Swift.String,
    glossaryEntry: GlossaryEntry?,
  ) async throws -> GoogleCloudTranslateV3.GlossaryEntry {
    let request = CreateGlossaryEntryRequest().with {
      $0.parent = parent
      $0.glossaryEntry = glossaryEntry
    }
    return try await self.createGlossaryEntry(request: request)
  }

  public func updateGlossaryEntry(request: UpdateGlossaryEntryRequest) async throws
    -> GoogleCloudTranslateV3.GlossaryEntry
  {
    try await self.updateGlossaryEntry(request: request, options: .init())
  }

  public func updateGlossaryEntry(
    request: UpdateGlossaryEntryRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.GlossaryEntry {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func updateGlossaryEntry(
    glossaryEntry: GlossaryEntry?,
  ) async throws -> GoogleCloudTranslateV3.GlossaryEntry {
    let request = UpdateGlossaryEntryRequest().with {
      $0.glossaryEntry = glossaryEntry
    }
    return try await self.updateGlossaryEntry(request: request)
  }

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

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

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

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

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

  public func createDataset(withPolling: CreateDatasetRequest) async throws -> any GoogleCloudGax
    .PollableOperation<Dataset>
  {
    try await self.createDataset(withPolling: withPolling, options: .init())
  }

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

  public func createDataset(
    parent: Swift.String,
    dataset: Dataset?,
  ) async throws -> any GoogleCloudGax.PollableOperation<Dataset> {
    let request = CreateDatasetRequest().with {
      $0.parent = parent
      $0.dataset = dataset
    }
    return try await self.createDataset(withPolling: request)
  }

  public func getDataset(request: GetDatasetRequest) async throws -> GoogleCloudTranslateV3.Dataset
  {
    try await self.getDataset(request: request, options: .init())
  }

  public func getDataset(
    request: GetDatasetRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.Dataset {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getDataset(
    name: Swift.String,
  ) async throws -> GoogleCloudTranslateV3.Dataset {
    let request = GetDatasetRequest().with {
      $0.name = name
    }
    return try await self.getDataset(request: request)
  }

  public func listDatasets(request: ListDatasetsRequest) async throws
    -> GoogleCloudTranslateV3.ListDatasetsResponse
  {
    try await self.listDatasets(request: request, options: .init())
  }

  public func listDatasets(
    request: ListDatasetsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListDatasetsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listDatasets(
    byItem: ListDatasetsRequest
  ) throws -> any AsyncSequence<Dataset, Swift.Error> {
    try self.listDatasets(byItem: byItem, options: .init())
  }

  public func listDatasets(
    byItem: ListDatasetsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Dataset, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListDatasetsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

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

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

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

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

  public func createAdaptiveMtDataset(request: CreateAdaptiveMtDatasetRequest) async throws
    -> GoogleCloudTranslateV3.AdaptiveMtDataset
  {
    try await self.createAdaptiveMtDataset(request: request, options: .init())
  }

  public func createAdaptiveMtDataset(
    request: CreateAdaptiveMtDatasetRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.AdaptiveMtDataset {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func createAdaptiveMtDataset(
    parent: Swift.String,
    adaptiveMtDataset: AdaptiveMtDataset?,
  ) async throws -> GoogleCloudTranslateV3.AdaptiveMtDataset {
    let request = CreateAdaptiveMtDatasetRequest().with {
      $0.parent = parent
      $0.adaptiveMtDataset = adaptiveMtDataset
    }
    return try await self.createAdaptiveMtDataset(request: request)
  }

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

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

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

  public func getAdaptiveMtDataset(request: GetAdaptiveMtDatasetRequest) async throws
    -> GoogleCloudTranslateV3.AdaptiveMtDataset
  {
    try await self.getAdaptiveMtDataset(request: request, options: .init())
  }

  public func getAdaptiveMtDataset(
    request: GetAdaptiveMtDatasetRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.AdaptiveMtDataset {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getAdaptiveMtDataset(
    name: Swift.String,
  ) async throws -> GoogleCloudTranslateV3.AdaptiveMtDataset {
    let request = GetAdaptiveMtDatasetRequest().with {
      $0.name = name
    }
    return try await self.getAdaptiveMtDataset(request: request)
  }

  public func listAdaptiveMtDatasets(request: ListAdaptiveMtDatasetsRequest) async throws
    -> GoogleCloudTranslateV3.ListAdaptiveMtDatasetsResponse
  {
    try await self.listAdaptiveMtDatasets(request: request, options: .init())
  }

  public func listAdaptiveMtDatasets(
    request: ListAdaptiveMtDatasetsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtDatasetsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listAdaptiveMtDatasets(
    byItem: ListAdaptiveMtDatasetsRequest
  ) throws -> any AsyncSequence<AdaptiveMtDataset, Swift.Error> {
    try self.listAdaptiveMtDatasets(byItem: byItem, options: .init())
  }

  public func listAdaptiveMtDatasets(
    byItem: ListAdaptiveMtDatasetsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<AdaptiveMtDataset, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtDatasetsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func adaptiveMtTranslate(request: AdaptiveMtTranslateRequest) async throws
    -> GoogleCloudTranslateV3.AdaptiveMtTranslateResponse
  {
    try await self.adaptiveMtTranslate(request: request, options: .init())
  }

  public func adaptiveMtTranslate(
    request: AdaptiveMtTranslateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.AdaptiveMtTranslateResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func adaptiveMtTranslate(
    parent: Swift.String,
    content: [Swift.String],
  ) async throws -> GoogleCloudTranslateV3.AdaptiveMtTranslateResponse {
    let request = AdaptiveMtTranslateRequest().with {
      $0.parent = parent
      $0.content = content
    }
    return try await self.adaptiveMtTranslate(request: request)
  }

  public func getAdaptiveMtFile(request: GetAdaptiveMtFileRequest) async throws
    -> GoogleCloudTranslateV3.AdaptiveMtFile
  {
    try await self.getAdaptiveMtFile(request: request, options: .init())
  }

  public func getAdaptiveMtFile(
    request: GetAdaptiveMtFileRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.AdaptiveMtFile {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getAdaptiveMtFile(
    name: Swift.String,
  ) async throws -> GoogleCloudTranslateV3.AdaptiveMtFile {
    let request = GetAdaptiveMtFileRequest().with {
      $0.name = name
    }
    return try await self.getAdaptiveMtFile(request: request)
  }

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

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

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

  public func importAdaptiveMtFile(request: ImportAdaptiveMtFileRequest) async throws
    -> GoogleCloudTranslateV3.ImportAdaptiveMtFileResponse
  {
    try await self.importAdaptiveMtFile(request: request, options: .init())
  }

  public func importAdaptiveMtFile(
    request: ImportAdaptiveMtFileRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ImportAdaptiveMtFileResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func importAdaptiveMtFile(
    parent: Swift.String,
  ) async throws -> GoogleCloudTranslateV3.ImportAdaptiveMtFileResponse {
    let request = ImportAdaptiveMtFileRequest().with {
      $0.parent = parent
    }
    return try await self.importAdaptiveMtFile(request: request)
  }

  public func listAdaptiveMtFiles(request: ListAdaptiveMtFilesRequest) async throws
    -> GoogleCloudTranslateV3.ListAdaptiveMtFilesResponse
  {
    try await self.listAdaptiveMtFiles(request: request, options: .init())
  }

  public func listAdaptiveMtFiles(
    request: ListAdaptiveMtFilesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtFilesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listAdaptiveMtFiles(
    byItem: ListAdaptiveMtFilesRequest
  ) throws -> any AsyncSequence<AdaptiveMtFile, Swift.Error> {
    try self.listAdaptiveMtFiles(byItem: byItem, options: .init())
  }

  public func listAdaptiveMtFiles(
    byItem: ListAdaptiveMtFilesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<AdaptiveMtFile, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtFilesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func listAdaptiveMtSentences(request: ListAdaptiveMtSentencesRequest) async throws
    -> GoogleCloudTranslateV3.ListAdaptiveMtSentencesResponse
  {
    try await self.listAdaptiveMtSentences(request: request, options: .init())
  }

  public func listAdaptiveMtSentences(
    request: ListAdaptiveMtSentencesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtSentencesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listAdaptiveMtSentences(
    byItem: ListAdaptiveMtSentencesRequest
  ) throws -> any AsyncSequence<AdaptiveMtSentence, Swift.Error> {
    try self.listAdaptiveMtSentences(byItem: byItem, options: .init())
  }

  public func listAdaptiveMtSentences(
    byItem: ListAdaptiveMtSentencesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<AdaptiveMtSentence, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListAdaptiveMtSentencesResponse
      in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

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

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

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

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

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

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

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

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

  public func listExamples(request: ListExamplesRequest) async throws
    -> GoogleCloudTranslateV3.ListExamplesResponse
  {
    try await self.listExamples(request: request, options: .init())
  }

  public func listExamples(
    request: ListExamplesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListExamplesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listExamples(
    byItem: ListExamplesRequest
  ) throws -> any AsyncSequence<Example, Swift.Error> {
    try self.listExamples(byItem: byItem, options: .init())
  }

  public func listExamples(
    byItem: ListExamplesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Example, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListExamplesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

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

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

  public func createModel(withPolling: CreateModelRequest) async throws -> any GoogleCloudGax
    .PollableOperation<Model>
  {
    try await self.createModel(withPolling: withPolling, options: .init())
  }

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

  public func createModel(
    parent: Swift.String,
    model: Model?,
  ) async throws -> any GoogleCloudGax.PollableOperation<Model> {
    let request = CreateModelRequest().with {
      $0.parent = parent
      $0.model = model
    }
    return try await self.createModel(withPolling: request)
  }

  public func listModels(request: ListModelsRequest) async throws
    -> GoogleCloudTranslateV3.ListModelsResponse
  {
    try await self.listModels(request: request, options: .init())
  }

  public func listModels(
    request: ListModelsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.ListModelsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listModels(
    byItem: ListModelsRequest
  ) throws -> any AsyncSequence<Model, Swift.Error> {
    try self.listModels(byItem: byItem, options: .init())
  }

  public func listModels(
    byItem: ListModelsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Model, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudTranslateV3.ListModelsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func getModel(request: GetModelRequest) async throws -> GoogleCloudTranslateV3.Model {
    try await self.getModel(request: request, options: .init())
  }

  public func getModel(
    request: GetModelRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudTranslateV3.Model {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getModel(
    name: Swift.String,
  ) async throws -> GoogleCloudTranslateV3.Model {
    let request = GetModelRequest().with {
      $0.name = name
    }
    return try await self.getModel(request: request)
  }

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

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

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

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

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

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

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

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

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

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

  public func listOperations(request: GoogleLongRunning.ListOperationsRequest) async throws
    -> GoogleLongRunning.ListOperationsResponse
  {
    try await self.listOperations(request: request, options: .init())
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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