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

  /// Service for the `nodeGroups` resource.
  ///
  /// @Snippet(path: "nodeGroupsQuickstart")
  public class NodeGroupsClient: Clients.NodeGroupsProtocol {
    let inner: any Clients.NodeGroupsStub
    let pollingErrorPolicy: GoogleCloudGax.PollingErrorPolicy
    let pollingBackoffPolicy: GoogleCloudGax.BackoffPolicy

    /// Creates a new `NodeGroupsClient` instance.
    public init(_ options: GoogleCloudGax.ClientOptions = .init()) throws {
      var inner: any Clients.NodeGroupsStub = try Clients.NodeGroupsTransport(options)
      inner = Clients.NodeGroupsRetry(inner, options: options)
      if let logger = options.logger {
        inner = Clients.NodeGroupsLogging(inner, logger: logger)
      }
      self.inner = inner
      self.pollingErrorPolicy = options.pollingErrorPolicy
      self.pollingBackoffPolicy = options.pollingBackoffPolicy
    }

    /// Adds specified number of nodes to the node group.
    ///
    /// @Snippet(path: "nodeGroups_addNodes")
    public func addNodes(
      request: NodeGroupsClient.AddNodesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.addNodes(request: request, options: options)
    }

    /// Adds specified number of nodes to the node group.
    ///
    /// @Snippet(path: "nodeGroups_addNodes")
    public func addNodes(
      withPolling: NodeGroupsClient.AddNodesRequest, 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.addNodes(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
            $0.zone = withPolling.zone
          }, options: options)
        return try extractStatus(op)
      }
      return GoogleCloudGax._PollableOperationImpl(
        initialState: initialState,
        polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
        backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
        poll: poll
      )
    }

    /// Retrieves an aggregated list of node groups.
    /// Note: use nodeGroups.listNodes for more details about each group.
    ///
    /// To prevent failure, Google recommends that you set the
    /// `returnPartialSuccess` parameter to `true`.
    ///
    /// @Snippet(path: "nodeGroups_aggregatedList")
    public func aggregatedList(
      request: NodeGroupsClient.AggregatedListRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.NodeGroupAggregatedList {
      try await self.inner.aggregatedList(request: request, options: options)
    }

    /// Retrieves an aggregated list of node groups.
    /// Note: use nodeGroups.listNodes for more details about each group.
    ///
    /// To prevent failure, Google recommends that you set the
    /// `returnPartialSuccess` parameter to `true`.
    ///
    /// @Snippet(path: "nodeGroups_aggregatedList")
    public func aggregatedList(
      byItem: NodeGroupsClient.AggregatedListRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<(Swift.String, NodeGroupsScopedList), Swift.Error> {
      let listRpc = {
        (token: Swift.String) async throws -> GoogleCloudComputeV1.NodeGroupAggregatedList in
        var request = byItem
        request.pageToken = token
        return try await self.aggregatedList(request: request, options: options)
      }
      return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
    }

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

    /// Deletes the specified NodeGroup resource.
    ///
    /// @Snippet(path: "nodeGroups_delete")
    public func delete(
      withPolling: NodeGroupsClient.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
            $0.zone = withPolling.zone
          }, options: options)
        return try extractStatus(op)
      }
      return GoogleCloudGax._PollableOperationImpl(
        initialState: initialState,
        polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
        backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
        poll: poll
      )
    }

    /// Deletes specified nodes from the node group.
    ///
    /// @Snippet(path: "nodeGroups_deleteNodes")
    public func deleteNodes(
      request: NodeGroupsClient.DeleteNodesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.deleteNodes(request: request, options: options)
    }

    /// Deletes specified nodes from the node group.
    ///
    /// @Snippet(path: "nodeGroups_deleteNodes")
    public func deleteNodes(
      withPolling: NodeGroupsClient.DeleteNodesRequest, 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.deleteNodes(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
            $0.zone = withPolling.zone
          }, 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 NodeGroup. Get a list of available NodeGroups
    /// by making a list() request.
    /// Note: the "nodes" field should not be used. Use nodeGroups.listNodes
    /// instead.
    ///
    /// @Snippet(path: "nodeGroups_get")
    public func `get`(
      request: NodeGroupsClient.GetRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.NodeGroup {
      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: "nodeGroups_getIamPolicy")
    public func getIamPolicy(
      request: NodeGroupsClient.GetIamPolicyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Policy {
      try await self.inner.getIamPolicy(request: request, options: options)
    }

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

    /// Creates a NodeGroup resource in the specified project using the data
    /// included in the request.
    ///
    /// @Snippet(path: "nodeGroups_insert")
    public func insert(
      withPolling: NodeGroupsClient.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
            $0.zone = withPolling.zone
          }, options: options)
        return try extractStatus(op)
      }
      return GoogleCloudGax._PollableOperationImpl(
        initialState: initialState,
        polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
        backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
        poll: poll
      )
    }

    /// Retrieves a list of node groups available to the specified project.
    /// Note: use nodeGroups.listNodes for more details about each group.
    ///
    /// @Snippet(path: "nodeGroups_list")
    public func list(
      request: NodeGroupsClient.ListRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.NodeGroupList {
      try await self.inner.list(request: request, options: options)
    }

    /// Retrieves a list of node groups available to the specified project.
    /// Note: use nodeGroups.listNodes for more details about each group.
    ///
    /// @Snippet(path: "nodeGroups_list")
    public func list(
      byItem: NodeGroupsClient.ListRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<NodeGroup, Swift.Error> {
      let listRpc = { (token: Swift.String) async throws -> GoogleCloudComputeV1.NodeGroupList in
        var request = byItem
        request.pageToken = token
        return try await self.list(request: request, options: options)
      }
      return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
    }

    /// Lists nodes in the node group.
    ///
    /// @Snippet(path: "nodeGroups_listNodes")
    public func listNodes(
      request: NodeGroupsClient.ListNodesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.NodeGroupsListNodes {
      try await self.inner.listNodes(request: request, options: options)
    }

    /// Lists nodes in the node group.
    ///
    /// @Snippet(path: "nodeGroups_listNodes")
    public func listNodes(
      byItem: NodeGroupsClient.ListNodesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<NodeGroupNode, Swift.Error> {
      let listRpc = {
        (token: Swift.String) async throws -> GoogleCloudComputeV1.NodeGroupsListNodes in
        var request = byItem
        request.pageToken = token
        return try await self.listNodes(request: request, options: options)
      }
      return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
    }

    /// Updates the specified node group.
    ///
    /// @Snippet(path: "nodeGroups_patch")
    public func patch(
      request: NodeGroupsClient.PatchRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.patch(request: request, options: options)
    }

    /// Updates the specified node group.
    ///
    /// @Snippet(path: "nodeGroups_patch")
    public func patch(
      withPolling: NodeGroupsClient.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
            $0.zone = withPolling.zone
          }, options: options)
        return try extractStatus(op)
      }
      return GoogleCloudGax._PollableOperationImpl(
        initialState: initialState,
        polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
        backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
        poll: poll
      )
    }

    /// Perform maintenance on a subset of nodes in the node group.
    ///
    /// @Snippet(path: "nodeGroups_performMaintenance")
    public func performMaintenance(
      request: NodeGroupsClient.PerformMaintenanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.performMaintenance(request: request, options: options)
    }

    /// Perform maintenance on a subset of nodes in the node group.
    ///
    /// @Snippet(path: "nodeGroups_performMaintenance")
    public func performMaintenance(
      withPolling: NodeGroupsClient.PerformMaintenanceRequest,
      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.performMaintenance(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
            $0.zone = withPolling.zone
          }, 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: "nodeGroups_setIamPolicy")
    public func setIamPolicy(
      request: NodeGroupsClient.SetIamPolicyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Policy {
      try await self.inner.setIamPolicy(request: request, options: options)
    }

    /// Updates the node template of the node group.
    ///
    /// @Snippet(path: "nodeGroups_setNodeTemplate")
    public func setNodeTemplate(
      request: NodeGroupsClient.SetNodeTemplateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.setNodeTemplate(request: request, options: options)
    }

    /// Updates the node template of the node group.
    ///
    /// @Snippet(path: "nodeGroups_setNodeTemplate")
    public func setNodeTemplate(
      withPolling: NodeGroupsClient.SetNodeTemplateRequest, 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.setNodeTemplate(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
            $0.zone = withPolling.zone
          }, options: options)
        return try extractStatus(op)
      }
      return GoogleCloudGax._PollableOperationImpl(
        initialState: initialState,
        polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
        backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
        poll: poll
      )
    }

    /// Simulates maintenance event on specified nodes from the node group.
    ///
    /// @Snippet(path: "nodeGroups_simulateMaintenanceEvent")
    public func simulateMaintenanceEvent(
      request: NodeGroupsClient.SimulateMaintenanceEventRequest,
      options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      try await self.inner.simulateMaintenanceEvent(request: request, options: options)
    }

    /// Simulates maintenance event on specified nodes from the node group.
    ///
    /// @Snippet(path: "nodeGroups_simulateMaintenanceEvent")
    public func simulateMaintenanceEvent(
      withPolling: NodeGroupsClient.SimulateMaintenanceEventRequest,
      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.simulateMaintenanceEvent(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
            $0.zone = withPolling.zone
          }, options: options)
        return try extractStatus(op)
      }
      return GoogleCloudGax._PollableOperationImpl(
        initialState: initialState,
        polling: options.pollingErrorPolicy ?? self.pollingErrorPolicy,
        backoff: options.pollingBackoffPolicy ?? self.pollingBackoffPolicy,
        poll: poll
      )
    }

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

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

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

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

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

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

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

      /// See `NodeGroupsClient.deleteNodes`.
      func deleteNodes(request: NodeGroupsClient.DeleteNodesRequest) async throws
        -> GoogleCloudComputeV1.Operation

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

      /// See `NodeGroupsClient.`get``.
      func `get`(
        project: Swift.String,
        zone: Swift.String,
        nodeGroup: Swift.String,
      ) async throws -> GoogleCloudComputeV1.NodeGroup

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

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

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

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

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

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

      /// See `NodeGroupsClient.listNodes`.
      func listNodes(request: NodeGroupsClient.ListNodesRequest) async throws
        -> GoogleCloudComputeV1.NodeGroupsListNodes

      /// See `NodeGroupsClient.listNodes`.
      func listNodes(
        byItem: NodeGroupsClient.ListNodesRequest
      ) throws -> any AsyncSequence<NodeGroupNode, Swift.Error>

      /// See `NodeGroupsClient.listNodes`.
      func listNodes(
        project: Swift.String,
        zone: Swift.String,
        nodeGroup: Swift.String,
      ) throws -> any AsyncSequence<NodeGroupNode, Swift.Error>

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

      /// See `NodeGroupsClient.performMaintenance`.
      func performMaintenance(request: NodeGroupsClient.PerformMaintenanceRequest) async throws
        -> GoogleCloudComputeV1.Operation

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

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

      /// See `NodeGroupsClient.setNodeTemplate`.
      func setNodeTemplate(request: NodeGroupsClient.SetNodeTemplateRequest) async throws
        -> GoogleCloudComputeV1.Operation

      /// See `NodeGroupsClient.simulateMaintenanceEvent`.
      func simulateMaintenanceEvent(request: NodeGroupsClient.SimulateMaintenanceEventRequest)
        async throws -> GoogleCloudComputeV1.Operation

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

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

      /// See `NodeGroupsClient.addNodes`.
      func addNodes(
        request: NodeGroupsClient.AddNodesRequest, options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.Operation

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

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

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

      /// See `NodeGroupsClient.deleteNodes`.
      func deleteNodes(
        request: NodeGroupsClient.DeleteNodesRequest, options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.Operation

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

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

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

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

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

      /// See `NodeGroupsClient.listNodes`.
      func listNodes(
        request: NodeGroupsClient.ListNodesRequest, options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.NodeGroupsListNodes

      /// See `NodeGroupsClient.listNodes`.
      func listNodes(
        byItem: NodeGroupsClient.ListNodesRequest, options: GoogleCloudGax.RequestOptions
      ) throws -> any AsyncSequence<NodeGroupNode, Swift.Error>

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

      /// See `NodeGroupsClient.performMaintenance`.
      func performMaintenance(
        request: NodeGroupsClient.PerformMaintenanceRequest, options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.Operation

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

      /// See `NodeGroupsClient.setNodeTemplate`.
      func setNodeTemplate(
        request: NodeGroupsClient.SetNodeTemplateRequest, options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.Operation

      /// See `NodeGroupsClient.simulateMaintenanceEvent`.
      func simulateMaintenanceEvent(
        request: NodeGroupsClient.SimulateMaintenanceEventRequest,
        options: GoogleCloudGax.RequestOptions
      ) async throws -> GoogleCloudComputeV1.Operation

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

  // Default implementations
  extension Clients.NodeGroupsProtocol {
    public func addNodes(request: NodeGroupsClient.AddNodesRequest) async throws
      -> GoogleCloudComputeV1.Operation
    {
      try await self.addNodes(request: request, options: .init())
    }

    public func addNodes(
      request: NodeGroupsClient.AddNodesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }

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

    public func addNodes(
      withPolling: NodeGroupsClient.AddNodesRequest, 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 addNodes(
      project: Swift.String,
      zone: Swift.String,
      nodeGroup: Swift.String,
      body: NodeGroupsAddNodesRequest?,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = NodeGroupsClient.AddNodesRequest().with {
        $0.project = project
        $0.zone = zone
        $0.nodeGroup = nodeGroup
        $0.body = body
      }
      return try await self.addNodes(withPolling: request)
    }

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

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

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

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

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

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

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

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

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

    public func deleteNodes(request: NodeGroupsClient.DeleteNodesRequest) async throws
      -> GoogleCloudComputeV1.Operation
    {
      try await self.deleteNodes(request: request, options: .init())
    }

    public func deleteNodes(
      request: NodeGroupsClient.DeleteNodesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }

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

    public func deleteNodes(
      withPolling: NodeGroupsClient.DeleteNodesRequest, 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 deleteNodes(
      project: Swift.String,
      zone: Swift.String,
      nodeGroup: Swift.String,
      body: NodeGroupsDeleteNodesRequest?,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = NodeGroupsClient.DeleteNodesRequest().with {
        $0.project = project
        $0.zone = zone
        $0.nodeGroup = nodeGroup
        $0.body = body
      }
      return try await self.deleteNodes(withPolling: request)
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    public func listNodes(request: NodeGroupsClient.ListNodesRequest) async throws
      -> GoogleCloudComputeV1.NodeGroupsListNodes
    {
      try await self.listNodes(request: request, options: .init())
    }

    public func listNodes(
      request: NodeGroupsClient.ListNodesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.NodeGroupsListNodes {
      throw GoogleCloudGax.RequestError.unimplemented
    }

    public func listNodes(
      byItem: NodeGroupsClient.ListNodesRequest
    ) throws -> any AsyncSequence<NodeGroupNode, Swift.Error> {
      try self.listNodes(byItem: byItem, options: .init())
    }

    public func listNodes(
      byItem: NodeGroupsClient.ListNodesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<NodeGroupNode, Swift.Error> {
      let listRpc = {
        (token: Swift.String) async throws -> GoogleCloudComputeV1.NodeGroupsListNodes in
        throw GoogleCloudGax.RequestError.unimplemented
      }
      return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
    }

    public func listNodes(
      project: Swift.String,
      zone: Swift.String,
      nodeGroup: Swift.String,
    ) throws -> any AsyncSequence<NodeGroupNode, Swift.Error> {
      let request = NodeGroupsClient.ListNodesRequest().with {
        $0.project = project
        $0.zone = zone
        $0.nodeGroup = nodeGroup
      }
      return try self.listNodes(byItem: request)
    }

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

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

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

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

    public func performMaintenance(request: NodeGroupsClient.PerformMaintenanceRequest) async throws
      -> GoogleCloudComputeV1.Operation
    {
      try await self.performMaintenance(request: request, options: .init())
    }

    public func performMaintenance(
      request: NodeGroupsClient.PerformMaintenanceRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }

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

    public func performMaintenance(
      withPolling: NodeGroupsClient.PerformMaintenanceRequest,
      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 performMaintenance(
      project: Swift.String,
      zone: Swift.String,
      nodeGroup: Swift.String,
      body: NodeGroupsPerformMaintenanceRequest?,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = NodeGroupsClient.PerformMaintenanceRequest().with {
        $0.project = project
        $0.zone = zone
        $0.nodeGroup = nodeGroup
        $0.body = body
      }
      return try await self.performMaintenance(withPolling: request)
    }

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

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

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

    public func setNodeTemplate(request: NodeGroupsClient.SetNodeTemplateRequest) async throws
      -> GoogleCloudComputeV1.Operation
    {
      try await self.setNodeTemplate(request: request, options: .init())
    }

    public func setNodeTemplate(
      request: NodeGroupsClient.SetNodeTemplateRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }

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

    public func setNodeTemplate(
      withPolling: NodeGroupsClient.SetNodeTemplateRequest, 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 setNodeTemplate(
      project: Swift.String,
      zone: Swift.String,
      nodeGroup: Swift.String,
      body: NodeGroupsSetNodeTemplateRequest?,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = NodeGroupsClient.SetNodeTemplateRequest().with {
        $0.project = project
        $0.zone = zone
        $0.nodeGroup = nodeGroup
        $0.body = body
      }
      return try await self.setNodeTemplate(withPolling: request)
    }

    public func simulateMaintenanceEvent(request: NodeGroupsClient.SimulateMaintenanceEventRequest)
      async throws -> GoogleCloudComputeV1.Operation
    {
      try await self.simulateMaintenanceEvent(request: request, options: .init())
    }

    public func simulateMaintenanceEvent(
      request: NodeGroupsClient.SimulateMaintenanceEventRequest,
      options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudComputeV1.Operation {
      throw GoogleCloudGax.RequestError.unimplemented
    }

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

    public func simulateMaintenanceEvent(
      withPolling: NodeGroupsClient.SimulateMaintenanceEventRequest,
      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 simulateMaintenanceEvent(
      project: Swift.String,
      zone: Swift.String,
      nodeGroup: Swift.String,
      body: NodeGroupsSimulateMaintenanceEventRequest?,
    ) async throws -> any GoogleCloudGax.PollableOperation<GoogleCloudComputeV1.Operation> {
      let request = NodeGroupsClient.SimulateMaintenanceEventRequest().with {
        $0.project = project
        $0.zone = zone
        $0.nodeGroup = nodeGroup
        $0.body = body
      }
      return try await self.simulateMaintenanceEvent(withPolling: request)
    }

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

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

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

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

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