// 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 GoogleCloudGax

/// Service for creating and managing data objects.
///
/// @Snippet(path: "DataObjectServiceQuickstart")
public class DataObjectServiceClient: Clients.DataObjectServiceProtocol {
  let inner: any Clients.DataObjectServiceStub

  /// Creates a new `DataObjectServiceClient` instance.
  public init(_ options: GoogleCloudGax.ClientOptions = .init()) throws {
    var inner: any Clients.DataObjectServiceStub = try Clients.DataObjectServiceTransport(options)
    inner = Clients.DataObjectServiceRetry(inner, options: options)
    if let logger = options.logger {
      inner = Clients.DataObjectServiceLogging(inner, logger: logger)
    }
    self.inner = inner
  }

  /// Creates a dataObject.
  ///
  /// @Snippet(path: "DataObjectService_CreateDataObject")
  public func createDataObject(
    request: CreateDataObjectRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudVectorSearchV1.DataObject {
    try await self.inner.createDataObject(request: request, options: options)
  }

  /// Creates a batch of dataObjects.
  ///
  /// @Snippet(path: "DataObjectService_BatchCreateDataObjects")
  public func batchCreateDataObjects(
    request: BatchCreateDataObjectsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudVectorSearchV1.BatchCreateDataObjectsResponse {
    try await self.inner.batchCreateDataObjects(request: request, options: options)
  }

  /// Gets a data object.
  ///
  /// @Snippet(path: "DataObjectService_GetDataObject")
  public func getDataObject(
    request: GetDataObjectRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudVectorSearchV1.DataObject {
    try await self.inner.getDataObject(request: request, options: options)
  }

  /// Updates a dataObject.
  ///
  /// @Snippet(path: "DataObjectService_UpdateDataObject")
  public func updateDataObject(
    request: UpdateDataObjectRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudVectorSearchV1.DataObject {
    try await self.inner.updateDataObject(request: request, options: options)
  }

  /// Updates dataObjects in a batch.
  ///
  /// @Snippet(path: "DataObjectService_BatchUpdateDataObjects")
  public func batchUpdateDataObjects(
    request: BatchUpdateDataObjectsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudVectorSearchV1.BatchUpdateDataObjectsResponse {
    try await self.inner.batchUpdateDataObjects(request: request, options: options)
  }

  /// Deletes a dataObject.
  ///
  /// @Snippet(path: "DataObjectService_DeleteDataObject")
  public func deleteDataObject(
    request: DeleteDataObjectRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.deleteDataObject(request: request, options: options)
  }

  /// Deletes dataObjects in a batch.
  ///
  /// @Snippet(path: "DataObjectService_BatchDeleteDataObjects")
  public func batchDeleteDataObjects(
    request: BatchDeleteDataObjectsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.batchDeleteDataObjects(request: request, options: options)
  }

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

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

extension Clients {
  /// A Swift protocol to mock `DataObjectServiceClient`.
  ///
  /// To mock `DataObjectServiceClient` change your functions to receive
  /// `some DataObjectServiceProtocol` or `any DataObjectServiceProtocol`
  /// and pass a mock implementation in your tests.
  public protocol DataObjectServiceProtocol {
    /// See `DataObjectServiceClient.createDataObject`.
    func createDataObject(request: CreateDataObjectRequest) async throws
      -> GoogleCloudVectorSearchV1.DataObject

    /// See `DataObjectServiceClient.createDataObject`.
    func createDataObject(
      parent: Swift.String,
      dataObject: DataObject?,
      dataObjectId: Swift.String,
    ) async throws -> GoogleCloudVectorSearchV1.DataObject

    /// See `DataObjectServiceClient.batchCreateDataObjects`.
    func batchCreateDataObjects(request: BatchCreateDataObjectsRequest) async throws
      -> GoogleCloudVectorSearchV1.BatchCreateDataObjectsResponse

    /// See `DataObjectServiceClient.getDataObject`.
    func getDataObject(request: GetDataObjectRequest) async throws
      -> GoogleCloudVectorSearchV1.DataObject

    /// See `DataObjectServiceClient.getDataObject`.
    func getDataObject(
      name: Swift.String,
    ) async throws -> GoogleCloudVectorSearchV1.DataObject

    /// See `DataObjectServiceClient.updateDataObject`.
    func updateDataObject(request: UpdateDataObjectRequest) async throws
      -> GoogleCloudVectorSearchV1.DataObject

    /// See `DataObjectServiceClient.updateDataObject`.
    func updateDataObject(
      dataObject: DataObject?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> GoogleCloudVectorSearchV1.DataObject

    /// See `DataObjectServiceClient.batchUpdateDataObjects`.
    func batchUpdateDataObjects(request: BatchUpdateDataObjectsRequest) async throws
      -> GoogleCloudVectorSearchV1.BatchUpdateDataObjectsResponse

    /// See `DataObjectServiceClient.batchUpdateDataObjects`.
    func batchUpdateDataObjects(
      parent: Swift.String,
      requests: [UpdateDataObjectRequest],
    ) async throws -> GoogleCloudVectorSearchV1.BatchUpdateDataObjectsResponse

    /// See `DataObjectServiceClient.deleteDataObject`.
    func deleteDataObject(request: DeleteDataObjectRequest) async throws

    /// See `DataObjectServiceClient.deleteDataObject`.
    func deleteDataObject(
      name: Swift.String,
    ) async throws

    /// See `DataObjectServiceClient.batchDeleteDataObjects`.
    func batchDeleteDataObjects(request: BatchDeleteDataObjectsRequest) async throws

    /// See `DataObjectServiceClient.batchDeleteDataObjects`.
    func batchDeleteDataObjects(
      parent: Swift.String,
      requests: [DeleteDataObjectRequest],
    ) async throws

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

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

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

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

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

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

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

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

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

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

    /// See `DataObjectServiceClient.createDataObject`.
    func createDataObject(
      request: CreateDataObjectRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudVectorSearchV1.DataObject

    /// See `DataObjectServiceClient.batchCreateDataObjects`.
    func batchCreateDataObjects(
      request: BatchCreateDataObjectsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudVectorSearchV1.BatchCreateDataObjectsResponse

    /// See `DataObjectServiceClient.getDataObject`.
    func getDataObject(
      request: GetDataObjectRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudVectorSearchV1.DataObject

    /// See `DataObjectServiceClient.updateDataObject`.
    func updateDataObject(
      request: UpdateDataObjectRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudVectorSearchV1.DataObject

    /// See `DataObjectServiceClient.batchUpdateDataObjects`.
    func batchUpdateDataObjects(
      request: BatchUpdateDataObjectsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudVectorSearchV1.BatchUpdateDataObjectsResponse

    /// See `DataObjectServiceClient.deleteDataObject`.
    func deleteDataObject(
      request: DeleteDataObjectRequest, options: GoogleCloudGax.RequestOptions
    ) async throws

    /// See `DataObjectServiceClient.batchDeleteDataObjects`.
    func batchDeleteDataObjects(
      request: BatchDeleteDataObjectsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws

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

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

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

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

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

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

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

// Default implementations
extension Clients.DataObjectServiceProtocol {
  public func createDataObject(request: CreateDataObjectRequest) async throws
    -> GoogleCloudVectorSearchV1.DataObject
  {
    try await self.createDataObject(request: request, options: .init())
  }

  public func createDataObject(
    request: CreateDataObjectRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudVectorSearchV1.DataObject {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func createDataObject(
    parent: Swift.String,
    dataObject: DataObject?,
    dataObjectId: Swift.String,
  ) async throws -> GoogleCloudVectorSearchV1.DataObject {
    let request = CreateDataObjectRequest().with {
      $0.parent = parent
      $0.dataObject = dataObject
      $0.dataObjectId = dataObjectId
    }
    return try await self.createDataObject(request: request)
  }

  public func batchCreateDataObjects(request: BatchCreateDataObjectsRequest) async throws
    -> GoogleCloudVectorSearchV1.BatchCreateDataObjectsResponse
  {
    try await self.batchCreateDataObjects(request: request, options: .init())
  }

  public func batchCreateDataObjects(
    request: BatchCreateDataObjectsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudVectorSearchV1.BatchCreateDataObjectsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getDataObject(request: GetDataObjectRequest) async throws
    -> GoogleCloudVectorSearchV1.DataObject
  {
    try await self.getDataObject(request: request, options: .init())
  }

  public func getDataObject(
    request: GetDataObjectRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudVectorSearchV1.DataObject {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getDataObject(
    name: Swift.String,
  ) async throws -> GoogleCloudVectorSearchV1.DataObject {
    let request = GetDataObjectRequest().with {
      $0.name = name
    }
    return try await self.getDataObject(request: request)
  }

  public func updateDataObject(request: UpdateDataObjectRequest) async throws
    -> GoogleCloudVectorSearchV1.DataObject
  {
    try await self.updateDataObject(request: request, options: .init())
  }

  public func updateDataObject(
    request: UpdateDataObjectRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudVectorSearchV1.DataObject {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func updateDataObject(
    dataObject: DataObject?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> GoogleCloudVectorSearchV1.DataObject {
    let request = UpdateDataObjectRequest().with {
      $0.dataObject = dataObject
      $0.updateMask = updateMask
    }
    return try await self.updateDataObject(request: request)
  }

  public func batchUpdateDataObjects(request: BatchUpdateDataObjectsRequest) async throws
    -> GoogleCloudVectorSearchV1.BatchUpdateDataObjectsResponse
  {
    try await self.batchUpdateDataObjects(request: request, options: .init())
  }

  public func batchUpdateDataObjects(
    request: BatchUpdateDataObjectsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudVectorSearchV1.BatchUpdateDataObjectsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func batchUpdateDataObjects(
    parent: Swift.String,
    requests: [UpdateDataObjectRequest],
  ) async throws -> GoogleCloudVectorSearchV1.BatchUpdateDataObjectsResponse {
    let request = BatchUpdateDataObjectsRequest().with {
      $0.parent = parent
      $0.requests = requests
    }
    return try await self.batchUpdateDataObjects(request: request)
  }

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

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

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

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

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

  public func batchDeleteDataObjects(
    parent: Swift.String,
    requests: [DeleteDataObjectRequest],
  ) async throws {
    let request = BatchDeleteDataObjectsRequest().with {
      $0.parent = parent
      $0.requests = requests
    }
    try await self.batchDeleteDataObjects(request: 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)
  }
}
