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

/// Configures and manages Cloud Memorystore for Memcached instances.
///
///
/// The `memcache.googleapis.com` service implements the Google Cloud Memorystore
/// for Memcached API and defines the following resource model for managing
/// Memorystore Memcached (also called Memcached below) instances:
/// * The service works with a collection of cloud projects, named: `/projects/*`
/// * Each project has a collection of available locations, named: `/locations/*`
/// * Each location has a collection of Memcached instances, named:
/// `/instances/*`
/// * As such, Memcached instances are resources of the form:
///   `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
///
/// Note that location_id must be a GCP `region`; for example:
/// * `projects/my-memcached-project/locations/us-central1/instances/my-memcached`
///
/// @Snippet(path: "CloudMemcacheQuickstart")
public class CloudMemcacheClient: Clients.CloudMemcacheProtocol {
  let inner: any Clients.CloudMemcacheStub
  let pollingErrorPolicy: GoogleCloudGax.PollingErrorPolicy
  let pollingBackoffPolicy: GoogleCloudGax.BackoffPolicy

  /// Creates a new `CloudMemcacheClient` instance.
  public init(_ options: GoogleCloudGax.ClientOptions = .init()) throws {
    var inner: any Clients.CloudMemcacheStub = try Clients.CloudMemcacheTransport(options)
    inner = Clients.CloudMemcacheRetry(inner, options: options)
    if let logger = options.logger {
      inner = Clients.CloudMemcacheLogging(inner, logger: logger)
    }
    self.inner = inner
    self.pollingErrorPolicy = options.pollingErrorPolicy
    self.pollingBackoffPolicy = options.pollingBackoffPolicy
  }

  /// Lists Instances in a given location.
  ///
  /// @Snippet(path: "CloudMemcache_ListInstances")
  public func listInstances(
    request: ListInstancesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudMemcacheV1.ListInstancesResponse {
    try await self.inner.listInstances(request: request, options: options)
  }

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

  /// Gets details of a single Instance.
  ///
  /// @Snippet(path: "CloudMemcache_GetInstance")
  public func getInstance(
    request: GetInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudMemcacheV1.Instance {
    try await self.inner.getInstance(request: request, options: options)
  }

  /// Creates a new Instance in a given location.
  ///
  /// @Snippet(path: "CloudMemcache_CreateInstance")
  public func createInstance(
    request: CreateInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.createInstance(request: request, options: options)
  }

  /// Creates a new Instance in a given location.
  ///
  /// @Snippet(path: "CloudMemcache_CreateInstance")
  public func createInstance(
    withPolling: CreateInstanceRequest, 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.createInstance(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,
    )
  }

  /// Updates an existing Instance in a given project and location.
  ///
  /// @Snippet(path: "CloudMemcache_UpdateInstance")
  public func updateInstance(
    request: UpdateInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateInstance(request: request, options: options)
  }

  /// Updates an existing Instance in a given project and location.
  ///
  /// @Snippet(path: "CloudMemcache_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,
    )
  }

  /// Updates the defined Memcached parameters for an existing instance.
  /// This method only stages the parameters, it must be followed by
  /// `ApplyParameters` to apply the parameters to nodes of the Memcached
  /// instance.
  ///
  /// @Snippet(path: "CloudMemcache_UpdateParameters")
  public func updateParameters(
    request: UpdateParametersRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.updateParameters(request: request, options: options)
  }

  /// Updates the defined Memcached parameters for an existing instance.
  /// This method only stages the parameters, it must be followed by
  /// `ApplyParameters` to apply the parameters to nodes of the Memcached
  /// instance.
  ///
  /// @Snippet(path: "CloudMemcache_UpdateParameters")
  public func updateParameters(
    withPolling: UpdateParametersRequest, 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.updateParameters(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,
    )
  }

  /// Deletes a single Instance.
  ///
  /// @Snippet(path: "CloudMemcache_DeleteInstance")
  public func deleteInstance(
    request: DeleteInstanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.deleteInstance(request: request, options: options)
  }

  /// Deletes a single Instance.
  ///
  /// @Snippet(path: "CloudMemcache_DeleteInstance")
  public func deleteInstance(
    withPolling: DeleteInstanceRequest, 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.deleteInstance(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,
    )
  }

  /// `ApplyParameters` restarts the set of specified nodes in order to update
  /// them to the current set of parameters for the Memcached Instance.
  ///
  /// @Snippet(path: "CloudMemcache_ApplyParameters")
  public func applyParameters(
    request: ApplyParametersRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.applyParameters(request: request, options: options)
  }

  /// `ApplyParameters` restarts the set of specified nodes in order to update
  /// them to the current set of parameters for the Memcached Instance.
  ///
  /// @Snippet(path: "CloudMemcache_ApplyParameters")
  public func applyParameters(
    withPolling: ApplyParametersRequest, 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.applyParameters(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,
    )
  }

  /// Reschedules upcoming maintenance event.
  ///
  /// @Snippet(path: "CloudMemcache_RescheduleMaintenance")
  public func rescheduleMaintenance(
    request: RescheduleMaintenanceRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.rescheduleMaintenance(request: request, options: options)
  }

  /// Reschedules upcoming maintenance event.
  ///
  /// @Snippet(path: "CloudMemcache_RescheduleMaintenance")
  public func rescheduleMaintenance(
    withPolling: RescheduleMaintenanceRequest, 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.rescheduleMaintenance(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 information about the supported locations for this service.
  ///
  /// @Snippet(path: "CloudMemcache_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: "CloudMemcache_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: "CloudMemcache_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: "CloudMemcache_ListOperations")
  public func listOperations(
    request: GoogleLongRunning.ListOperationsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.ListOperationsResponse {
    try await self.inner.listOperations(request: request, options: options)
  }

  /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
  ///
  /// [google.longrunning.Operations]: https://www.google.com/search?q=Swift+google.longrunning+Operations
  ///
  /// @Snippet(path: "CloudMemcache_ListOperations")
  public func listOperations(
    byItem: GoogleLongRunning.ListOperationsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<GoogleLongRunning.Operation, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleLongRunning.ListOperationsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listOperations(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
  ///
  /// [google.longrunning.Operations]: https://www.google.com/search?q=Swift+google.longrunning+Operations
  ///
  /// @Snippet(path: "CloudMemcache_GetOperation")
  func getOperation(
    request: GoogleLongRunning.GetOperationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleLongRunning.Operation {
    try await self.inner.getOperation(request: request, options: options)
  }

  /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
  ///
  /// [google.longrunning.Operations]: https://www.google.com/search?q=Swift+google.longrunning+Operations
  ///
  /// @Snippet(path: "CloudMemcache_DeleteOperation")
  public func deleteOperation(
    request: GoogleLongRunning.DeleteOperationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.deleteOperation(request: request, options: options)
  }

  /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
  ///
  /// [google.longrunning.Operations]: https://www.google.com/search?q=Swift+google.longrunning+Operations
  ///
  /// @Snippet(path: "CloudMemcache_CancelOperation")
  public func cancelOperation(
    request: GoogleLongRunning.CancelOperationRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.cancelOperation(request: request, options: options)
  }
}

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

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

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

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

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

    /// See `CloudMemcacheClient.createInstance`.
    func createInstance(request: CreateInstanceRequest) async throws -> GoogleLongRunning.Operation

    /// See `CloudMemcacheClient.createInstance`.
    func createInstance(withPolling: CreateInstanceRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Instance>

    /// See `CloudMemcacheClient.createInstance`.
    func createInstance(
      parent: Swift.String,
      instance: Instance?,
      instanceId: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<Instance>

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

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

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

    /// See `CloudMemcacheClient.updateParameters`.
    func updateParameters(request: UpdateParametersRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CloudMemcacheClient.updateParameters`.
    func updateParameters(withPolling: UpdateParametersRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Instance>

    /// See `CloudMemcacheClient.updateParameters`.
    func updateParameters(
      name: Swift.String,
      updateMask: GoogleCloudWkt.FieldMask?,
      parameters: MemcacheParameters?,
    ) async throws -> any GoogleCloudGax.PollableOperation<Instance>

    /// See `CloudMemcacheClient.deleteInstance`.
    func deleteInstance(request: DeleteInstanceRequest) async throws -> GoogleLongRunning.Operation

    /// See `CloudMemcacheClient.deleteInstance`.
    func deleteInstance(withPolling: DeleteInstanceRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Void>

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

    /// See `CloudMemcacheClient.applyParameters`.
    func applyParameters(request: ApplyParametersRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CloudMemcacheClient.applyParameters`.
    func applyParameters(withPolling: ApplyParametersRequest) async throws -> any GoogleCloudGax
      .PollableOperation<Instance>

    /// See `CloudMemcacheClient.applyParameters`.
    func applyParameters(
      name: Swift.String,
      nodeIds: [Swift.String],
      applyAll: Swift.Bool,
    ) async throws -> any GoogleCloudGax.PollableOperation<Instance>

    /// See `CloudMemcacheClient.rescheduleMaintenance`.
    func rescheduleMaintenance(request: RescheduleMaintenanceRequest) async throws
      -> GoogleLongRunning.Operation

    /// See `CloudMemcacheClient.rescheduleMaintenance`.
    func rescheduleMaintenance(withPolling: RescheduleMaintenanceRequest) async throws
      -> any GoogleCloudGax.PollableOperation<Instance>

    /// See `CloudMemcacheClient.rescheduleMaintenance`.
    func rescheduleMaintenance(
      instance: Swift.String,
      rescheduleType: RescheduleMaintenanceRequest.RescheduleType,
      scheduleTime: GoogleCloudWkt.Timestamp?,
    ) async throws -> any GoogleCloudGax.PollableOperation<Instance>

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

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

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

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

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

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

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

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

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

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

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

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

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

    /// See `CloudMemcacheClient.createInstance`.
    func createInstance(
      request: CreateInstanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CloudMemcacheClient.createInstance`.
    func createInstance(
      withPolling: CreateInstanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Instance>

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

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

    /// See `CloudMemcacheClient.updateParameters`.
    func updateParameters(
      request: UpdateParametersRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CloudMemcacheClient.updateParameters`.
    func updateParameters(
      withPolling: UpdateParametersRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Instance>

    /// See `CloudMemcacheClient.deleteInstance`.
    func deleteInstance(
      request: DeleteInstanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CloudMemcacheClient.deleteInstance`.
    func deleteInstance(
      withPolling: DeleteInstanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Void>

    /// See `CloudMemcacheClient.applyParameters`.
    func applyParameters(
      request: ApplyParametersRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CloudMemcacheClient.applyParameters`.
    func applyParameters(
      withPolling: ApplyParametersRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Instance>

    /// See `CloudMemcacheClient.rescheduleMaintenance`.
    func rescheduleMaintenance(
      request: RescheduleMaintenanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleLongRunning.Operation

    /// See `CloudMemcacheClient.rescheduleMaintenance`.
    func rescheduleMaintenance(
      withPolling: RescheduleMaintenanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<Instance>

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

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

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

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

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

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

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

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

  public func listInstances(
    request: ListInstancesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudMemcacheV1.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 -> GoogleCloudMemcacheV1.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
    -> GoogleCloudMemcacheV1.Instance
  {
    try await self.getInstance(request: request, options: .init())
  }

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

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

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

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

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

  public func createInstance(
    withPolling: CreateInstanceRequest, 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 createInstance(
    parent: Swift.String,
    instance: Instance?,
    instanceId: Swift.String,
  ) async throws -> any GoogleCloudGax.PollableOperation<Instance> {
    let request = CreateInstanceRequest().with {
      $0.parent = parent
      $0.instance = instance
      $0.instanceId = instanceId
    }
    return try await self.createInstance(withPolling: 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 updateParameters(request: UpdateParametersRequest) async throws
    -> GoogleLongRunning.Operation
  {
    try await self.updateParameters(request: request, options: .init())
  }

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

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

  public func updateParameters(
    withPolling: UpdateParametersRequest, 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 updateParameters(
    name: Swift.String,
    updateMask: GoogleCloudWkt.FieldMask?,
    parameters: MemcacheParameters?,
  ) async throws -> any GoogleCloudGax.PollableOperation<Instance> {
    let request = UpdateParametersRequest().with {
      $0.name = name
      $0.updateMask = updateMask
      $0.parameters = parameters
    }
    return try await self.updateParameters(withPolling: request)
  }

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

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

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

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

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

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

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

  public func applyParameters(
    withPolling: ApplyParametersRequest, 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 applyParameters(
    name: Swift.String,
    nodeIds: [Swift.String],
    applyAll: Swift.Bool,
  ) async throws -> any GoogleCloudGax.PollableOperation<Instance> {
    let request = ApplyParametersRequest().with {
      $0.name = name
      $0.nodeIds = nodeIds
      $0.applyAll = applyAll
    }
    return try await self.applyParameters(withPolling: request)
  }

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

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

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

  public func rescheduleMaintenance(
    withPolling: RescheduleMaintenanceRequest, 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 rescheduleMaintenance(
    instance: Swift.String,
    rescheduleType: RescheduleMaintenanceRequest.RescheduleType,
    scheduleTime: GoogleCloudWkt.Timestamp?,
  ) async throws -> any GoogleCloudGax.PollableOperation<Instance> {
    let request = RescheduleMaintenanceRequest().with {
      $0.instance = instance
      $0.rescheduleType = rescheduleType
      $0.scheduleTime = scheduleTime
    }
    return try await self.rescheduleMaintenance(withPolling: request)
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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