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

/// Performs management operations on Bare Metal Solution servers.
///
/// The `baremetalsolution.googleapis.com` service provides management
/// capabilities for Bare Metal Solution servers. To access the API methods, you
/// must assign Bare Metal Solution IAM roles containing the desired permissions
/// to your staff in your Google Cloud project. You must also enable the Bare
/// Metal Solution API. Once enabled, the methods act
/// upon specific servers in your Bare Metal Solution environment.
///
/// @Snippet(path: "BareMetalSolutionQuickstart")
public class BareMetalSolutionClient: Clients.BareMetalSolutionProtocol {
  let inner: any Clients.BareMetalSolutionStub
  let pollingErrorPolicy: GoogleCloudGax.PollingErrorPolicy
  let pollingBackoffPolicy: GoogleCloudGax.BackoffPolicy

  /// Creates a new `BareMetalSolutionClient` instance.
  public init(_ options: GoogleCloudGax.ClientOptions = .init()) throws {
    var inner: any Clients.BareMetalSolutionStub = try Clients.BareMetalSolutionTransport(options)
    inner = Clients.BareMetalSolutionRetry(inner, options: options)
    if let logger = options.logger {
      inner = Clients.BareMetalSolutionLogging(inner, logger: logger)
    }
    self.inner = inner
    self.pollingErrorPolicy = options.pollingErrorPolicy
    self.pollingBackoffPolicy = options.pollingBackoffPolicy
  }

  /// List servers in a given project and location.
  ///
  /// @Snippet(path: "BareMetalSolution_ListInstances")
  public func listInstances(
    request: ListInstancesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListInstancesResponse {
    try await self.inner.listInstances(request: request, options: options)
  }

  /// List servers in a given project and location.
  ///
  /// @Snippet(path: "BareMetalSolution_ListInstances")
  public func listInstances(
    byItem: ListInstancesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Instance, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudBareMetalSolutionV2.ListInstancesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listInstances(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Get details about a single server.
  ///
  /// @Snippet(path: "BareMetalSolution_GetInstance")
  public func getInstance(
    request: GetInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.Instance {
    try await self.inner.getInstance(request: request, options: options)
  }

  /// Update details of a single server.
  ///
  /// @Snippet(path: "BareMetalSolution_UpdateInstance")
  public func updateInstance(
    request: UpdateInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateInstance(request: request, options: options)
  }

  /// Update details of a single server.
  ///
  /// @Snippet(path: "BareMetalSolution_UpdateInstance")
  public func updateInstance(
    withPolling: UpdateInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Instance> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<Instance>.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 Instance(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.updateInstance(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Instance>.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,
    )
  }

  /// RenameInstance sets a new name for an instance.
  /// Use with caution, previous names become immediately invalidated.
  ///
  /// @Snippet(path: "BareMetalSolution_RenameInstance")
  public func renameInstance(
    request: RenameInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.Instance {
    try await self.inner.renameInstance(request: request, options: options)
  }

  /// Perform an ungraceful, hard reset on a server. Equivalent to shutting the
  /// power off and then turning it back on.
  ///
  /// @Snippet(path: "BareMetalSolution_ResetInstance")
  public func resetInstance(
    request: ResetInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.resetInstance(request: request, options: options)
  }

  /// Perform an ungraceful, hard reset on a server. Equivalent to shutting the
  /// power off and then turning it back on.
  ///
  /// @Snippet(path: "BareMetalSolution_ResetInstance")
  public func resetInstance(
    withPolling: ResetInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<ResetInstanceResponse> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<ResetInstanceResponse>.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 ResetInstanceResponse(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.resetInstance(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<ResetInstanceResponse>.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,
    )
  }

  /// Starts a server that was shutdown.
  ///
  /// @Snippet(path: "BareMetalSolution_StartInstance")
  public func startInstance(
    request: StartInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.startInstance(request: request, options: options)
  }

  /// Starts a server that was shutdown.
  ///
  /// @Snippet(path: "BareMetalSolution_StartInstance")
  public func startInstance(
    withPolling: StartInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<StartInstanceResponse> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<StartInstanceResponse>.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 StartInstanceResponse(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.startInstance(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<StartInstanceResponse>.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,
    )
  }

  /// Stop a running server.
  ///
  /// @Snippet(path: "BareMetalSolution_StopInstance")
  public func stopInstance(
    request: StopInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.stopInstance(request: request, options: options)
  }

  /// Stop a running server.
  ///
  /// @Snippet(path: "BareMetalSolution_StopInstance")
  public func stopInstance(
    withPolling: StopInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<StopInstanceResponse> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<StopInstanceResponse>.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 StopInstanceResponse(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.stopInstance(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws -> GoogleCloudGax._PollableOperationImpl<StopInstanceResponse>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Enable the interactive serial console feature on an instance.
  ///
  /// @Snippet(path: "BareMetalSolution_EnableInteractiveSerialConsole")
  public func enableInteractiveSerialConsole(
    request: EnableInteractiveSerialConsoleRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.enableInteractiveSerialConsole(request: request, options: options)
  }

  /// Enable the interactive serial console feature on an instance.
  ///
  /// @Snippet(path: "BareMetalSolution_EnableInteractiveSerialConsole")
  public func enableInteractiveSerialConsole(
    withPolling: EnableInteractiveSerialConsoleRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<EnableInteractiveSerialConsoleResponse> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<EnableInteractiveSerialConsoleResponse>.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 EnableInteractiveSerialConsoleResponse(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.enableInteractiveSerialConsole(
      request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws
        -> GoogleCloudGax._PollableOperationImpl<EnableInteractiveSerialConsoleResponse>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Disable the interactive serial console feature on an instance.
  ///
  /// @Snippet(path: "BareMetalSolution_DisableInteractiveSerialConsole")
  public func disableInteractiveSerialConsole(
    request: DisableInteractiveSerialConsoleRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.disableInteractiveSerialConsole(request: request, options: options)
  }

  /// Disable the interactive serial console feature on an instance.
  ///
  /// @Snippet(path: "BareMetalSolution_DisableInteractiveSerialConsole")
  public func disableInteractiveSerialConsole(
    withPolling: DisableInteractiveSerialConsoleRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<DisableInteractiveSerialConsoleResponse> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<DisableInteractiveSerialConsoleResponse>.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 DisableInteractiveSerialConsoleResponse(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.disableInteractiveSerialConsole(
      request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = {
      () async throws
        -> GoogleCloudGax._PollableOperationImpl<DisableInteractiveSerialConsoleResponse>.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,
    )
  }

  /// Detach LUN from Instance.
  ///
  /// @Snippet(path: "BareMetalSolution_DetachLun")
  public func detachLun(
    request: DetachLunRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.detachLun(request: request, options: options)
  }

  /// Detach LUN from Instance.
  ///
  /// @Snippet(path: "BareMetalSolution_DetachLun")
  public func detachLun(
    withPolling: DetachLunRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Instance> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<Instance>.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 Instance(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.detachLun(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Instance>.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 the public SSH keys registered for the specified project.
  /// These SSH keys are used only for the interactive serial console feature.
  ///
  /// @Snippet(path: "BareMetalSolution_ListSSHKeys")
  public func listSshkeys(
    request: ListSSHKeysRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListSSHKeysResponse {
    try await self.inner.listSshkeys(request: request, options: options)
  }

  /// Lists the public SSH keys registered for the specified project.
  /// These SSH keys are used only for the interactive serial console feature.
  ///
  /// @Snippet(path: "BareMetalSolution_ListSSHKeys")
  public func listSshkeys(
    byItem: ListSSHKeysRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<SSHKey, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudBareMetalSolutionV2.ListSSHKeysResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listSshkeys(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Register a public SSH key in the specified project for use with the
  /// interactive serial console feature.
  ///
  /// @Snippet(path: "BareMetalSolution_CreateSSHKey")
  public func createSshkey(
    request: CreateSSHKeyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.SSHKey {
    try await self.inner.createSshkey(request: request, options: options)
  }

  /// Deletes a public SSH key registered in the specified project.
  ///
  /// @Snippet(path: "BareMetalSolution_DeleteSSHKey")
  public func deleteSshkey(
    request: DeleteSSHKeyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.deleteSshkey(request: request, options: options)
  }

  /// List storage volumes in a given project and location.
  ///
  /// @Snippet(path: "BareMetalSolution_ListVolumes")
  public func listVolumes(
    request: ListVolumesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListVolumesResponse {
    try await self.inner.listVolumes(request: request, options: options)
  }

  /// List storage volumes in a given project and location.
  ///
  /// @Snippet(path: "BareMetalSolution_ListVolumes")
  public func listVolumes(
    byItem: ListVolumesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Volume, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudBareMetalSolutionV2.ListVolumesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listVolumes(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Get details of a single storage volume.
  ///
  /// @Snippet(path: "BareMetalSolution_GetVolume")
  public func getVolume(
    request: GetVolumeRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.Volume {
    try await self.inner.getVolume(request: request, options: options)
  }

  /// Update details of a single storage volume.
  ///
  /// @Snippet(path: "BareMetalSolution_UpdateVolume")
  public func updateVolume(
    request: UpdateVolumeRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateVolume(request: request, options: options)
  }

  /// Update details of a single storage volume.
  ///
  /// @Snippet(path: "BareMetalSolution_UpdateVolume")
  public func updateVolume(
    withPolling: UpdateVolumeRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Volume> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<Volume>.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 Volume(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.updateVolume(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Volume>.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,
    )
  }

  /// RenameVolume sets a new name for a volume.
  /// Use with caution, previous names become immediately invalidated.
  ///
  /// @Snippet(path: "BareMetalSolution_RenameVolume")
  public func renameVolume(
    request: RenameVolumeRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.Volume {
    try await self.inner.renameVolume(request: request, options: options)
  }

  /// Skips volume's cooloff and deletes it now.
  /// Volume must be in cooloff state.
  ///
  /// @Snippet(path: "BareMetalSolution_EvictVolume")
  public func evictVolume(
    request: EvictVolumeRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.evictVolume(request: request, options: options)
  }

  /// Skips volume's cooloff and deletes it now.
  /// Volume must be in cooloff state.
  ///
  /// @Snippet(path: "BareMetalSolution_EvictVolume")
  public func evictVolume(
    withPolling: EvictVolumeRequest, 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.evictVolume(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,
    )
  }

  /// Emergency Volume resize.
  ///
  /// @Snippet(path: "BareMetalSolution_ResizeVolume")
  public func resizeVolume(
    request: ResizeVolumeRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.resizeVolume(request: request, options: options)
  }

  /// Emergency Volume resize.
  ///
  /// @Snippet(path: "BareMetalSolution_ResizeVolume")
  public func resizeVolume(
    withPolling: ResizeVolumeRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Volume> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<Volume>.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 Volume(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.resizeVolume(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Volume>.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,
    )
  }

  /// List network in a given project and location.
  ///
  /// @Snippet(path: "BareMetalSolution_ListNetworks")
  public func listNetworks(
    request: ListNetworksRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListNetworksResponse {
    try await self.inner.listNetworks(request: request, options: options)
  }

  /// List network in a given project and location.
  ///
  /// @Snippet(path: "BareMetalSolution_ListNetworks")
  public func listNetworks(
    byItem: ListNetworksRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Network, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudBareMetalSolutionV2.ListNetworksResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listNetworks(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// List all Networks (and used IPs for each Network) in the vendor account
  /// associated with the specified project.
  ///
  /// @Snippet(path: "BareMetalSolution_ListNetworkUsage")
  public func listNetworkUsage(
    request: ListNetworkUsageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListNetworkUsageResponse {
    try await self.inner.listNetworkUsage(request: request, options: options)
  }

  /// Get details of a single network.
  ///
  /// @Snippet(path: "BareMetalSolution_GetNetwork")
  public func getNetwork(
    request: GetNetworkRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.Network {
    try await self.inner.getNetwork(request: request, options: options)
  }

  /// Update details of a single network.
  ///
  /// @Snippet(path: "BareMetalSolution_UpdateNetwork")
  public func updateNetwork(
    request: UpdateNetworkRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateNetwork(request: request, options: options)
  }

  /// Update details of a single network.
  ///
  /// @Snippet(path: "BareMetalSolution_UpdateNetwork")
  public func updateNetwork(
    withPolling: UpdateNetworkRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<Network> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<Network>.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 Network(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.updateNetwork(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<Network>.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,
    )
  }

  /// Takes a snapshot of a boot volume.
  /// Returns INVALID_ARGUMENT if called for a non-boot volume.
  ///
  /// @Snippet(path: "BareMetalSolution_CreateVolumeSnapshot")
  public func createVolumeSnapshot(
    request: CreateVolumeSnapshotRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.VolumeSnapshot {
    try await self.inner.createVolumeSnapshot(request: request, options: options)
  }

  /// Uses the specified snapshot to restore its parent volume.
  /// Returns INVALID_ARGUMENT if called for a non-boot volume.
  ///
  /// @Snippet(path: "BareMetalSolution_RestoreVolumeSnapshot")
  public func restoreVolumeSnapshot(
    request: RestoreVolumeSnapshotRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.restoreVolumeSnapshot(request: request, options: options)
  }

  /// Uses the specified snapshot to restore its parent volume.
  /// Returns INVALID_ARGUMENT if called for a non-boot volume.
  ///
  /// @Snippet(path: "BareMetalSolution_RestoreVolumeSnapshot")
  public func restoreVolumeSnapshot(
    withPolling: RestoreVolumeSnapshotRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<VolumeSnapshot> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<VolumeSnapshot>.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 VolumeSnapshot(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.restoreVolumeSnapshot(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<VolumeSnapshot>.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,
    )
  }

  /// Deletes a volume snapshot.
  /// Returns INVALID_ARGUMENT if called for a non-boot volume.
  ///
  /// @Snippet(path: "BareMetalSolution_DeleteVolumeSnapshot")
  public func deleteVolumeSnapshot(
    request: DeleteVolumeSnapshotRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.deleteVolumeSnapshot(request: request, options: options)
  }

  /// Returns the specified snapshot resource.
  /// Returns INVALID_ARGUMENT if called for a non-boot volume.
  ///
  /// @Snippet(path: "BareMetalSolution_GetVolumeSnapshot")
  public func getVolumeSnapshot(
    request: GetVolumeSnapshotRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.VolumeSnapshot {
    try await self.inner.getVolumeSnapshot(request: request, options: options)
  }

  /// Retrieves the list of snapshots for the specified volume.
  /// Returns a response with an empty list of snapshots if called
  /// for a non-boot volume.
  ///
  /// @Snippet(path: "BareMetalSolution_ListVolumeSnapshots")
  public func listVolumeSnapshots(
    request: ListVolumeSnapshotsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListVolumeSnapshotsResponse {
    try await self.inner.listVolumeSnapshots(request: request, options: options)
  }

  /// Retrieves the list of snapshots for the specified volume.
  /// Returns a response with an empty list of snapshots if called
  /// for a non-boot volume.
  ///
  /// @Snippet(path: "BareMetalSolution_ListVolumeSnapshots")
  public func listVolumeSnapshots(
    byItem: ListVolumeSnapshotsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<VolumeSnapshot, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudBareMetalSolutionV2.ListVolumeSnapshotsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listVolumeSnapshots(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Get details of a single storage logical unit number(LUN).
  ///
  /// @Snippet(path: "BareMetalSolution_GetLun")
  public func getLun(
    request: GetLunRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.Lun {
    try await self.inner.getLun(request: request, options: options)
  }

  /// List storage volume luns for given storage volume.
  ///
  /// @Snippet(path: "BareMetalSolution_ListLuns")
  public func listLuns(
    request: ListLunsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListLunsResponse {
    try await self.inner.listLuns(request: request, options: options)
  }

  /// List storage volume luns for given storage volume.
  ///
  /// @Snippet(path: "BareMetalSolution_ListLuns")
  public func listLuns(
    byItem: ListLunsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Lun, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudBareMetalSolutionV2.ListLunsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listLuns(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Skips lun's cooloff and deletes it now.
  /// Lun must be in cooloff state.
  ///
  /// @Snippet(path: "BareMetalSolution_EvictLun")
  public func evictLun(
    request: EvictLunRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.evictLun(request: request, options: options)
  }

  /// Skips lun's cooloff and deletes it now.
  /// Lun must be in cooloff state.
  ///
  /// @Snippet(path: "BareMetalSolution_EvictLun")
  public func evictLun(
    withPolling: EvictLunRequest, 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.evictLun(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,
    )
  }

  /// Get details of a single NFS share.
  ///
  /// @Snippet(path: "BareMetalSolution_GetNfsShare")
  public func getNfsShare(
    request: GetNfsShareRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.NfsShare {
    try await self.inner.getNfsShare(request: request, options: options)
  }

  /// List NFS shares.
  ///
  /// @Snippet(path: "BareMetalSolution_ListNfsShares")
  public func listNfsShares(
    request: ListNfsSharesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListNfsSharesResponse {
    try await self.inner.listNfsShares(request: request, options: options)
  }

  /// List NFS shares.
  ///
  /// @Snippet(path: "BareMetalSolution_ListNfsShares")
  public func listNfsShares(
    byItem: ListNfsSharesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<NfsShare, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudBareMetalSolutionV2.ListNfsSharesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listNfsShares(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Update details of a single NFS share.
  ///
  /// @Snippet(path: "BareMetalSolution_UpdateNfsShare")
  public func updateNfsShare(
    request: UpdateNfsShareRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateNfsShare(request: request, options: options)
  }

  /// Update details of a single NFS share.
  ///
  /// @Snippet(path: "BareMetalSolution_UpdateNfsShare")
  public func updateNfsShare(
    withPolling: UpdateNfsShareRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<NfsShare> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<NfsShare>.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 NfsShare(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.updateNfsShare(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<NfsShare>.State in
      let op = try await self.getOperation(
        request: .init().with { $0.name = rawOp.name }, options: options)
      return try extractStatus(op)
    }
    return GoogleCloudGax._PollableOperationImpl(
      initialState: initialState,
      polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
      backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
      poll: poll,
    )
  }

  /// Create an NFS share.
  ///
  /// @Snippet(path: "BareMetalSolution_CreateNfsShare")
  public func createNfsShare(
    request: CreateNfsShareRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createNfsShare(request: request, options: options)
  }

  /// Create an NFS share.
  ///
  /// @Snippet(path: "BareMetalSolution_CreateNfsShare")
  public func createNfsShare(
    withPolling: CreateNfsShareRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> any GoogleCloudGax.PollableOperation<NfsShare> {
    let extractStatus = {
      (op: GoogleLongRunning.Operation) throws
        -> GoogleCloudGax._PollableOperationImpl<NfsShare>.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 NfsShare(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.createNfsShare(request: withPolling, options: options)
    let initialState = try extractStatus(rawOp)
    let poll = { () async throws -> GoogleCloudGax._PollableOperationImpl<NfsShare>.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,
    )
  }

  /// RenameNfsShare sets a new name for an nfsshare.
  /// Use with caution, previous names become immediately invalidated.
  ///
  /// @Snippet(path: "BareMetalSolution_RenameNfsShare")
  public func renameNfsShare(
    request: RenameNfsShareRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.NfsShare {
    try await self.inner.renameNfsShare(request: request, options: options)
  }

  /// Delete an NFS share. The underlying volume is automatically deleted.
  ///
  /// @Snippet(path: "BareMetalSolution_DeleteNfsShare")
  public func deleteNfsShare(
    request: DeleteNfsShareRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteNfsShare(request: request, options: options)
  }

  /// Delete an NFS share. The underlying volume is automatically deleted.
  ///
  /// @Snippet(path: "BareMetalSolution_DeleteNfsShare")
  public func deleteNfsShare(
    withPolling: DeleteNfsShareRequest, 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.deleteNfsShare(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,
    )
  }

  /// List the budget details to provision resources on a given project.
  ///
  /// @Snippet(path: "BareMetalSolution_ListProvisioningQuotas")
  public func listProvisioningQuotas(
    request: ListProvisioningQuotasRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListProvisioningQuotasResponse {
    try await self.inner.listProvisioningQuotas(request: request, options: options)
  }

  /// List the budget details to provision resources on a given project.
  ///
  /// @Snippet(path: "BareMetalSolution_ListProvisioningQuotas")
  public func listProvisioningQuotas(
    byItem: ListProvisioningQuotasRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<ProvisioningQuota, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudBareMetalSolutionV2.ListProvisioningQuotasResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listProvisioningQuotas(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Submit a provisiong configuration for a given project.
  ///
  /// @Snippet(path: "BareMetalSolution_SubmitProvisioningConfig")
  public func submitProvisioningConfig(
    request: SubmitProvisioningConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.SubmitProvisioningConfigResponse {
    try await self.inner.submitProvisioningConfig(request: request, options: options)
  }

  /// Get ProvisioningConfig by name.
  ///
  /// @Snippet(path: "BareMetalSolution_GetProvisioningConfig")
  public func getProvisioningConfig(
    request: GetProvisioningConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig {
    try await self.inner.getProvisioningConfig(request: request, options: options)
  }

  /// Create new ProvisioningConfig.
  ///
  /// @Snippet(path: "BareMetalSolution_CreateProvisioningConfig")
  public func createProvisioningConfig(
    request: CreateProvisioningConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig {
    try await self.inner.createProvisioningConfig(request: request, options: options)
  }

  /// Update existing ProvisioningConfig.
  ///
  /// @Snippet(path: "BareMetalSolution_UpdateProvisioningConfig")
  public func updateProvisioningConfig(
    request: UpdateProvisioningConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig {
    try await self.inner.updateProvisioningConfig(request: request, options: options)
  }

  /// RenameNetwork sets a new name for a network.
  /// Use with caution, previous names become immediately invalidated.
  ///
  /// @Snippet(path: "BareMetalSolution_RenameNetwork")
  public func renameNetwork(
    request: RenameNetworkRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.Network {
    try await self.inner.renameNetwork(request: request, options: options)
  }

  /// Retrieves the list of OS images which are currently approved.
  ///
  /// @Snippet(path: "BareMetalSolution_ListOSImages")
  public func listOsimages(
    request: ListOSImagesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListOSImagesResponse {
    try await self.inner.listOsimages(request: request, options: options)
  }

  /// Retrieves the list of OS images which are currently approved.
  ///
  /// @Snippet(path: "BareMetalSolution_ListOSImages")
  public func listOsimages(
    byItem: ListOSImagesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<OSImage, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudBareMetalSolutionV2.ListOSImagesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listOsimages(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Lists information about the supported locations for this service.
  ///
  /// @Snippet(path: "BareMetalSolution_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: "BareMetalSolution_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: "BareMetalSolution_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: "BareMetalSolution_GetOperation")
  func getOperation(
    request: GoogleLongRunning.GetOperationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.getOperation(request: request, options: options)
  }
}

extension Clients {
  /// A Swift protocol to mock `BareMetalSolutionClient`.
  ///
  /// To mock `BareMetalSolutionClient` change your functions to receive
  /// `some BareMetalSolutionProtocol` or `any BareMetalSolutionProtocol`
  /// and pass a mock implementation in your tests.
  public protocol BareMetalSolutionProtocol {
    /// See `BareMetalSolutionClient.listInstances`.
    func listInstances(request: ListInstancesRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.ListInstancesResponse

    /// See `BareMetalSolutionClient.listInstances`.
    func listInstances(
      byItem: ListInstancesRequest
    ) throws -> any AsyncSequence<Instance, Swift.Error>

    /// See `BareMetalSolutionClient.listInstances`.
    func listInstances(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Instance, Swift.Error>

    /// See `BareMetalSolutionClient.getInstance`.
    func getInstance(request: GetInstanceRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.Instance

    /// See `BareMetalSolutionClient.getInstance`.
    func getInstance(
      name: Swift.String,
    ) async throws -> GoogleCloudBareMetalSolutionV2.Instance

    /// See `BareMetalSolutionClient.updateInstance`.
    func updateInstance(request: UpdateInstanceRequest) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.updateInstance`.
    func updateInstance(withPolling: UpdateInstanceRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Instance>

    /// See `BareMetalSolutionClient.updateInstance`.
    func updateInstance(
      instance: Instance?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> any GoogleCloudGax.PollableOperation<Instance>

    /// See `BareMetalSolutionClient.renameInstance`.
    func renameInstance(request: RenameInstanceRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.Instance

    /// See `BareMetalSolutionClient.renameInstance`.
    func renameInstance(
      name: Swift.String,
      newInstanceId: Swift.String,
    ) async throws -> GoogleCloudBareMetalSolutionV2.Instance

    /// See `BareMetalSolutionClient.resetInstance`.
    func resetInstance(request: ResetInstanceRequest) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.resetInstance`.
    func resetInstance(withPolling: ResetInstanceRequest) async throws -> any GoogleCloudGax
      .PollableOperation<ResetInstanceResponse>

    /// See `BareMetalSolutionClient.resetInstance`.
    func resetInstance(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<ResetInstanceResponse>

    /// See `BareMetalSolutionClient.startInstance`.
    func startInstance(request: StartInstanceRequest) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.startInstance`.
    func startInstance(withPolling: StartInstanceRequest) async throws -> any GoogleCloudGax
      .PollableOperation<StartInstanceResponse>

    /// See `BareMetalSolutionClient.startInstance`.
    func startInstance(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<StartInstanceResponse>

    /// See `BareMetalSolutionClient.stopInstance`.
    func stopInstance(request: StopInstanceRequest) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.stopInstance`.
    func stopInstance(withPolling: StopInstanceRequest) async throws -> any GoogleCloudGax
      .PollableOperation<StopInstanceResponse>

    /// See `BareMetalSolutionClient.stopInstance`.
    func stopInstance(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<StopInstanceResponse>

    /// See `BareMetalSolutionClient.enableInteractiveSerialConsole`.
    func enableInteractiveSerialConsole(request: EnableInteractiveSerialConsoleRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.enableInteractiveSerialConsole`.
    func enableInteractiveSerialConsole(withPolling: EnableInteractiveSerialConsoleRequest)
      async throws -> any GoogleCloudGax.PollableOperation<EnableInteractiveSerialConsoleResponse>

    /// See `BareMetalSolutionClient.enableInteractiveSerialConsole`.
    func enableInteractiveSerialConsole(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<EnableInteractiveSerialConsoleResponse>

    /// See `BareMetalSolutionClient.disableInteractiveSerialConsole`.
    func disableInteractiveSerialConsole(request: DisableInteractiveSerialConsoleRequest)
      async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.disableInteractiveSerialConsole`.
    func disableInteractiveSerialConsole(withPolling: DisableInteractiveSerialConsoleRequest)
      async throws -> any GoogleCloudGax.PollableOperation<DisableInteractiveSerialConsoleResponse>

    /// See `BareMetalSolutionClient.disableInteractiveSerialConsole`.
    func disableInteractiveSerialConsole(
      name: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<DisableInteractiveSerialConsoleResponse>

    /// See `BareMetalSolutionClient.detachLun`.
    func detachLun(request: DetachLunRequest) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.detachLun`.
    func detachLun(withPolling: DetachLunRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Instance>

    /// See `BareMetalSolutionClient.detachLun`.
    func detachLun(
      instance: Swift.String,
      lun: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<Instance>

    /// See `BareMetalSolutionClient.listSshkeys`.
    func listSshkeys(request: ListSSHKeysRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.ListSSHKeysResponse

    /// See `BareMetalSolutionClient.listSshkeys`.
    func listSshkeys(
      byItem: ListSSHKeysRequest
    ) throws -> any AsyncSequence<SSHKey, Swift.Error>

    /// See `BareMetalSolutionClient.listSshkeys`.
    func listSshkeys(
      parent: Swift.String,
    ) throws -> any AsyncSequence<SSHKey, Swift.Error>

    /// See `BareMetalSolutionClient.createSshkey`.
    func createSshkey(request: CreateSSHKeyRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.SSHKey

    /// See `BareMetalSolutionClient.createSshkey`.
    func createSshkey(
      parent: Swift.String,
      sshKey: SSHKey?,
      sshKeyId: Swift.String,
    ) async throws -> GoogleCloudBareMetalSolutionV2.SSHKey

    /// See `BareMetalSolutionClient.deleteSshkey`.
    func deleteSshkey(request: DeleteSSHKeyRequest) async throws

    /// See `BareMetalSolutionClient.deleteSshkey`.
    func deleteSshkey(
      name: Swift.String,
    ) async throws

    /// See `BareMetalSolutionClient.listVolumes`.
    func listVolumes(request: ListVolumesRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.ListVolumesResponse

    /// See `BareMetalSolutionClient.listVolumes`.
    func listVolumes(
      byItem: ListVolumesRequest
    ) throws -> any AsyncSequence<Volume, Swift.Error>

    /// See `BareMetalSolutionClient.listVolumes`.
    func listVolumes(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Volume, Swift.Error>

    /// See `BareMetalSolutionClient.getVolume`.
    func getVolume(request: GetVolumeRequest) async throws -> GoogleCloudBareMetalSolutionV2.Volume

    /// See `BareMetalSolutionClient.getVolume`.
    func getVolume(
      name: Swift.String,
    ) async throws -> GoogleCloudBareMetalSolutionV2.Volume

    /// See `BareMetalSolutionClient.updateVolume`.
    func updateVolume(request: UpdateVolumeRequest) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.updateVolume`.
    func updateVolume(withPolling: UpdateVolumeRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Volume>

    /// See `BareMetalSolutionClient.updateVolume`.
    func updateVolume(
      volume: Volume?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> any GoogleCloudGax.PollableOperation<Volume>

    /// See `BareMetalSolutionClient.renameVolume`.
    func renameVolume(request: RenameVolumeRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.Volume

    /// See `BareMetalSolutionClient.renameVolume`.
    func renameVolume(
      name: Swift.String,
      newVolumeId: Swift.String,
    ) async throws -> GoogleCloudBareMetalSolutionV2.Volume

    /// See `BareMetalSolutionClient.evictVolume`.
    func evictVolume(request: EvictVolumeRequest) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.evictVolume`.
    func evictVolume(withPolling: EvictVolumeRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

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

    /// See `BareMetalSolutionClient.resizeVolume`.
    func resizeVolume(request: ResizeVolumeRequest) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.resizeVolume`.
    func resizeVolume(withPolling: ResizeVolumeRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Volume>

    /// See `BareMetalSolutionClient.resizeVolume`.
    func resizeVolume(
      volume: Swift.String,
      sizeGib: Swift.Int64,
    ) async throws -> any GoogleCloudGax.PollableOperation<Volume>

    /// See `BareMetalSolutionClient.listNetworks`.
    func listNetworks(request: ListNetworksRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.ListNetworksResponse

    /// See `BareMetalSolutionClient.listNetworks`.
    func listNetworks(
      byItem: ListNetworksRequest
    ) throws -> any AsyncSequence<Network, Swift.Error>

    /// See `BareMetalSolutionClient.listNetworks`.
    func listNetworks(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Network, Swift.Error>

    /// See `BareMetalSolutionClient.listNetworkUsage`.
    func listNetworkUsage(request: ListNetworkUsageRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.ListNetworkUsageResponse

    /// See `BareMetalSolutionClient.listNetworkUsage`.
    func listNetworkUsage(
      location: Swift.String,
    ) async throws -> GoogleCloudBareMetalSolutionV2.ListNetworkUsageResponse

    /// See `BareMetalSolutionClient.getNetwork`.
    func getNetwork(request: GetNetworkRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.Network

    /// See `BareMetalSolutionClient.getNetwork`.
    func getNetwork(
      name: Swift.String,
    ) async throws -> GoogleCloudBareMetalSolutionV2.Network

    /// See `BareMetalSolutionClient.updateNetwork`.
    func updateNetwork(request: UpdateNetworkRequest) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.updateNetwork`.
    func updateNetwork(withPolling: UpdateNetworkRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Network>

    /// See `BareMetalSolutionClient.updateNetwork`.
    func updateNetwork(
      network: Network?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> any GoogleCloudGax.PollableOperation<Network>

    /// See `BareMetalSolutionClient.createVolumeSnapshot`.
    func createVolumeSnapshot(request: CreateVolumeSnapshotRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.VolumeSnapshot

    /// See `BareMetalSolutionClient.createVolumeSnapshot`.
    func createVolumeSnapshot(
      parent: Swift.String,
      volumeSnapshot: VolumeSnapshot?,
    ) async throws -> GoogleCloudBareMetalSolutionV2.VolumeSnapshot

    /// See `BareMetalSolutionClient.restoreVolumeSnapshot`.
    func restoreVolumeSnapshot(request: RestoreVolumeSnapshotRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.restoreVolumeSnapshot`.
    func restoreVolumeSnapshot(withPolling: RestoreVolumeSnapshotRequest) async throws
      -> any GoogleCloudGax.PollableOperation<VolumeSnapshot>

    /// See `BareMetalSolutionClient.restoreVolumeSnapshot`.
    func restoreVolumeSnapshot(
      volumeSnapshot: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<VolumeSnapshot>

    /// See `BareMetalSolutionClient.deleteVolumeSnapshot`.
    func deleteVolumeSnapshot(request: DeleteVolumeSnapshotRequest) async throws

    /// See `BareMetalSolutionClient.deleteVolumeSnapshot`.
    func deleteVolumeSnapshot(
      name: Swift.String,
    ) async throws

    /// See `BareMetalSolutionClient.getVolumeSnapshot`.
    func getVolumeSnapshot(request: GetVolumeSnapshotRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.VolumeSnapshot

    /// See `BareMetalSolutionClient.getVolumeSnapshot`.
    func getVolumeSnapshot(
      name: Swift.String,
    ) async throws -> GoogleCloudBareMetalSolutionV2.VolumeSnapshot

    /// See `BareMetalSolutionClient.listVolumeSnapshots`.
    func listVolumeSnapshots(request: ListVolumeSnapshotsRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.ListVolumeSnapshotsResponse

    /// See `BareMetalSolutionClient.listVolumeSnapshots`.
    func listVolumeSnapshots(
      byItem: ListVolumeSnapshotsRequest
    ) throws -> any AsyncSequence<VolumeSnapshot, Swift.Error>

    /// See `BareMetalSolutionClient.listVolumeSnapshots`.
    func listVolumeSnapshots(
      parent: Swift.String,
    ) throws -> any AsyncSequence<VolumeSnapshot, Swift.Error>

    /// See `BareMetalSolutionClient.getLun`.
    func getLun(request: GetLunRequest) async throws -> GoogleCloudBareMetalSolutionV2.Lun

    /// See `BareMetalSolutionClient.getLun`.
    func getLun(
      name: Swift.String,
    ) async throws -> GoogleCloudBareMetalSolutionV2.Lun

    /// See `BareMetalSolutionClient.listLuns`.
    func listLuns(request: ListLunsRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.ListLunsResponse

    /// See `BareMetalSolutionClient.listLuns`.
    func listLuns(
      byItem: ListLunsRequest
    ) throws -> any AsyncSequence<Lun, Swift.Error>

    /// See `BareMetalSolutionClient.listLuns`.
    func listLuns(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Lun, Swift.Error>

    /// See `BareMetalSolutionClient.evictLun`.
    func evictLun(request: EvictLunRequest) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.evictLun`.
    func evictLun(withPolling: EvictLunRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

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

    /// See `BareMetalSolutionClient.getNfsShare`.
    func getNfsShare(request: GetNfsShareRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.NfsShare

    /// See `BareMetalSolutionClient.getNfsShare`.
    func getNfsShare(
      name: Swift.String,
    ) async throws -> GoogleCloudBareMetalSolutionV2.NfsShare

    /// See `BareMetalSolutionClient.listNfsShares`.
    func listNfsShares(request: ListNfsSharesRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.ListNfsSharesResponse

    /// See `BareMetalSolutionClient.listNfsShares`.
    func listNfsShares(
      byItem: ListNfsSharesRequest
    ) throws -> any AsyncSequence<NfsShare, Swift.Error>

    /// See `BareMetalSolutionClient.listNfsShares`.
    func listNfsShares(
      parent: Swift.String,
    ) throws -> any AsyncSequence<NfsShare, Swift.Error>

    /// See `BareMetalSolutionClient.updateNfsShare`.
    func updateNfsShare(request: UpdateNfsShareRequest) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.updateNfsShare`.
    func updateNfsShare(withPolling: UpdateNfsShareRequest) async throws -> any GoogleCloudGax
      .PollableOperation<NfsShare>

    /// See `BareMetalSolutionClient.updateNfsShare`.
    func updateNfsShare(
      nfsShare: NfsShare?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> any GoogleCloudGax.PollableOperation<NfsShare>

    /// See `BareMetalSolutionClient.createNfsShare`.
    func createNfsShare(request: CreateNfsShareRequest) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.createNfsShare`.
    func createNfsShare(withPolling: CreateNfsShareRequest) async throws -> any GoogleCloudGax
      .PollableOperation<NfsShare>

    /// See `BareMetalSolutionClient.createNfsShare`.
    func createNfsShare(
      parent: Swift.String,
      nfsShare: NfsShare?,
    ) async throws -> any GoogleCloudGax.PollableOperation<NfsShare>

    /// See `BareMetalSolutionClient.renameNfsShare`.
    func renameNfsShare(request: RenameNfsShareRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.NfsShare

    /// See `BareMetalSolutionClient.renameNfsShare`.
    func renameNfsShare(
      name: Swift.String,
      newNfsshareId: Swift.String,
    ) async throws -> GoogleCloudBareMetalSolutionV2.NfsShare

    /// See `BareMetalSolutionClient.deleteNfsShare`.
    func deleteNfsShare(request: DeleteNfsShareRequest) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.deleteNfsShare`.
    func deleteNfsShare(withPolling: DeleteNfsShareRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

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

    /// See `BareMetalSolutionClient.listProvisioningQuotas`.
    func listProvisioningQuotas(request: ListProvisioningQuotasRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.ListProvisioningQuotasResponse

    /// See `BareMetalSolutionClient.listProvisioningQuotas`.
    func listProvisioningQuotas(
      byItem: ListProvisioningQuotasRequest
    ) throws -> any AsyncSequence<ProvisioningQuota, Swift.Error>

    /// See `BareMetalSolutionClient.listProvisioningQuotas`.
    func listProvisioningQuotas(
      parent: Swift.String,
    ) throws -> any AsyncSequence<ProvisioningQuota, Swift.Error>

    /// See `BareMetalSolutionClient.submitProvisioningConfig`.
    func submitProvisioningConfig(request: SubmitProvisioningConfigRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.SubmitProvisioningConfigResponse

    /// See `BareMetalSolutionClient.submitProvisioningConfig`.
    func submitProvisioningConfig(
      parent: Swift.String,
      provisioningConfig: ProvisioningConfig?,
    ) async throws -> GoogleCloudBareMetalSolutionV2.SubmitProvisioningConfigResponse

    /// See `BareMetalSolutionClient.getProvisioningConfig`.
    func getProvisioningConfig(request: GetProvisioningConfigRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig

    /// See `BareMetalSolutionClient.getProvisioningConfig`.
    func getProvisioningConfig(
      name: Swift.String,
    ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig

    /// See `BareMetalSolutionClient.createProvisioningConfig`.
    func createProvisioningConfig(request: CreateProvisioningConfigRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig

    /// See `BareMetalSolutionClient.createProvisioningConfig`.
    func createProvisioningConfig(
      parent: Swift.String,
      provisioningConfig: ProvisioningConfig?,
    ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig

    /// See `BareMetalSolutionClient.updateProvisioningConfig`.
    func updateProvisioningConfig(request: UpdateProvisioningConfigRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig

    /// See `BareMetalSolutionClient.updateProvisioningConfig`.
    func updateProvisioningConfig(
      provisioningConfig: ProvisioningConfig?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig

    /// See `BareMetalSolutionClient.renameNetwork`.
    func renameNetwork(request: RenameNetworkRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.Network

    /// See `BareMetalSolutionClient.renameNetwork`.
    func renameNetwork(
      name: Swift.String,
      newNetworkId: Swift.String,
    ) async throws -> GoogleCloudBareMetalSolutionV2.Network

    /// See `BareMetalSolutionClient.listOsimages`.
    func listOsimages(request: ListOSImagesRequest) async throws
      -> GoogleCloudBareMetalSolutionV2.ListOSImagesResponse

    /// See `BareMetalSolutionClient.listOsimages`.
    func listOsimages(
      byItem: ListOSImagesRequest
    ) throws -> any AsyncSequence<OSImage, Swift.Error>

    /// See `BareMetalSolutionClient.listOsimages`.
    func listOsimages(
      parent: Swift.String,
    ) throws -> any AsyncSequence<OSImage, Swift.Error>

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

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

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

    /// See `BareMetalSolutionClient.listInstances`.
    func listInstances(
      request: ListInstancesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.ListInstancesResponse

    /// See `BareMetalSolutionClient.listInstances`.
    func listInstances(
      byItem: ListInstancesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Instance, Swift.Error>

    /// See `BareMetalSolutionClient.getInstance`.
    func getInstance(
      request: GetInstanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.Instance

    /// See `BareMetalSolutionClient.updateInstance`.
    func updateInstance(
      request: UpdateInstanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.updateInstance`.
    func updateInstance(
      withPolling: UpdateInstanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Instance>

    /// See `BareMetalSolutionClient.renameInstance`.
    func renameInstance(
      request: RenameInstanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.Instance

    /// See `BareMetalSolutionClient.resetInstance`.
    func resetInstance(
      request: ResetInstanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.resetInstance`.
    func resetInstance(
      withPolling: ResetInstanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<ResetInstanceResponse>

    /// See `BareMetalSolutionClient.startInstance`.
    func startInstance(
      request: StartInstanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.startInstance`.
    func startInstance(
      withPolling: StartInstanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<StartInstanceResponse>

    /// See `BareMetalSolutionClient.stopInstance`.
    func stopInstance(
      request: StopInstanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.stopInstance`.
    func stopInstance(
      withPolling: StopInstanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<StopInstanceResponse>

    /// See `BareMetalSolutionClient.enableInteractiveSerialConsole`.
    func enableInteractiveSerialConsole(
      request: EnableInteractiveSerialConsoleRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.enableInteractiveSerialConsole`.
    func enableInteractiveSerialConsole(
      withPolling: EnableInteractiveSerialConsoleRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<EnableInteractiveSerialConsoleResponse>

    /// See `BareMetalSolutionClient.disableInteractiveSerialConsole`.
    func disableInteractiveSerialConsole(
      request: DisableInteractiveSerialConsoleRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.disableInteractiveSerialConsole`.
    func disableInteractiveSerialConsole(
      withPolling: DisableInteractiveSerialConsoleRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<DisableInteractiveSerialConsoleResponse>

    /// See `BareMetalSolutionClient.detachLun`.
    func detachLun(
      request: DetachLunRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.detachLun`.
    func detachLun(
      withPolling: DetachLunRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Instance>

    /// See `BareMetalSolutionClient.listSshkeys`.
    func listSshkeys(
      request: ListSSHKeysRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.ListSSHKeysResponse

    /// See `BareMetalSolutionClient.listSshkeys`.
    func listSshkeys(
      byItem: ListSSHKeysRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<SSHKey, Swift.Error>

    /// See `BareMetalSolutionClient.createSshkey`.
    func createSshkey(
      request: CreateSSHKeyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.SSHKey

    /// See `BareMetalSolutionClient.deleteSshkey`.
    func deleteSshkey(
      request: DeleteSSHKeyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws

    /// See `BareMetalSolutionClient.listVolumes`.
    func listVolumes(
      request: ListVolumesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.ListVolumesResponse

    /// See `BareMetalSolutionClient.listVolumes`.
    func listVolumes(
      byItem: ListVolumesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Volume, Swift.Error>

    /// See `BareMetalSolutionClient.getVolume`.
    func getVolume(
      request: GetVolumeRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.Volume

    /// See `BareMetalSolutionClient.updateVolume`.
    func updateVolume(
      request: UpdateVolumeRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.updateVolume`.
    func updateVolume(
      withPolling: UpdateVolumeRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Volume>

    /// See `BareMetalSolutionClient.renameVolume`.
    func renameVolume(
      request: RenameVolumeRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.Volume

    /// See `BareMetalSolutionClient.evictVolume`.
    func evictVolume(
      request: EvictVolumeRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.evictVolume`.
    func evictVolume(
      withPolling: EvictVolumeRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `BareMetalSolutionClient.resizeVolume`.
    func resizeVolume(
      request: ResizeVolumeRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.resizeVolume`.
    func resizeVolume(
      withPolling: ResizeVolumeRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Volume>

    /// See `BareMetalSolutionClient.listNetworks`.
    func listNetworks(
      request: ListNetworksRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.ListNetworksResponse

    /// See `BareMetalSolutionClient.listNetworks`.
    func listNetworks(
      byItem: ListNetworksRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Network, Swift.Error>

    /// See `BareMetalSolutionClient.listNetworkUsage`.
    func listNetworkUsage(
      request: ListNetworkUsageRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.ListNetworkUsageResponse

    /// See `BareMetalSolutionClient.getNetwork`.
    func getNetwork(
      request: GetNetworkRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.Network

    /// See `BareMetalSolutionClient.updateNetwork`.
    func updateNetwork(
      request: UpdateNetworkRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.updateNetwork`.
    func updateNetwork(
      withPolling: UpdateNetworkRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Network>

    /// See `BareMetalSolutionClient.createVolumeSnapshot`.
    func createVolumeSnapshot(
      request: CreateVolumeSnapshotRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.VolumeSnapshot

    /// See `BareMetalSolutionClient.restoreVolumeSnapshot`.
    func restoreVolumeSnapshot(
      request: RestoreVolumeSnapshotRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.restoreVolumeSnapshot`.
    func restoreVolumeSnapshot(
      withPolling: RestoreVolumeSnapshotRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<VolumeSnapshot>

    /// See `BareMetalSolutionClient.deleteVolumeSnapshot`.
    func deleteVolumeSnapshot(
      request: DeleteVolumeSnapshotRequest, options: GoogleCloudGax.RequestOptions
    ) async throws

    /// See `BareMetalSolutionClient.getVolumeSnapshot`.
    func getVolumeSnapshot(
      request: GetVolumeSnapshotRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.VolumeSnapshot

    /// See `BareMetalSolutionClient.listVolumeSnapshots`.
    func listVolumeSnapshots(
      request: ListVolumeSnapshotsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.ListVolumeSnapshotsResponse

    /// See `BareMetalSolutionClient.listVolumeSnapshots`.
    func listVolumeSnapshots(
      byItem: ListVolumeSnapshotsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<VolumeSnapshot, Swift.Error>

    /// See `BareMetalSolutionClient.getLun`.
    func getLun(
      request: GetLunRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.Lun

    /// See `BareMetalSolutionClient.listLuns`.
    func listLuns(
      request: ListLunsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.ListLunsResponse

    /// See `BareMetalSolutionClient.listLuns`.
    func listLuns(
      byItem: ListLunsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Lun, Swift.Error>

    /// See `BareMetalSolutionClient.evictLun`.
    func evictLun(
      request: EvictLunRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.evictLun`.
    func evictLun(
      withPolling: EvictLunRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `BareMetalSolutionClient.getNfsShare`.
    func getNfsShare(
      request: GetNfsShareRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.NfsShare

    /// See `BareMetalSolutionClient.listNfsShares`.
    func listNfsShares(
      request: ListNfsSharesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.ListNfsSharesResponse

    /// See `BareMetalSolutionClient.listNfsShares`.
    func listNfsShares(
      byItem: ListNfsSharesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<NfsShare, Swift.Error>

    /// See `BareMetalSolutionClient.updateNfsShare`.
    func updateNfsShare(
      request: UpdateNfsShareRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.updateNfsShare`.
    func updateNfsShare(
      withPolling: UpdateNfsShareRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<NfsShare>

    /// See `BareMetalSolutionClient.createNfsShare`.
    func createNfsShare(
      request: CreateNfsShareRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.createNfsShare`.
    func createNfsShare(
      withPolling: CreateNfsShareRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<NfsShare>

    /// See `BareMetalSolutionClient.renameNfsShare`.
    func renameNfsShare(
      request: RenameNfsShareRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.NfsShare

    /// See `BareMetalSolutionClient.deleteNfsShare`.
    func deleteNfsShare(
      request: DeleteNfsShareRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `BareMetalSolutionClient.deleteNfsShare`.
    func deleteNfsShare(
      withPolling: DeleteNfsShareRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `BareMetalSolutionClient.listProvisioningQuotas`.
    func listProvisioningQuotas(
      request: ListProvisioningQuotasRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.ListProvisioningQuotasResponse

    /// See `BareMetalSolutionClient.listProvisioningQuotas`.
    func listProvisioningQuotas(
      byItem: ListProvisioningQuotasRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<ProvisioningQuota, Swift.Error>

    /// See `BareMetalSolutionClient.submitProvisioningConfig`.
    func submitProvisioningConfig(
      request: SubmitProvisioningConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.SubmitProvisioningConfigResponse

    /// See `BareMetalSolutionClient.getProvisioningConfig`.
    func getProvisioningConfig(
      request: GetProvisioningConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig

    /// See `BareMetalSolutionClient.createProvisioningConfig`.
    func createProvisioningConfig(
      request: CreateProvisioningConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig

    /// See `BareMetalSolutionClient.updateProvisioningConfig`.
    func updateProvisioningConfig(
      request: UpdateProvisioningConfigRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig

    /// See `BareMetalSolutionClient.renameNetwork`.
    func renameNetwork(
      request: RenameNetworkRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.Network

    /// See `BareMetalSolutionClient.listOsimages`.
    func listOsimages(
      request: ListOSImagesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudBareMetalSolutionV2.ListOSImagesResponse

    /// See `BareMetalSolutionClient.listOsimages`.
    func listOsimages(
      byItem: ListOSImagesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<OSImage, Swift.Error>

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

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

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

// Default implementations
extension Clients.BareMetalSolutionProtocol {
  public func listInstances(request: ListInstancesRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.ListInstancesResponse
  {
    try await self.listInstances(request: request, options: .init())
  }

  public func listInstances(
    request: ListInstancesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListInstancesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listInstances(
    byItem: ListInstancesRequest
  ) throws -> any AsyncSequence<Instance, Swift.Error> {
    try self.listInstances(byItem: byItem, options: .init())
  }

  public func listInstances(
    byItem: ListInstancesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Instance, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudBareMetalSolutionV2.ListInstancesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func getInstance(request: GetInstanceRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.Instance
  {
    try await self.getInstance(request: request, options: .init())
  }

  public func getInstance(
    request: GetInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.Instance {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getInstance(
    name: Swift.String,
  ) async throws -> GoogleCloudBareMetalSolutionV2.Instance {
    let request = GetInstanceRequest().with {
      $0.name = name
    }
    return try await self.getInstance(request: request)
  }

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

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

  public func updateInstance(withPolling: UpdateInstanceRequest) async throws -> any GoogleCloudGax
    .PollableOperation<Instance>
  {
    try await self.updateInstance(withPolling: withPolling, options: .init())
  }

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

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

  public func renameInstance(request: RenameInstanceRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.Instance
  {
    try await self.renameInstance(request: request, options: .init())
  }

  public func renameInstance(
    request: RenameInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.Instance {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func renameInstance(
    name: Swift.String,
    newInstanceId: Swift.String,
  ) async throws -> GoogleCloudBareMetalSolutionV2.Instance {
    let request = RenameInstanceRequest().with {
      $0.name = name
      $0.newInstanceId = newInstanceId
    }
    return try await self.renameInstance(request: request)
  }

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

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

  public func resetInstance(withPolling: ResetInstanceRequest) async throws -> any GoogleCloudGax
    .PollableOperation<ResetInstanceResponse>
  {
    try await self.resetInstance(withPolling: withPolling, options: .init())
  }

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

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

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

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

  public func startInstance(withPolling: StartInstanceRequest) async throws -> any GoogleCloudGax
    .PollableOperation<StartInstanceResponse>
  {
    try await self.startInstance(withPolling: withPolling, options: .init())
  }

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

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

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

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

  public func stopInstance(withPolling: StopInstanceRequest) async throws -> any GoogleCloudGax
    .PollableOperation<StopInstanceResponse>
  {
    try await self.stopInstance(withPolling: withPolling, options: .init())
  }

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

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

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

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

  public func enableInteractiveSerialConsole(withPolling: EnableInteractiveSerialConsoleRequest)
    async throws -> any GoogleCloudGax.PollableOperation<EnableInteractiveSerialConsoleResponse>
  {
    try await self.enableInteractiveSerialConsole(withPolling: withPolling, options: .init())
  }

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

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

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

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

  public func disableInteractiveSerialConsole(withPolling: DisableInteractiveSerialConsoleRequest)
    async throws -> any GoogleCloudGax.PollableOperation<DisableInteractiveSerialConsoleResponse>
  {
    try await self.disableInteractiveSerialConsole(withPolling: withPolling, options: .init())
  }

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

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

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

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

  public func detachLun(withPolling: DetachLunRequest) async throws -> any GoogleCloudGax
    .PollableOperation<Instance>
  {
    try await self.detachLun(withPolling: withPolling, options: .init())
  }

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

  public func detachLun(
    instance: Swift.String,
    lun: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Instance> {
    let request = DetachLunRequest().with {
      $0.instance = instance
      $0.lun = lun
    }
    return try await self.detachLun(withPolling: request)
  }

  public func listSshkeys(request: ListSSHKeysRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.ListSSHKeysResponse
  {
    try await self.listSshkeys(request: request, options: .init())
  }

  public func listSshkeys(
    request: ListSSHKeysRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListSSHKeysResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listSshkeys(
    byItem: ListSSHKeysRequest
  ) throws -> any AsyncSequence<SSHKey, Swift.Error> {
    try self.listSshkeys(byItem: byItem, options: .init())
  }

  public func listSshkeys(
    byItem: ListSSHKeysRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<SSHKey, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudBareMetalSolutionV2.ListSSHKeysResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func createSshkey(request: CreateSSHKeyRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.SSHKey
  {
    try await self.createSshkey(request: request, options: .init())
  }

  public func createSshkey(
    request: CreateSSHKeyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.SSHKey {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func createSshkey(
    parent: Swift.String,
    sshKey: SSHKey?,
    sshKeyId: Swift.String,
  ) async throws -> GoogleCloudBareMetalSolutionV2.SSHKey {
    let request = CreateSSHKeyRequest().with {
      $0.parent = parent
      $0.sshKey = sshKey
      $0.sshKeyId = sshKeyId
    }
    return try await self.createSshkey(request: request)
  }

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

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

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

  public func listVolumes(request: ListVolumesRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.ListVolumesResponse
  {
    try await self.listVolumes(request: request, options: .init())
  }

  public func listVolumes(
    request: ListVolumesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListVolumesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listVolumes(
    byItem: ListVolumesRequest
  ) throws -> any AsyncSequence<Volume, Swift.Error> {
    try self.listVolumes(byItem: byItem, options: .init())
  }

  public func listVolumes(
    byItem: ListVolumesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Volume, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudBareMetalSolutionV2.ListVolumesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func getVolume(request: GetVolumeRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.Volume
  {
    try await self.getVolume(request: request, options: .init())
  }

  public func getVolume(
    request: GetVolumeRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.Volume {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getVolume(
    name: Swift.String,
  ) async throws -> GoogleCloudBareMetalSolutionV2.Volume {
    let request = GetVolumeRequest().with {
      $0.name = name
    }
    return try await self.getVolume(request: request)
  }

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

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

  public func updateVolume(withPolling: UpdateVolumeRequest) async throws -> any GoogleCloudGax
    .PollableOperation<Volume>
  {
    try await self.updateVolume(withPolling: withPolling, options: .init())
  }

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

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

  public func renameVolume(request: RenameVolumeRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.Volume
  {
    try await self.renameVolume(request: request, options: .init())
  }

  public func renameVolume(
    request: RenameVolumeRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.Volume {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func renameVolume(
    name: Swift.String,
    newVolumeId: Swift.String,
  ) async throws -> GoogleCloudBareMetalSolutionV2.Volume {
    let request = RenameVolumeRequest().with {
      $0.name = name
      $0.newVolumeId = newVolumeId
    }
    return try await self.renameVolume(request: request)
  }

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

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

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

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

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

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

  public func resizeVolume(withPolling: ResizeVolumeRequest) async throws -> any GoogleCloudGax
    .PollableOperation<Volume>
  {
    try await self.resizeVolume(withPolling: withPolling, options: .init())
  }

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

  public func resizeVolume(
    volume: Swift.String,
    sizeGib: Swift.Int64,
  ) async throws -> any GoogleCloudGax.PollableOperation<Volume> {
    let request = ResizeVolumeRequest().with {
      $0.volume = volume
      $0.sizeGib = sizeGib
    }
    return try await self.resizeVolume(withPolling: request)
  }

  public func listNetworks(request: ListNetworksRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.ListNetworksResponse
  {
    try await self.listNetworks(request: request, options: .init())
  }

  public func listNetworks(
    request: ListNetworksRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListNetworksResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listNetworks(
    byItem: ListNetworksRequest
  ) throws -> any AsyncSequence<Network, Swift.Error> {
    try self.listNetworks(byItem: byItem, options: .init())
  }

  public func listNetworks(
    byItem: ListNetworksRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Network, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudBareMetalSolutionV2.ListNetworksResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func listNetworkUsage(request: ListNetworkUsageRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.ListNetworkUsageResponse
  {
    try await self.listNetworkUsage(request: request, options: .init())
  }

  public func listNetworkUsage(
    request: ListNetworkUsageRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListNetworkUsageResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listNetworkUsage(
    location: Swift.String,
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListNetworkUsageResponse {
    let request = ListNetworkUsageRequest().with {
      $0.location = location
    }
    return try await self.listNetworkUsage(request: request)
  }

  public func getNetwork(request: GetNetworkRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.Network
  {
    try await self.getNetwork(request: request, options: .init())
  }

  public func getNetwork(
    request: GetNetworkRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.Network {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getNetwork(
    name: Swift.String,
  ) async throws -> GoogleCloudBareMetalSolutionV2.Network {
    let request = GetNetworkRequest().with {
      $0.name = name
    }
    return try await self.getNetwork(request: request)
  }

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

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

  public func updateNetwork(withPolling: UpdateNetworkRequest) async throws -> any GoogleCloudGax
    .PollableOperation<Network>
  {
    try await self.updateNetwork(withPolling: withPolling, options: .init())
  }

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

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

  public func createVolumeSnapshot(request: CreateVolumeSnapshotRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.VolumeSnapshot
  {
    try await self.createVolumeSnapshot(request: request, options: .init())
  }

  public func createVolumeSnapshot(
    request: CreateVolumeSnapshotRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.VolumeSnapshot {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func createVolumeSnapshot(
    parent: Swift.String,
    volumeSnapshot: VolumeSnapshot?,
  ) async throws -> GoogleCloudBareMetalSolutionV2.VolumeSnapshot {
    let request = CreateVolumeSnapshotRequest().with {
      $0.parent = parent
      $0.volumeSnapshot = volumeSnapshot
    }
    return try await self.createVolumeSnapshot(request: request)
  }

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

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

  public func restoreVolumeSnapshot(withPolling: RestoreVolumeSnapshotRequest) async throws
    -> any GoogleCloudGax.PollableOperation<VolumeSnapshot>
  {
    try await self.restoreVolumeSnapshot(withPolling: withPolling, options: .init())
  }

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

  public func restoreVolumeSnapshot(
    volumeSnapshot: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<VolumeSnapshot> {
    let request = RestoreVolumeSnapshotRequest().with {
      $0.volumeSnapshot = volumeSnapshot
    }
    return try await self.restoreVolumeSnapshot(withPolling: request)
  }

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

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

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

  public func getVolumeSnapshot(request: GetVolumeSnapshotRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.VolumeSnapshot
  {
    try await self.getVolumeSnapshot(request: request, options: .init())
  }

  public func getVolumeSnapshot(
    request: GetVolumeSnapshotRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.VolumeSnapshot {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getVolumeSnapshot(
    name: Swift.String,
  ) async throws -> GoogleCloudBareMetalSolutionV2.VolumeSnapshot {
    let request = GetVolumeSnapshotRequest().with {
      $0.name = name
    }
    return try await self.getVolumeSnapshot(request: request)
  }

  public func listVolumeSnapshots(request: ListVolumeSnapshotsRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.ListVolumeSnapshotsResponse
  {
    try await self.listVolumeSnapshots(request: request, options: .init())
  }

  public func listVolumeSnapshots(
    request: ListVolumeSnapshotsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListVolumeSnapshotsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listVolumeSnapshots(
    byItem: ListVolumeSnapshotsRequest
  ) throws -> any AsyncSequence<VolumeSnapshot, Swift.Error> {
    try self.listVolumeSnapshots(byItem: byItem, options: .init())
  }

  public func listVolumeSnapshots(
    byItem: ListVolumeSnapshotsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<VolumeSnapshot, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudBareMetalSolutionV2.ListVolumeSnapshotsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func getLun(request: GetLunRequest) async throws -> GoogleCloudBareMetalSolutionV2.Lun {
    try await self.getLun(request: request, options: .init())
  }

  public func getLun(
    request: GetLunRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.Lun {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getLun(
    name: Swift.String,
  ) async throws -> GoogleCloudBareMetalSolutionV2.Lun {
    let request = GetLunRequest().with {
      $0.name = name
    }
    return try await self.getLun(request: request)
  }

  public func listLuns(request: ListLunsRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.ListLunsResponse
  {
    try await self.listLuns(request: request, options: .init())
  }

  public func listLuns(
    request: ListLunsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListLunsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listLuns(
    byItem: ListLunsRequest
  ) throws -> any AsyncSequence<Lun, Swift.Error> {
    try self.listLuns(byItem: byItem, options: .init())
  }

  public func listLuns(
    byItem: ListLunsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Lun, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudBareMetalSolutionV2.ListLunsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

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

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

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

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

  public func getNfsShare(request: GetNfsShareRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.NfsShare
  {
    try await self.getNfsShare(request: request, options: .init())
  }

  public func getNfsShare(
    request: GetNfsShareRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.NfsShare {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getNfsShare(
    name: Swift.String,
  ) async throws -> GoogleCloudBareMetalSolutionV2.NfsShare {
    let request = GetNfsShareRequest().with {
      $0.name = name
    }
    return try await self.getNfsShare(request: request)
  }

  public func listNfsShares(request: ListNfsSharesRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.ListNfsSharesResponse
  {
    try await self.listNfsShares(request: request, options: .init())
  }

  public func listNfsShares(
    request: ListNfsSharesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListNfsSharesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listNfsShares(
    byItem: ListNfsSharesRequest
  ) throws -> any AsyncSequence<NfsShare, Swift.Error> {
    try self.listNfsShares(byItem: byItem, options: .init())
  }

  public func listNfsShares(
    byItem: ListNfsSharesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<NfsShare, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudBareMetalSolutionV2.ListNfsSharesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

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

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

  public func updateNfsShare(withPolling: UpdateNfsShareRequest) async throws -> any GoogleCloudGax
    .PollableOperation<NfsShare>
  {
    try await self.updateNfsShare(withPolling: withPolling, options: .init())
  }

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

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

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

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

  public func createNfsShare(withPolling: CreateNfsShareRequest) async throws -> any GoogleCloudGax
    .PollableOperation<NfsShare>
  {
    try await self.createNfsShare(withPolling: withPolling, options: .init())
  }

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

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

  public func renameNfsShare(request: RenameNfsShareRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.NfsShare
  {
    try await self.renameNfsShare(request: request, options: .init())
  }

  public func renameNfsShare(
    request: RenameNfsShareRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.NfsShare {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func renameNfsShare(
    name: Swift.String,
    newNfsshareId: Swift.String,
  ) async throws -> GoogleCloudBareMetalSolutionV2.NfsShare {
    let request = RenameNfsShareRequest().with {
      $0.name = name
      $0.newNfsshareId = newNfsshareId
    }
    return try await self.renameNfsShare(request: request)
  }

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

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

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

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

  public func listProvisioningQuotas(request: ListProvisioningQuotasRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.ListProvisioningQuotasResponse
  {
    try await self.listProvisioningQuotas(request: request, options: .init())
  }

  public func listProvisioningQuotas(
    request: ListProvisioningQuotasRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListProvisioningQuotasResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listProvisioningQuotas(
    byItem: ListProvisioningQuotasRequest
  ) throws -> any AsyncSequence<ProvisioningQuota, Swift.Error> {
    try self.listProvisioningQuotas(byItem: byItem, options: .init())
  }

  public func listProvisioningQuotas(
    byItem: ListProvisioningQuotasRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<ProvisioningQuota, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudBareMetalSolutionV2.ListProvisioningQuotasResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func submitProvisioningConfig(request: SubmitProvisioningConfigRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.SubmitProvisioningConfigResponse
  {
    try await self.submitProvisioningConfig(request: request, options: .init())
  }

  public func submitProvisioningConfig(
    request: SubmitProvisioningConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.SubmitProvisioningConfigResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func submitProvisioningConfig(
    parent: Swift.String,
    provisioningConfig: ProvisioningConfig?,
  ) async throws -> GoogleCloudBareMetalSolutionV2.SubmitProvisioningConfigResponse {
    let request = SubmitProvisioningConfigRequest().with {
      $0.parent = parent
      $0.provisioningConfig = provisioningConfig
    }
    return try await self.submitProvisioningConfig(request: request)
  }

  public func getProvisioningConfig(request: GetProvisioningConfigRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig
  {
    try await self.getProvisioningConfig(request: request, options: .init())
  }

  public func getProvisioningConfig(
    request: GetProvisioningConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getProvisioningConfig(
    name: Swift.String,
  ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig {
    let request = GetProvisioningConfigRequest().with {
      $0.name = name
    }
    return try await self.getProvisioningConfig(request: request)
  }

  public func createProvisioningConfig(request: CreateProvisioningConfigRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig
  {
    try await self.createProvisioningConfig(request: request, options: .init())
  }

  public func createProvisioningConfig(
    request: CreateProvisioningConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func createProvisioningConfig(
    parent: Swift.String,
    provisioningConfig: ProvisioningConfig?,
  ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig {
    let request = CreateProvisioningConfigRequest().with {
      $0.parent = parent
      $0.provisioningConfig = provisioningConfig
    }
    return try await self.createProvisioningConfig(request: request)
  }

  public func updateProvisioningConfig(request: UpdateProvisioningConfigRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig
  {
    try await self.updateProvisioningConfig(request: request, options: .init())
  }

  public func updateProvisioningConfig(
    request: UpdateProvisioningConfigRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func updateProvisioningConfig(
    provisioningConfig: ProvisioningConfig?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> GoogleCloudBareMetalSolutionV2.ProvisioningConfig {
    let request = UpdateProvisioningConfigRequest().with {
      $0.provisioningConfig = provisioningConfig
      $0.updateMask = updateMask
    }
    return try await self.updateProvisioningConfig(request: request)
  }

  public func renameNetwork(request: RenameNetworkRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.Network
  {
    try await self.renameNetwork(request: request, options: .init())
  }

  public func renameNetwork(
    request: RenameNetworkRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.Network {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func renameNetwork(
    name: Swift.String,
    newNetworkId: Swift.String,
  ) async throws -> GoogleCloudBareMetalSolutionV2.Network {
    let request = RenameNetworkRequest().with {
      $0.name = name
      $0.newNetworkId = newNetworkId
    }
    return try await self.renameNetwork(request: request)
  }

  public func listOsimages(request: ListOSImagesRequest) async throws
    -> GoogleCloudBareMetalSolutionV2.ListOSImagesResponse
  {
    try await self.listOsimages(request: request, options: .init())
  }

  public func listOsimages(
    request: ListOSImagesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudBareMetalSolutionV2.ListOSImagesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listOsimages(
    byItem: ListOSImagesRequest
  ) throws -> any AsyncSequence<OSImage, Swift.Error> {
    try self.listOsimages(byItem: byItem, options: .init())
  }

  public func listOsimages(
    byItem: ListOSImagesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<OSImage, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudBareMetalSolutionV2.ListOSImagesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func listOsimages(
    parent: Swift.String,
  ) throws -> any AsyncSequence<OSImage, Swift.Error> {
    let request = ListOSImagesRequest().with {
      $0.parent = parent
    }
    return try self.listOsimages(byItem: 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 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)
  }
}
