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

/// The SessionTemplateController provides methods to manage session templates.
///
/// @Snippet(path: "SessionTemplateControllerQuickstart")
public class SessionTemplateControllerClient: Clients.SessionTemplateControllerProtocol {
  let inner: any Clients.SessionTemplateControllerStub

  /// Creates a new `SessionTemplateControllerClient` instance.
  public init(_ options: GoogleCloudGax.ClientOptions = .init()) throws {
    var inner: any Clients.SessionTemplateControllerStub =
      try Clients.SessionTemplateControllerTransport(options)
    inner = Clients.SessionTemplateControllerRetry(inner, options: options)
    if let logger = options.logger {
      inner = Clients.SessionTemplateControllerLogging(inner, logger: logger)
    }
    self.inner = inner
  }

  /// Create a session template synchronously.
  ///
  /// @Snippet(path: "SessionTemplateController_CreateSessionTemplate")
  public func createSessionTemplate(
    request: CreateSessionTemplateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudDataprocV1.SessionTemplate {
    try await self.inner.createSessionTemplate(request: request, options: options)
  }

  /// Updates the session template synchronously.
  ///
  /// @Snippet(path: "SessionTemplateController_UpdateSessionTemplate")
  public func updateSessionTemplate(
    request: UpdateSessionTemplateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudDataprocV1.SessionTemplate {
    try await self.inner.updateSessionTemplate(request: request, options: options)
  }

  /// Gets the resource representation for a session template.
  ///
  /// @Snippet(path: "SessionTemplateController_GetSessionTemplate")
  public func getSessionTemplate(
    request: GetSessionTemplateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudDataprocV1.SessionTemplate {
    try await self.inner.getSessionTemplate(request: request, options: options)
  }

  /// Lists session templates.
  ///
  /// @Snippet(path: "SessionTemplateController_ListSessionTemplates")
  public func listSessionTemplates(
    request: ListSessionTemplatesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudDataprocV1.ListSessionTemplatesResponse {
    try await self.inner.listSessionTemplates(request: request, options: options)
  }

  /// Lists session templates.
  ///
  /// @Snippet(path: "SessionTemplateController_ListSessionTemplates")
  public func listSessionTemplates(
    byItem: ListSessionTemplatesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<SessionTemplate, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudDataprocV1.ListSessionTemplatesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listSessionTemplates(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Deletes a session template.
  ///
  /// @Snippet(path: "SessionTemplateController_DeleteSessionTemplate")
  public func deleteSessionTemplate(
    request: DeleteSessionTemplateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.deleteSessionTemplate(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: "SessionTemplateController_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: "SessionTemplateController_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: "SessionTemplateController_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: "SessionTemplateController_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: "SessionTemplateController_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: "SessionTemplateController_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: "SessionTemplateController_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: "SessionTemplateController_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 `SessionTemplateControllerClient`.
  ///
  /// To mock `SessionTemplateControllerClient` change your functions to receive
  /// `some SessionTemplateControllerProtocol` or `any SessionTemplateControllerProtocol`
  /// and pass a mock implementation in your tests.
  public protocol SessionTemplateControllerProtocol {
    /// See `SessionTemplateControllerClient.createSessionTemplate`.
    func createSessionTemplate(request: CreateSessionTemplateRequest) async throws
      -> GoogleCloudDataprocV1.SessionTemplate

    /// See `SessionTemplateControllerClient.createSessionTemplate`.
    func createSessionTemplate(
      parent: Swift.String,
      sessionTemplate: SessionTemplate?,
    ) async throws -> GoogleCloudDataprocV1.SessionTemplate

    /// See `SessionTemplateControllerClient.updateSessionTemplate`.
    func updateSessionTemplate(request: UpdateSessionTemplateRequest) async throws
      -> GoogleCloudDataprocV1.SessionTemplate

    /// See `SessionTemplateControllerClient.updateSessionTemplate`.
    func updateSessionTemplate(
      sessionTemplate: SessionTemplate?,
    ) async throws -> GoogleCloudDataprocV1.SessionTemplate

    /// See `SessionTemplateControllerClient.getSessionTemplate`.
    func getSessionTemplate(request: GetSessionTemplateRequest) async throws
      -> GoogleCloudDataprocV1.SessionTemplate

    /// See `SessionTemplateControllerClient.getSessionTemplate`.
    func getSessionTemplate(
      name: Swift.String,
    ) async throws -> GoogleCloudDataprocV1.SessionTemplate

    /// See `SessionTemplateControllerClient.listSessionTemplates`.
    func listSessionTemplates(request: ListSessionTemplatesRequest) async throws
      -> GoogleCloudDataprocV1.ListSessionTemplatesResponse

    /// See `SessionTemplateControllerClient.listSessionTemplates`.
    func listSessionTemplates(
      byItem: ListSessionTemplatesRequest
    ) throws -> any AsyncSequence<SessionTemplate, Swift.Error>

    /// See `SessionTemplateControllerClient.listSessionTemplates`.
    func listSessionTemplates(
      parent: Swift.String,
    ) throws -> any AsyncSequence<SessionTemplate, Swift.Error>

    /// See `SessionTemplateControllerClient.deleteSessionTemplate`.
    func deleteSessionTemplate(request: DeleteSessionTemplateRequest) async throws

    /// See `SessionTemplateControllerClient.deleteSessionTemplate`.
    func deleteSessionTemplate(
      name: Swift.String,
    ) async throws

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

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

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

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

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

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

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

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

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

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

    /// See `SessionTemplateControllerClient.createSessionTemplate`.
    func createSessionTemplate(
      request: CreateSessionTemplateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudDataprocV1.SessionTemplate

    /// See `SessionTemplateControllerClient.updateSessionTemplate`.
    func updateSessionTemplate(
      request: UpdateSessionTemplateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudDataprocV1.SessionTemplate

    /// See `SessionTemplateControllerClient.getSessionTemplate`.
    func getSessionTemplate(
      request: GetSessionTemplateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudDataprocV1.SessionTemplate

    /// See `SessionTemplateControllerClient.listSessionTemplates`.
    func listSessionTemplates(
      request: ListSessionTemplatesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudDataprocV1.ListSessionTemplatesResponse

    /// See `SessionTemplateControllerClient.listSessionTemplates`.
    func listSessionTemplates(
      byItem: ListSessionTemplatesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<SessionTemplate, Swift.Error>

    /// See `SessionTemplateControllerClient.deleteSessionTemplate`.
    func deleteSessionTemplate(
      request: DeleteSessionTemplateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws

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

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

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

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

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

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

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

// Default implementations
extension Clients.SessionTemplateControllerProtocol {
  public func createSessionTemplate(request: CreateSessionTemplateRequest) async throws
    -> GoogleCloudDataprocV1.SessionTemplate
  {
    try await self.createSessionTemplate(request: request, options: .init())
  }

  public func createSessionTemplate(
    request: CreateSessionTemplateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudDataprocV1.SessionTemplate {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func createSessionTemplate(
    parent: Swift.String,
    sessionTemplate: SessionTemplate?,
  ) async throws -> GoogleCloudDataprocV1.SessionTemplate {
    let request = CreateSessionTemplateRequest().with {
      $0.parent = parent
      $0.sessionTemplate = sessionTemplate
    }
    return try await self.createSessionTemplate(request: request)
  }

  public func updateSessionTemplate(request: UpdateSessionTemplateRequest) async throws
    -> GoogleCloudDataprocV1.SessionTemplate
  {
    try await self.updateSessionTemplate(request: request, options: .init())
  }

  public func updateSessionTemplate(
    request: UpdateSessionTemplateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudDataprocV1.SessionTemplate {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func updateSessionTemplate(
    sessionTemplate: SessionTemplate?,
  ) async throws -> GoogleCloudDataprocV1.SessionTemplate {
    let request = UpdateSessionTemplateRequest().with {
      $0.sessionTemplate = sessionTemplate
    }
    return try await self.updateSessionTemplate(request: request)
  }

  public func getSessionTemplate(request: GetSessionTemplateRequest) async throws
    -> GoogleCloudDataprocV1.SessionTemplate
  {
    try await self.getSessionTemplate(request: request, options: .init())
  }

  public func getSessionTemplate(
    request: GetSessionTemplateRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudDataprocV1.SessionTemplate {
    throw GoogleCloudGax.RequestError.unimplemented
  }

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

  public func listSessionTemplates(request: ListSessionTemplatesRequest) async throws
    -> GoogleCloudDataprocV1.ListSessionTemplatesResponse
  {
    try await self.listSessionTemplates(request: request, options: .init())
  }

  public func listSessionTemplates(
    request: ListSessionTemplatesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudDataprocV1.ListSessionTemplatesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listSessionTemplates(
    byItem: ListSessionTemplatesRequest
  ) throws -> any AsyncSequence<SessionTemplate, Swift.Error> {
    try self.listSessionTemplates(byItem: byItem, options: .init())
  }

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

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

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

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

  public func deleteSessionTemplate(
    name: Swift.String,
  ) async throws {
    let request = DeleteSessionTemplateRequest().with {
      $0.name = name
    }
    try await self.deleteSessionTemplate(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)
  }
}
