// 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 PublicAdvertisedPrefixes
  import Foundation
  #if canImport(FoundationNetworking)
    import FoundationNetworking
  #endif
  import GoogleCloudWkt
  import GoogleCloudGax

  /// Service for the `publicAdvertisedPrefixes` resource.
  ///
  /// @Snippet(path: "publicAdvertisedPrefixesQuickstart")
  public class PublicAdvertisedPrefixesClient: Clients.PublicAdvertisedPrefixesProtocol {
    let inner: any Clients.PublicAdvertisedPrefixesStub
    let pollingErrorPolicy: GoogleCloudGax.PollingErrorPolicy
    let pollingBackoffPolicy: GoogleCloudGax.BackoffPolicy

    /// Creates a new `PublicAdvertisedPrefixesClient` instance.
    public init(_ options: GoogleCloudGax.ClientOptions = .init()) throws {
      var inner: any Clients.PublicAdvertisedPrefixesStub =
        try Clients.PublicAdvertisedPrefixesTransport(options)
      inner = Clients.PublicAdvertisedPrefixesRetry(inner, options: options)
      if let logger = options.logger {
        inner = Clients.PublicAdvertisedPrefixesLogging(inner, logger: logger)
      }
      self.inner = inner
      self.pollingErrorPolicy = options.pollingErrorPolicy
      self.pollingBackoffPolicy = options.pollingBackoffPolicy
    }

    /// Announces the specified PublicAdvertisedPrefix
    ///
    /// @Snippet(path: "publicAdvertisedPrefixes_announce")
    public func announce(
      request: PublicAdvertisedPrefixesClient.AnnounceRequest,
      options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.announce(request: request, options: options)
    }

    /// Announces the specified PublicAdvertisedPrefix
    ///
    /// @Snippet(path: "publicAdvertisedPrefixes_announce")
    public func announce(
      withPolling: PublicAdvertisedPrefixesClient.AnnounceRequest,
      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.announce(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 the specified PublicAdvertisedPrefix
    ///
    /// @Snippet(path: "publicAdvertisedPrefixes_delete")
    public func delete(
      request: PublicAdvertisedPrefixesClient.DeleteRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.delete(request: request, options: options)
    }

    /// Deletes the specified PublicAdvertisedPrefix
    ///
    /// @Snippet(path: "publicAdvertisedPrefixes_delete")
    public func delete(
      withPolling: PublicAdvertisedPrefixesClient.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
      )
    }

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

    /// Creates a PublicAdvertisedPrefix in the specified project
    /// using the parameters that are included in the request.
    ///
    /// @Snippet(path: "publicAdvertisedPrefixes_insert")
    public func insert(
      request: PublicAdvertisedPrefixesClient.InsertRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.insert(request: request, options: options)
    }

    /// Creates a PublicAdvertisedPrefix in the specified project
    /// using the parameters that are included in the request.
    ///
    /// @Snippet(path: "publicAdvertisedPrefixes_insert")
    public func insert(
      withPolling: PublicAdvertisedPrefixesClient.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
      )
    }

    /// Lists the PublicAdvertisedPrefixes for a project.
    ///
    /// @Snippet(path: "publicAdvertisedPrefixes_list")
    public func list(
      request: PublicAdvertisedPrefixesClient.ListRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.PublicAdvertisedPrefixList {
      try await self.inner.list(request: request, options: options)
    }

    /// Lists the PublicAdvertisedPrefixes for a project.
    ///
    /// @Snippet(path: "publicAdvertisedPrefixes_list")
    public func list(
      byItem: PublicAdvertisedPrefixesClient.ListRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<PublicAdvertisedPrefix, Swift.Error> {
      let listRpc = {
        (token: Swift.String) async throws -> GoogleCloudComputeV1.PublicAdvertisedPrefixList in
        var request = byItem
        request.pageToken = token
        return try await self.list(request: request, options: options)
      }
      return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
    }

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

    /// Patches the specified Router resource with the data included in the
    /// request. This method supportsPATCH
    /// semantics and usesJSON merge
    /// patch format and processing rules.
    ///
    /// @Snippet(path: "publicAdvertisedPrefixes_patch")
    public func patch(
      withPolling: PublicAdvertisedPrefixesClient.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
      )
    }

    /// Withdraws the specified PublicAdvertisedPrefix
    ///
    /// @Snippet(path: "publicAdvertisedPrefixes_withdraw")
    public func withdraw(
      request: PublicAdvertisedPrefixesClient.WithdrawRequest,
      options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.withdraw(request: request, options: options)
    }

    /// Withdraws the specified PublicAdvertisedPrefix
    ///
    /// @Snippet(path: "publicAdvertisedPrefixes_withdraw")
    public func withdraw(
      withPolling: PublicAdvertisedPrefixesClient.WithdrawRequest,
      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.withdraw(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: "publicAdvertisedPrefixes_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 `PublicAdvertisedPrefixesClient`.
    ///
    /// To mock `PublicAdvertisedPrefixesClient` change your functions to receive
    /// `some PublicAdvertisedPrefixesProtocol` or `any PublicAdvertisedPrefixesProtocol`
    /// and pass a mock implementation in your tests.
    public protocol PublicAdvertisedPrefixesProtocol {
      /// See `PublicAdvertisedPrefixesClient.announce`.
      func announce(request: PublicAdvertisedPrefixesClient.AnnounceRequest) async throws
        -> GoogleCloudComputeV1.Operation

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

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

      /// See `PublicAdvertisedPrefixesClient.`get``.
      func `get`(
        project: Swift.String,
        publicAdvertisedPrefix: Swift.String,
      ) async throws -> GoogleCloudComputeV1.PublicAdvertisedPrefix

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

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

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

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

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

      /// See `PublicAdvertisedPrefixesClient.withdraw`.
      func withdraw(request: PublicAdvertisedPrefixesClient.WithdrawRequest) async throws
        -> GoogleCloudComputeV1.Operation

      /// See `PublicAdvertisedPrefixesClient.announce`.
      func announce(
        request: PublicAdvertisedPrefixesClient.AnnounceRequest,
        options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.Operation

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

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

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

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

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

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

      /// See `PublicAdvertisedPrefixesClient.withdraw`.
      func withdraw(
        request: PublicAdvertisedPrefixesClient.WithdrawRequest,
        options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.Operation
    }
  }

  // Default implementations
  extension Clients.PublicAdvertisedPrefixesProtocol {
    public func announce(request: PublicAdvertisedPrefixesClient.AnnounceRequest) async throws
      -> GoogleCloudComputeV1.Operation
    {
      try await self.announce(request: request, options: .init())
    }

    public func announce(
      request: PublicAdvertisedPrefixesClient.AnnounceRequest,
      options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }

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

    public func announce(
      withPolling: PublicAdvertisedPrefixesClient.AnnounceRequest,
      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 announce(
      project: Swift.String,
      publicAdvertisedPrefix: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = PublicAdvertisedPrefixesClient.AnnounceRequest().with {
        $0.project = project
        $0.publicAdvertisedPrefix = publicAdvertisedPrefix
      }
      return try await self.announce(withPolling: request)
    }

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

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

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

    public func delete(
      withPolling: PublicAdvertisedPrefixesClient.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,
      publicAdvertisedPrefix: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = PublicAdvertisedPrefixesClient.DeleteRequest().with {
        $0.project = project
        $0.publicAdvertisedPrefix = publicAdvertisedPrefix
      }
      return try await self.delete(withPolling: request)
    }

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

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

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

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

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

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

    public func insert(
      withPolling: PublicAdvertisedPrefixesClient.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: PublicAdvertisedPrefix?,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = PublicAdvertisedPrefixesClient.InsertRequest().with {
        $0.project = project
        $0.body = body
      }
      return try await self.insert(withPolling: request)
    }

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

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

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

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

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

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

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

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

    public func patch(
      withPolling: PublicAdvertisedPrefixesClient.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,
      publicAdvertisedPrefix: Swift.String,
      body: PublicAdvertisedPrefix?,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = PublicAdvertisedPrefixesClient.PatchRequest().with {
        $0.project = project
        $0.publicAdvertisedPrefix = publicAdvertisedPrefix
        $0.body = body
      }
      return try await self.patch(withPolling: request)
    }

    public func withdraw(request: PublicAdvertisedPrefixesClient.WithdrawRequest) async throws
      -> GoogleCloudComputeV1.Operation
    {
      try await self.withdraw(request: request, options: .init())
    }

    public func withdraw(
      request: PublicAdvertisedPrefixesClient.WithdrawRequest,
      options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }

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

    public func withdraw(
      withPolling: PublicAdvertisedPrefixesClient.WithdrawRequest,
      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 withdraw(
      project: Swift.String,
      publicAdvertisedPrefix: Swift.String,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = PublicAdvertisedPrefixesClient.WithdrawRequest().with {
        $0.project = project
        $0.publicAdvertisedPrefix = publicAdvertisedPrefix
      }
      return try await self.withdraw(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
