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

#if BackendBuckets
  import Foundation
  #if canImport(FoundationNetworking)
    import FoundationNetworking
  #endif
  import GoogleCloudWkt
  import GoogleCloudGax

  /// Service for the `backendBuckets` resource.
  ///
  /// @Snippet(path: "backendBucketsQuickstart")
  public class BackendBucketsClient: Clients.BackendBucketsProtocol {
    let inner: any Clients.BackendBucketsStub
    let pollingErrorPolicy: GoogleCloudGax.PollingErrorPolicy
    let pollingBackoffPolicy: GoogleCloudGax.BackoffPolicy

    /// Creates a new `BackendBucketsClient` instance.
    public init(_ options: GoogleCloudGax.ClientOptions = .init()) throws {
      var inner: any Clients.BackendBucketsStub = try Clients.BackendBucketsTransport(options)
      inner = Clients.BackendBucketsRetry(inner, options: options)
      if let logger = options.logger {
        inner = Clients.BackendBucketsLogging(inner, logger: logger)
      }
      self.inner = inner
      self.pollingErrorPolicy = options.pollingErrorPolicy
      self.pollingBackoffPolicy = options.pollingBackoffPolicy
    }

    /// Adds a key for validating requests with signed URLs for this backend
    /// bucket.
    ///
    /// @Snippet(path: "backendBuckets_addSignedUrlKey")
    public func addSignedUrlKey(
      request: BackendBucketsClient.AddSignedUrlKeyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.addSignedUrlKey(request: request, options: options)
    }

    /// Adds a key for validating requests with signed URLs for this backend
    /// bucket.
    ///
    /// @Snippet(path: "backendBuckets_addSignedUrlKey")
    public func addSignedUrlKey(
      withPolling: BackendBucketsClient.AddSignedUrlKeyRequest,
      options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let extractStatus = {
        (op: GoogleCloudComputeV1.Operation) throws
          -> GoogleCloudGax._PollableOperationImpl<GoogleCloudComputeV1.Operation>.State in
        guard op._done() else {
          return .init(done: false, result: nil)
        }

        do {
          try op._detectErrors()
        } catch let e as GoogleCloudGax.RequestError {
          return .init(done: true, result: .failure(e))
        }
        return .init(done: true, result: .success(op))
      }
      let rawOp = try await self.addSignedUrlKey(request: withPolling, options: options)
      let initialState = try extractStatus(rawOp)
      let poll = {
        () async throws
          -> GoogleCloudGax._PollableOperationImpl<GoogleCloudComputeV1.Operation>.State in
        let op = try await self.getOperation(
          request: .init().with {
            $0.operation = rawOp._name()
            $0.project = withPolling.project
          }, options: options)
        return try extractStatus(op)
      }
      return GoogleCloudGax._PollableOperationImpl(
        initialState: initialState,
        polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
        backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
        poll: poll
      )
    }

    /// Retrieves the list of all BackendBucket resources, regional and global,
    /// available to the specified project.
    ///
    /// To prevent failure, it is recommended that you set the
    /// `returnPartialSuccess` parameter to `true`.
    ///
    /// @Snippet(path: "backendBuckets_aggregatedList")
    public func aggregatedList(
      request: BackendBucketsClient.AggregatedListRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.BackendBucketAggregatedList {
      try await self.inner.aggregatedList(request: request, options: options)
    }

    /// Retrieves the list of all BackendBucket resources, regional and global,
    /// available to the specified project.
    ///
    /// To prevent failure, it is recommended that you set the
    /// `returnPartialSuccess` parameter to `true`.
    ///
    /// @Snippet(path: "backendBuckets_aggregatedList")
    public func aggregatedList(
      byItem: BackendBucketsClient.AggregatedListRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<(Swift.String, BackendBucketsScopedList), Swift.Error> {
      let listRpc = {
        (token: Swift.String) async throws -> GoogleCloudComputeV1.BackendBucketAggregatedList in
        var request = byItem
        request.pageToken = token
        return try await self.aggregatedList(request: request, options: options)
      }
      return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
    }

    /// Deletes the specified BackendBucket resource.
    ///
    /// @Snippet(path: "backendBuckets_delete")
    public func delete(
      request: BackendBucketsClient.DeleteRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.delete(request: request, options: options)
    }

    /// Deletes the specified BackendBucket resource.
    ///
    /// @Snippet(path: "backendBuckets_delete")
    public func delete(
      withPolling: BackendBucketsClient.DeleteRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let extractStatus = {
        (op: GoogleCloudComputeV1.Operation) throws
          -> GoogleCloudGax._PollableOperationImpl<GoogleCloudComputeV1.Operation>.State in
        guard op._done() else {
          return .init(done: false, result: nil)
        }

        do {
          try op._detectErrors()
        } catch let e as GoogleCloudGax.RequestError {
          return .init(done: true, result: .failure(e))
        }
        return .init(done: true, result: .success(op))
      }
      let rawOp = try await self.delete(request: withPolling, options: options)
      let initialState = try extractStatus(rawOp)
      let poll = {
        () async throws
          -> GoogleCloudGax._PollableOperationImpl<GoogleCloudComputeV1.Operation>.State in
        let op = try await self.getOperation(
          request: .init().with {
            $0.operation = rawOp._name()
            $0.project = withPolling.project
          }, 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 key for validating requests with signed URLs for this backend
    /// bucket.
    ///
    /// @Snippet(path: "backendBuckets_deleteSignedUrlKey")
    public func deleteSignedUrlKey(
      request: BackendBucketsClient.DeleteSignedUrlKeyRequest,
      options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.deleteSignedUrlKey(request: request, options: options)
    }

    /// Deletes a key for validating requests with signed URLs for this backend
    /// bucket.
    ///
    /// @Snippet(path: "backendBuckets_deleteSignedUrlKey")
    public func deleteSignedUrlKey(
      withPolling: BackendBucketsClient.DeleteSignedUrlKeyRequest,
      options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let extractStatus = {
        (op: GoogleCloudComputeV1.Operation) throws
          -> GoogleCloudGax._PollableOperationImpl<GoogleCloudComputeV1.Operation>.State in
        guard op._done() else {
          return .init(done: false, result: nil)
        }

        do {
          try op._detectErrors()
        } catch let e as GoogleCloudGax.RequestError {
          return .init(done: true, result: .failure(e))
        }
        return .init(done: true, result: .success(op))
      }
      let rawOp = try await self.deleteSignedUrlKey(request: withPolling, options: options)
      let initialState = try extractStatus(rawOp)
      let poll = {
        () async throws
          -> GoogleCloudGax._PollableOperationImpl<GoogleCloudComputeV1.Operation>.State in
        let op = try await self.getOperation(
          request: .init().with {
            $0.operation = rawOp._name()
            $0.project = withPolling.project
          }, options: options)
        return try extractStatus(op)
      }
      return GoogleCloudGax._PollableOperationImpl(
        initialState: initialState,
        polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
        backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
        poll: poll
      )
    }

    /// Returns the specified BackendBucket resource.
    ///
    /// @Snippet(path: "backendBuckets_get")
    public func `get`(
      request: BackendBucketsClient.GetRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.BackendBucket {
      try await self.inner.`get`(request: request, options: options)
    }

    /// Gets the access control policy for a resource. May be empty if no such
    /// policy or resource exists.
    ///
    /// @Snippet(path: "backendBuckets_getIamPolicy")
    public func getIamPolicy(
      request: BackendBucketsClient.GetIamPolicyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Policy {
      try await self.inner.getIamPolicy(request: request, options: options)
    }

    /// Creates a BackendBucket resource in the specified project using
    /// the data included in the request.
    ///
    /// @Snippet(path: "backendBuckets_insert")
    public func insert(
      request: BackendBucketsClient.InsertRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.insert(request: request, options: options)
    }

    /// Creates a BackendBucket resource in the specified project using
    /// the data included in the request.
    ///
    /// @Snippet(path: "backendBuckets_insert")
    public func insert(
      withPolling: BackendBucketsClient.InsertRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let extractStatus = {
        (op: GoogleCloudComputeV1.Operation) throws
          -> GoogleCloudGax._PollableOperationImpl<GoogleCloudComputeV1.Operation>.State in
        guard op._done() else {
          return .init(done: false, result: nil)
        }

        do {
          try op._detectErrors()
        } catch let e as GoogleCloudGax.RequestError {
          return .init(done: true, result: .failure(e))
        }
        return .init(done: true, result: .success(op))
      }
      let rawOp = try await self.insert(request: withPolling, options: options)
      let initialState = try extractStatus(rawOp)
      let poll = {
        () async throws
          -> GoogleCloudGax._PollableOperationImpl<GoogleCloudComputeV1.Operation>.State in
        let op = try await self.getOperation(
          request: .init().with {
            $0.operation = rawOp._name()
            $0.project = withPolling.project
          }, options: options)
        return try extractStatus(op)
      }
      return GoogleCloudGax._PollableOperationImpl(
        initialState: initialState,
        polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
        backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
        poll: poll
      )
    }

    /// Retrieves the list of BackendBucket resources available to the specified
    /// project.
    ///
    /// @Snippet(path: "backendBuckets_list")
    public func list(
      request: BackendBucketsClient.ListRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.BackendBucketList {
      try await self.inner.list(request: request, options: options)
    }

    /// Retrieves the list of BackendBucket resources available to the specified
    /// project.
    ///
    /// @Snippet(path: "backendBuckets_list")
    public func list(
      byItem: BackendBucketsClient.ListRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<BackendBucket, Swift.Error> {
      let listRpc = {
        (token: Swift.String) async throws -> GoogleCloudComputeV1.BackendBucketList in
        var request = byItem
        request.pageToken = token
        return try await self.list(request: request, options: options)
      }
      return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
    }

    /// Retrieves a list of all usable backend buckets in the specified project.
    ///
    /// @Snippet(path: "backendBuckets_listUsable")
    public func listUsable(
      request: BackendBucketsClient.ListUsableRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.BackendBucketListUsable {
      try await self.inner.listUsable(request: request, options: options)
    }

    /// Retrieves a list of all usable backend buckets in the specified project.
    ///
    /// @Snippet(path: "backendBuckets_listUsable")
    public func listUsable(
      byItem: BackendBucketsClient.ListUsableRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<BackendBucket, Swift.Error> {
      let listRpc = {
        (token: Swift.String) async throws -> GoogleCloudComputeV1.BackendBucketListUsable in
        var request = byItem
        request.pageToken = token
        return try await self.listUsable(request: request, options: options)
      }
      return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
    }

    /// Updates the specified BackendBucket resource with the data included in the
    /// request. This method supportsPATCH
    /// semantics and uses theJSON merge
    /// patch format and processing rules.
    ///
    /// @Snippet(path: "backendBuckets_patch")
    public func patch(
      request: BackendBucketsClient.PatchRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.patch(request: request, options: options)
    }

    /// Updates the specified BackendBucket resource with the data included in the
    /// request. This method supportsPATCH
    /// semantics and uses theJSON merge
    /// patch format and processing rules.
    ///
    /// @Snippet(path: "backendBuckets_patch")
    public func patch(
      withPolling: BackendBucketsClient.PatchRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let extractStatus = {
        (op: GoogleCloudComputeV1.Operation) throws
          -> GoogleCloudGax._PollableOperationImpl<GoogleCloudComputeV1.Operation>.State in
        guard op._done() else {
          return .init(done: false, result: nil)
        }

        do {
          try op._detectErrors()
        } catch let e as GoogleCloudGax.RequestError {
          return .init(done: true, result: .failure(e))
        }
        return .init(done: true, result: .success(op))
      }
      let rawOp = try await self.patch(request: withPolling, options: options)
      let initialState = try extractStatus(rawOp)
      let poll = {
        () async throws
          -> GoogleCloudGax._PollableOperationImpl<GoogleCloudComputeV1.Operation>.State in
        let op = try await self.getOperation(
          request: .init().with {
            $0.operation = rawOp._name()
            $0.project = withPolling.project
          }, options: options)
        return try extractStatus(op)
      }
      return GoogleCloudGax._PollableOperationImpl(
        initialState: initialState,
        polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
        backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
        poll: poll
      )
    }

    /// Sets the edge security policy for the specified backend bucket.
    ///
    /// @Snippet(path: "backendBuckets_setEdgeSecurityPolicy")
    public func setEdgeSecurityPolicy(
      request: BackendBucketsClient.SetEdgeSecurityPolicyRequest,
      options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.setEdgeSecurityPolicy(request: request, options: options)
    }

    /// Sets the edge security policy for the specified backend bucket.
    ///
    /// @Snippet(path: "backendBuckets_setEdgeSecurityPolicy")
    public func setEdgeSecurityPolicy(
      withPolling: BackendBucketsClient.SetEdgeSecurityPolicyRequest,
      options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let extractStatus = {
        (op: GoogleCloudComputeV1.Operation) throws
          -> GoogleCloudGax._PollableOperationImpl<GoogleCloudComputeV1.Operation>.State in
        guard op._done() else {
          return .init(done: false, result: nil)
        }

        do {
          try op._detectErrors()
        } catch let e as GoogleCloudGax.RequestError {
          return .init(done: true, result: .failure(e))
        }
        return .init(done: true, result: .success(op))
      }
      let rawOp = try await self.setEdgeSecurityPolicy(request: withPolling, options: options)
      let initialState = try extractStatus(rawOp)
      let poll = {
        () async throws
          -> GoogleCloudGax._PollableOperationImpl<GoogleCloudComputeV1.Operation>.State in
        let op = try await self.getOperation(
          request: .init().with {
            $0.operation = rawOp._name()
            $0.project = withPolling.project
          }, options: options)
        return try extractStatus(op)
      }
      return GoogleCloudGax._PollableOperationImpl(
        initialState: initialState,
        polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
        backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
        poll: poll
      )
    }

    /// Sets the access control policy on the specified resource.
    /// Replaces any existing policy.
    ///
    /// @Snippet(path: "backendBuckets_setIamPolicy")
    public func setIamPolicy(
      request: BackendBucketsClient.SetIamPolicyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Policy {
      try await self.inner.setIamPolicy(request: request, options: options)
    }

    /// Returns permissions that a caller has on the specified resource.
    ///
    /// @Snippet(path: "backendBuckets_testIamPermissions")
    public func testIamPermissions(
      request: BackendBucketsClient.TestIamPermissionsRequest,
      options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.TestPermissionsResponse {
      try await self.inner.testIamPermissions(request: request, options: options)
    }

    /// Updates the specified BackendBucket resource with the data included in the
    /// request.
    ///
    /// @Snippet(path: "backendBuckets_update")
    public func update(
      request: BackendBucketsClient.UpdateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.update(request: request, options: options)
    }

    /// Updates the specified BackendBucket resource with the data included in the
    /// request.
    ///
    /// @Snippet(path: "backendBuckets_update")
    public func update(
      withPolling: BackendBucketsClient.UpdateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let extractStatus = {
        (op: GoogleCloudComputeV1.Operation) throws
          -> GoogleCloudGax._PollableOperationImpl<GoogleCloudComputeV1.Operation>.State in
        guard op._done() else {
          return .init(done: false, result: nil)
        }

        do {
          try op._detectErrors()
        } catch let e as GoogleCloudGax.RequestError {
          return .init(done: true, result: .failure(e))
        }
        return .init(done: true, result: .success(op))
      }
      let rawOp = try await self.update(request: withPolling, options: options)
      let initialState = try extractStatus(rawOp)
      let poll = {
        () async throws
          -> GoogleCloudGax._PollableOperationImpl<GoogleCloudComputeV1.Operation>.State in
        let op = try await self.getOperation(
          request: .init().with {
            $0.operation = rawOp._name()
            $0.project = withPolling.project
          }, options: options)
        return try extractStatus(op)
      }
      return GoogleCloudGax._PollableOperationImpl(
        initialState: initialState,
        polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
        backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
        poll: poll
      )
    }

    /// Retrieves the specified Operations resource.
    ///
    /// @Snippet(path: "backendBuckets_getOperation")
    func getOperation(
      request: GlobalOperationsClient.GetRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.getOperation(request: request, options: options)
    }
  }

  extension Clients {
    /// A Swift protocol to mock `BackendBucketsClient`.
    ///
    /// To mock `BackendBucketsClient` change your functions to receive
    /// `some BackendBucketsProtocol` or `any BackendBucketsProtocol`
    /// and pass a mock implementation in your tests.
    public protocol BackendBucketsProtocol {
      /// See `BackendBucketsClient.addSignedUrlKey`.
      func addSignedUrlKey(request: BackendBucketsClient.AddSignedUrlKeyRequest) async throws
        -> GoogleCloudComputeV1.Operation

      /// See `BackendBucketsClient.aggregatedList`.
      func aggregatedList(request: BackendBucketsClient.AggregatedListRequest) async throws
        -> GoogleCloudComputeV1.BackendBucketAggregatedList

      /// See `BackendBucketsClient.aggregatedList`.
      func aggregatedList(
        byItem: BackendBucketsClient.AggregatedListRequest
      ) throws -> any AsyncSequence<(Swift.String, BackendBucketsScopedList), Swift.Error>

      /// See `BackendBucketsClient.aggregatedList`.
      func aggregatedList(
        project: Swift.String,
      ) throws -> any AsyncSequence<(Swift.String, BackendBucketsScopedList), Swift.Error>

      /// See `BackendBucketsClient.delete`.
      func delete(request: BackendBucketsClient.DeleteRequest) async throws
        -> GoogleCloudComputeV1.Operation

      /// See `BackendBucketsClient.deleteSignedUrlKey`.
      func deleteSignedUrlKey(request: BackendBucketsClient.DeleteSignedUrlKeyRequest) async throws
        -> GoogleCloudComputeV1.Operation

      /// See `BackendBucketsClient.`get``.
      func `get`(request: BackendBucketsClient.GetRequest) async throws
        -> GoogleCloudComputeV1.BackendBucket

      /// See `BackendBucketsClient.`get``.
      func `get`(
        project: Swift.String,
        backendBucket: Swift.String,
      ) async throws -> GoogleCloudComputeV1.BackendBucket

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

      /// See `BackendBucketsClient.getIamPolicy`.
      func getIamPolicy(
        project: Swift.String,
        resource: Swift.String,
      ) async throws -> GoogleCloudComputeV1.Policy

      /// See `BackendBucketsClient.insert`.
      func insert(request: BackendBucketsClient.InsertRequest) async throws
        -> GoogleCloudComputeV1.Operation

      /// See `BackendBucketsClient.list`.
      func list(request: BackendBucketsClient.ListRequest) async throws
        -> GoogleCloudComputeV1.BackendBucketList

      /// See `BackendBucketsClient.list`.
      func list(
        byItem: BackendBucketsClient.ListRequest
      ) throws -> any AsyncSequence<BackendBucket, Swift.Error>

      /// See `BackendBucketsClient.list`.
      func list(
        project: Swift.String,
      ) throws -> any AsyncSequence<BackendBucket, Swift.Error>

      /// See `BackendBucketsClient.listUsable`.
      func listUsable(request: BackendBucketsClient.ListUsableRequest) async throws
        -> GoogleCloudComputeV1.BackendBucketListUsable

      /// See `BackendBucketsClient.listUsable`.
      func listUsable(
        byItem: BackendBucketsClient.ListUsableRequest
      ) throws -> any AsyncSequence<BackendBucket, Swift.Error>

      /// See `BackendBucketsClient.listUsable`.
      func listUsable(
        project: Swift.String,
      ) throws -> any AsyncSequence<BackendBucket, Swift.Error>

      /// See `BackendBucketsClient.patch`.
      func patch(request: BackendBucketsClient.PatchRequest) async throws
        -> GoogleCloudComputeV1.Operation

      /// See `BackendBucketsClient.setEdgeSecurityPolicy`.
      func setEdgeSecurityPolicy(request: BackendBucketsClient.SetEdgeSecurityPolicyRequest)
        async throws -> GoogleCloudComputeV1.Operation

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

      /// See `BackendBucketsClient.setIamPolicy`.
      func setIamPolicy(
        project: Swift.String,
        resource: Swift.String,
        body: GlobalSetPolicyRequest?,
      ) async throws -> GoogleCloudComputeV1.Policy

      /// See `BackendBucketsClient.testIamPermissions`.
      func testIamPermissions(request: BackendBucketsClient.TestIamPermissionsRequest) async throws
        -> GoogleCloudComputeV1.TestPermissionsResponse

      /// See `BackendBucketsClient.testIamPermissions`.
      func testIamPermissions(
        project: Swift.String,
        resource: Swift.String,
        body: TestPermissionsRequest?,
      ) async throws -> GoogleCloudComputeV1.TestPermissionsResponse

      /// See `BackendBucketsClient.update`.
      func update(request: BackendBucketsClient.UpdateRequest) async throws
        -> GoogleCloudComputeV1.Operation

      /// See `BackendBucketsClient.addSignedUrlKey`.
      func addSignedUrlKey(
        request: BackendBucketsClient.AddSignedUrlKeyRequest, options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.Operation

      /// See `BackendBucketsClient.aggregatedList`.
      func aggregatedList(
        request: BackendBucketsClient.AggregatedListRequest, options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.BackendBucketAggregatedList

      /// See `BackendBucketsClient.aggregatedList`.
      func aggregatedList(
        byItem: BackendBucketsClient.AggregatedListRequest, options: GoogleCloudGax.RequestOptions
      ) throws -> any AsyncSequence<(Swift.String, BackendBucketsScopedList), Swift.Error>

      /// See `BackendBucketsClient.delete`.
      func delete(
        request: BackendBucketsClient.DeleteRequest, options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.Operation

      /// See `BackendBucketsClient.deleteSignedUrlKey`.
      func deleteSignedUrlKey(
        request: BackendBucketsClient.DeleteSignedUrlKeyRequest,
        options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.Operation

      /// See `BackendBucketsClient.`get``.
      func `get`(
        request: BackendBucketsClient.GetRequest, options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.BackendBucket

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

      /// See `BackendBucketsClient.insert`.
      func insert(
        request: BackendBucketsClient.InsertRequest, options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.Operation

      /// See `BackendBucketsClient.list`.
      func list(
        request: BackendBucketsClient.ListRequest, options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.BackendBucketList

      /// See `BackendBucketsClient.list`.
      func list(
        byItem: BackendBucketsClient.ListRequest, options: GoogleCloudGax.RequestOptions
      ) throws -> any AsyncSequence<BackendBucket, Swift.Error>

      /// See `BackendBucketsClient.listUsable`.
      func listUsable(
        request: BackendBucketsClient.ListUsableRequest, options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.BackendBucketListUsable

      /// See `BackendBucketsClient.listUsable`.
      func listUsable(
        byItem: BackendBucketsClient.ListUsableRequest, options: GoogleCloudGax.RequestOptions
      ) throws -> any AsyncSequence<BackendBucket, Swift.Error>

      /// See `BackendBucketsClient.patch`.
      func patch(
        request: BackendBucketsClient.PatchRequest, options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.Operation

      /// See `BackendBucketsClient.setEdgeSecurityPolicy`.
      func setEdgeSecurityPolicy(
        request: BackendBucketsClient.SetEdgeSecurityPolicyRequest,
        options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.Operation

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

      /// See `BackendBucketsClient.testIamPermissions`.
      func testIamPermissions(
        request: BackendBucketsClient.TestIamPermissionsRequest,
        options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.TestPermissionsResponse

      /// See `BackendBucketsClient.update`.
      func update(
        request: BackendBucketsClient.UpdateRequest, options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.Operation
    }
  }

  // Default implementations
  extension Clients.BackendBucketsProtocol {
    public func addSignedUrlKey(request: BackendBucketsClient.AddSignedUrlKeyRequest) async throws
      -> GoogleCloudComputeV1.Operation
    {
      try await self.addSignedUrlKey(request: request, options: .init())
    }

    public func addSignedUrlKey(
      request: BackendBucketsClient.AddSignedUrlKeyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }

    public func addSignedUrlKey(
      withPolling: BackendBucketsClient.AddSignedUrlKeyRequest
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      try await self.addSignedUrlKey(withPolling: withPolling, options: .init())
    }

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

    public func addSignedUrlKey(
      project: Swift.String,
      backendBucket: Swift.String,
      body: SignedUrlKey?,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = BackendBucketsClient.AddSignedUrlKeyRequest().with {
        $0.project = project
        $0.backendBucket = backendBucket
        $0.body = body
      }
      return try await self.addSignedUrlKey(withPolling: request)
    }

    public func aggregatedList(request: BackendBucketsClient.AggregatedListRequest) async throws
      -> GoogleCloudComputeV1.BackendBucketAggregatedList
    {
      try await self.aggregatedList(request: request, options: .init())
    }

    public func aggregatedList(
      request: BackendBucketsClient.AggregatedListRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.BackendBucketAggregatedList {
      throw GoogleCloudGax.RequestError.unimplemented
    }

    public func aggregatedList(
      byItem: BackendBucketsClient.AggregatedListRequest
    ) throws -> any AsyncSequence<(Swift.String, BackendBucketsScopedList), Swift.Error> {
      try self.aggregatedList(byItem: byItem, options: .init())
    }

    public func aggregatedList(
      byItem: BackendBucketsClient.AggregatedListRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<(Swift.String, BackendBucketsScopedList), Swift.Error> {
      let listRpc = {
        (token: Swift.String) async throws -> GoogleCloudComputeV1.BackendBucketAggregatedList in
        throw GoogleCloudGax.RequestError.unimplemented
      }
      return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
    }

    public func aggregatedList(
      project: Swift.String,
    ) throws -> any AsyncSequence<(Swift.String, BackendBucketsScopedList), Swift.Error> {
      let request = BackendBucketsClient.AggregatedListRequest().with {
        $0.project = project
      }
      return try self.aggregatedList(byItem: request)
    }

    public func delete(request: BackendBucketsClient.DeleteRequest) async throws
      -> GoogleCloudComputeV1.Operation
    {
      try await self.delete(request: request, options: .init())
    }

    public func delete(
      request: BackendBucketsClient.DeleteRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }

    public func delete(
      withPolling: BackendBucketsClient.DeleteRequest
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      try await self.delete(withPolling: withPolling, options: .init())
    }

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

    public func delete(
      project: Swift.String,
      backendBucket: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = BackendBucketsClient.DeleteRequest().with {
        $0.project = project
        $0.backendBucket = backendBucket
      }
      return try await self.delete(withPolling: request)
    }

    public func deleteSignedUrlKey(request: BackendBucketsClient.DeleteSignedUrlKeyRequest)
      async throws -> GoogleCloudComputeV1.Operation
    {
      try await self.deleteSignedUrlKey(request: request, options: .init())
    }

    public func deleteSignedUrlKey(
      request: BackendBucketsClient.DeleteSignedUrlKeyRequest,
      options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }

    public func deleteSignedUrlKey(
      withPolling: BackendBucketsClient.DeleteSignedUrlKeyRequest
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      try await self.deleteSignedUrlKey(withPolling: withPolling, options: .init())
    }

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

    public func deleteSignedUrlKey(
      project: Swift.String,
      backendBucket: Swift.String,
      keyName: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = BackendBucketsClient.DeleteSignedUrlKeyRequest().with {
        $0.project = project
        $0.backendBucket = backendBucket
        $0.keyName = keyName
      }
      return try await self.deleteSignedUrlKey(withPolling: request)
    }

    public func `get`(request: BackendBucketsClient.GetRequest) async throws
      -> GoogleCloudComputeV1.BackendBucket
    {
      try await self.`get`(request: request, options: .init())
    }

    public func `get`(
      request: BackendBucketsClient.GetRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.BackendBucket {
      throw GoogleCloudGax.RequestError.unimplemented
    }

    public func `get`(
      project: Swift.String,
      backendBucket: Swift.String,
    ) async throws -> GoogleCloudComputeV1.BackendBucket {
      let request = BackendBucketsClient.GetRequest().with {
        $0.project = project
        $0.backendBucket = backendBucket
      }
      return try await self.`get`(request: request)
    }

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

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

    public func getIamPolicy(
      project: Swift.String,
      resource: Swift.String,
    ) async throws -> GoogleCloudComputeV1.Policy {
      let request = BackendBucketsClient.GetIamPolicyRequest().with {
        $0.project = project
        $0.resource = resource
      }
      return try await self.getIamPolicy(request: request)
    }

    public func insert(request: BackendBucketsClient.InsertRequest) async throws
      -> GoogleCloudComputeV1.Operation
    {
      try await self.insert(request: request, options: .init())
    }

    public func insert(
      request: BackendBucketsClient.InsertRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }

    public func insert(
      withPolling: BackendBucketsClient.InsertRequest
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      try await self.insert(withPolling: withPolling, options: .init())
    }

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

    public func insert(
      project: Swift.String,
      body: BackendBucket?,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = BackendBucketsClient.InsertRequest().with {
        $0.project = project
        $0.body = body
      }
      return try await self.insert(withPolling: request)
    }

    public func list(request: BackendBucketsClient.ListRequest) async throws
      -> GoogleCloudComputeV1.BackendBucketList
    {
      try await self.list(request: request, options: .init())
    }

    public func list(
      request: BackendBucketsClient.ListRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.BackendBucketList {
      throw GoogleCloudGax.RequestError.unimplemented
    }

    public func list(
      byItem: BackendBucketsClient.ListRequest
    ) throws -> any AsyncSequence<BackendBucket, Swift.Error> {
      try self.list(byItem: byItem, options: .init())
    }

    public func list(
      byItem: BackendBucketsClient.ListRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<BackendBucket, Swift.Error> {
      let listRpc = {
        (token: Swift.String) async throws -> GoogleCloudComputeV1.BackendBucketList in
        throw GoogleCloudGax.RequestError.unimplemented
      }
      return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
    }

    public func list(
      project: Swift.String,
    ) throws -> any AsyncSequence<BackendBucket, Swift.Error> {
      let request = BackendBucketsClient.ListRequest().with {
        $0.project = project
      }
      return try self.list(byItem: request)
    }

    public func listUsable(request: BackendBucketsClient.ListUsableRequest) async throws
      -> GoogleCloudComputeV1.BackendBucketListUsable
    {
      try await self.listUsable(request: request, options: .init())
    }

    public func listUsable(
      request: BackendBucketsClient.ListUsableRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.BackendBucketListUsable {
      throw GoogleCloudGax.RequestError.unimplemented
    }

    public func listUsable(
      byItem: BackendBucketsClient.ListUsableRequest
    ) throws -> any AsyncSequence<BackendBucket, Swift.Error> {
      try self.listUsable(byItem: byItem, options: .init())
    }

    public func listUsable(
      byItem: BackendBucketsClient.ListUsableRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<BackendBucket, Swift.Error> {
      let listRpc = {
        (token: Swift.String) async throws -> GoogleCloudComputeV1.BackendBucketListUsable in
        throw GoogleCloudGax.RequestError.unimplemented
      }
      return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
    }

    public func listUsable(
      project: Swift.String,
    ) throws -> any AsyncSequence<BackendBucket, Swift.Error> {
      let request = BackendBucketsClient.ListUsableRequest().with {
        $0.project = project
      }
      return try self.listUsable(byItem: request)
    }

    public func patch(request: BackendBucketsClient.PatchRequest) async throws
      -> GoogleCloudComputeV1.Operation
    {
      try await self.patch(request: request, options: .init())
    }

    public func patch(
      request: BackendBucketsClient.PatchRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }

    public func patch(
      withPolling: BackendBucketsClient.PatchRequest
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      try await self.patch(withPolling: withPolling, options: .init())
    }

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

    public func patch(
      project: Swift.String,
      backendBucket: Swift.String,
      body: BackendBucket?,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = BackendBucketsClient.PatchRequest().with {
        $0.project = project
        $0.backendBucket = backendBucket
        $0.body = body
      }
      return try await self.patch(withPolling: request)
    }

    public func setEdgeSecurityPolicy(request: BackendBucketsClient.SetEdgeSecurityPolicyRequest)
      async throws -> GoogleCloudComputeV1.Operation
    {
      try await self.setEdgeSecurityPolicy(request: request, options: .init())
    }

    public func setEdgeSecurityPolicy(
      request: BackendBucketsClient.SetEdgeSecurityPolicyRequest,
      options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }

    public func setEdgeSecurityPolicy(
      withPolling: BackendBucketsClient.SetEdgeSecurityPolicyRequest
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      try await self.setEdgeSecurityPolicy(withPolling: withPolling, options: .init())
    }

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

    public func setEdgeSecurityPolicy(
      project: Swift.String,
      backendBucket: Swift.String,
      body: SecurityPolicyReference?,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = BackendBucketsClient.SetEdgeSecurityPolicyRequest().with {
        $0.project = project
        $0.backendBucket = backendBucket
        $0.body = body
      }
      return try await self.setEdgeSecurityPolicy(withPolling: request)
    }

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

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

    public func setIamPolicy(
      project: Swift.String,
      resource: Swift.String,
      body: GlobalSetPolicyRequest?,
    ) async throws -> GoogleCloudComputeV1.Policy {
      let request = BackendBucketsClient.SetIamPolicyRequest().with {
        $0.project = project
        $0.resource = resource
        $0.body = body
      }
      return try await self.setIamPolicy(request: request)
    }

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

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

    public func testIamPermissions(
      project: Swift.String,
      resource: Swift.String,
      body: TestPermissionsRequest?,
    ) async throws -> GoogleCloudComputeV1.TestPermissionsResponse {
      let request = BackendBucketsClient.TestIamPermissionsRequest().with {
        $0.project = project
        $0.resource = resource
        $0.body = body
      }
      return try await self.testIamPermissions(request: request)
    }

    public func update(request: BackendBucketsClient.UpdateRequest) async throws
      -> GoogleCloudComputeV1.Operation
    {
      try await self.update(request: request, options: .init())
    }

    public func update(
      request: BackendBucketsClient.UpdateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }

    public func update(
      withPolling: BackendBucketsClient.UpdateRequest
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      try await self.update(withPolling: withPolling, options: .init())
    }

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

    public func update(
      project: Swift.String,
      backendBucket: Swift.String,
      body: BackendBucket?,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = BackendBucketsClient.UpdateRequest().with {
        $0.project = project
        $0.backendBucket = backendBucket
        $0.body = body
      }
      return try await self.update(withPolling: request)
    }

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

    public func getOperation(
      request: GlobalOperationsClient.GetRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }
  }
#endif
