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

/// The BatchController provides methods to manage batch workloads.
///
/// @Snippet(path: "BatchControllerQuickstart")
public class BatchControllerClient: Clients.BatchControllerProtocol {
  let inner: any Clients.BatchControllerStub
  let pollingErrorPolicy: GoogleCloudGax.PollingErrorPolicy
  let pollingBackoffPolicy: GoogleCloudGax.BackoffPolicy

  /// Creates a new `BatchControllerClient` instance.
  public init(_ options: GoogleCloudGax.ClientOptions = .init()) throws {
    var inner: any Clients.BatchControllerStub = try Clients.BatchControllerTransport(options)
    inner = Clients.BatchControllerRetry(inner, options: options)
    if let logger = options.logger {
      inner = Clients.BatchControllerLogging(inner, logger: logger)
    }
    self.inner = inner
    self.pollingErrorPolicy = options.pollingErrorPolicy
    self.pollingBackoffPolicy = options.pollingBackoffPolicy
  }

  /// Creates a batch workload that executes asynchronously.
  ///
  /// @Snippet(path: "BatchController_CreateBatch")
  public func createBatch(
    request: CreateBatchRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createBatch(request: request, options: options)
  }

  /// Creates a batch workload that executes asynchronously.
  ///
  /// @Snippet(path: "BatchController_CreateBatch")
  public func createBatch(
    withPolling: CreateBatchRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Batch> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws -> GoogleCloudGax._PollableOperationImpl<Batch>.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 Batch(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.createBatch(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Batch>.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 the batch workload resource representation.
  ///
  /// @Snippet(path: "BatchController_GetBatch")
  public func getBatch(
    request: GetBatchRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudDataprocV1.Batch {
    try await self.inner.getBatch(request: request, options: options)
  }

  /// Lists batch workloads.
  ///
  /// @Snippet(path: "BatchController_ListBatches")
  public func listBatches(
    request: ListBatchesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudDataprocV1.ListBatchesResponse {
    try await self.inner.listBatches(request: request, options: options)
  }

  /// Lists batch workloads.
  ///
  /// @Snippet(path: "BatchController_ListBatches")
  public func listBatches(
    byItem: ListBatchesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Batch, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudDataprocV1.ListBatchesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listBatches(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Deletes the batch workload resource. If the batch is not in a
  /// `CANCELLED`, `SUCCEEDED` or `FAILED`
  /// [`State`][google.cloud.dataproc.v1.Batch.State], the delete operation fails
  /// and the response returns `FAILED_PRECONDITION`.
  ///
  /// [google.cloud.dataproc.v1.Batch.State]: <doc:Batch/State>
  ///
  /// @Snippet(path: "BatchController_DeleteBatch")
  public func deleteBatch(
    request: DeleteBatchRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.deleteBatch(request: request, options: options)
  }

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

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

  /// Returns permissions that a caller has on the specified resource. If the
  /// resource does not exist, this will return an empty set of
  /// permissions, not a `NOT_FOUND` error.
  ///
  /// Note: This operation is designed to be used for building
  /// permission-aware UIs and command-line tools, not for authorization
  /// checking. This operation may "fail open" without warning.
  ///
  /// @Snippet(path: "BatchController_TestIamPermissions")
  public func testIamPermissions(
    request: GoogleIAMV1.TestIamPermissionsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleIAMV1.TestIamPermissionsResponse {
    try await self.inner.testIamPermissions(request: request, options: options)
  }

  /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
  ///
  /// [google.longrunning.Operations]: https://www.google.com/search?q=Swift+google.longrunning+Operations
  ///
  /// @Snippet(path: "BatchController_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: "BatchController_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: "BatchController_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: "BatchController_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: "BatchController_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 `BatchControllerClient`.
  ///
  /// To mock `BatchControllerClient` change your functions to receive
  /// `some BatchControllerProtocol` or `any BatchControllerProtocol`
  /// and pass a mock implementation in your tests.
  public protocol BatchControllerProtocol {
    /// See `BatchControllerClient.createBatch`.
    func createBatch(request: CreateBatchRequest) async throws -> GoogleLongRunning.Operation

    /// See `BatchControllerClient.createBatch`.
    func createBatch(withPolling: CreateBatchRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Batch>

    /// See `BatchControllerClient.createBatch`.
    func createBatch(
      parent: Swift.String,
      batch: Batch?,
      batchId: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<Batch>

    /// See `BatchControllerClient.getBatch`.
    func getBatch(request: GetBatchRequest) async throws -> GoogleCloudDataprocV1.Batch

    /// See `BatchControllerClient.getBatch`.
    func getBatch(
      name: Swift.String,
    ) async throws -> GoogleCloudDataprocV1.Batch

    /// See `BatchControllerClient.listBatches`.
    func listBatches(request: ListBatchesRequest) async throws
      -> GoogleCloudDataprocV1.ListBatchesResponse

    /// See `BatchControllerClient.listBatches`.
    func listBatches(
      byItem: ListBatchesRequest
    ) throws -> any AsyncSequence<Batch, Swift.Error>

    /// See `BatchControllerClient.listBatches`.
    func listBatches(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Batch, Swift.Error>

    /// See `BatchControllerClient.deleteBatch`.
    func deleteBatch(request: DeleteBatchRequest) async throws

    /// See `BatchControllerClient.deleteBatch`.
    func deleteBatch(
      name: Swift.String,
    ) async throws

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

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

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

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

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

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

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

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

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

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

    /// See `BatchControllerClient.createBatch`.
    func createBatch(
      request: CreateBatchRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BatchControllerClient.createBatch`.
    func createBatch(
      withPolling: CreateBatchRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Batch>

    /// See `BatchControllerClient.getBatch`.
    func getBatch(
      request: GetBatchRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudDataprocV1.Batch

    /// See `BatchControllerClient.listBatches`.
    func listBatches(
      request: ListBatchesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudDataprocV1.ListBatchesResponse

    /// See `BatchControllerClient.listBatches`.
    func listBatches(
      byItem: ListBatchesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Batch, Swift.Error>

    /// See `BatchControllerClient.deleteBatch`.
    func deleteBatch(
      request: DeleteBatchRequest, options: GoogleCloudGax.RequestOptions
    ) async throws

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

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

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

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

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

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

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

// Default implementations
extension Clients.BatchControllerProtocol {
  public func createBatch(request: CreateBatchRequest) async throws -> GoogleLongRunning.Operation {
    try await self.createBatch(request: request, options: .init())
  }

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

  public func createBatch(withPolling: CreateBatchRequest) async throws -> any GoogleCloudGax
    .PollableOperation<Batch>
  {
    try await self.createBatch(withPolling: withPolling, options: .init())
  }

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

  public func createBatch(
    parent: Swift.String,
    batch: Batch?,
    batchId: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Batch> {
    let request = CreateBatchRequest().with {
      $0.parent = parent
      $0.batch = batch
      $0.batchId = batchId
    }
    return try await self.createBatch(withPolling: request)
  }

  public func getBatch(request: GetBatchRequest) async throws -> GoogleCloudDataprocV1.Batch {
    try await self.getBatch(request: request, options: .init())
  }

  public func getBatch(
    request: GetBatchRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudDataprocV1.Batch {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getBatch(
    name: Swift.String,
  ) async throws -> GoogleCloudDataprocV1.Batch {
    let request = GetBatchRequest().with {
      $0.name = name
    }
    return try await self.getBatch(request: request)
  }

  public func listBatches(request: ListBatchesRequest) async throws
    -> GoogleCloudDataprocV1.ListBatchesResponse
  {
    try await self.listBatches(request: request, options: .init())
  }

  public func listBatches(
    request: ListBatchesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudDataprocV1.ListBatchesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listBatches(
    byItem: ListBatchesRequest
  ) throws -> any AsyncSequence<Batch, Swift.Error> {
    try self.listBatches(byItem: byItem, options: .init())
  }

  public func listBatches(
    byItem: ListBatchesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Batch, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudDataprocV1.ListBatchesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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