// Code generated by sidekick. DO NOT EDIT.
//
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

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

/// Service to determine the likelihood an event is legitimate.
///
/// @Snippet(path: "RecaptchaEnterpriseServiceQuickstart")
public class RecaptchaEnterpriseServiceClient: Clients.RecaptchaEnterpriseServiceProtocol {
  let inner: any Clients.RecaptchaEnterpriseServiceStub

  /// Creates a new `RecaptchaEnterpriseServiceClient` instance.
  public init(_ options: GoogleCloudGax.ClientOptions = .init()) throws {
    var inner: any Clients.RecaptchaEnterpriseServiceStub =
      try Clients.RecaptchaEnterpriseServiceTransport(options)
    inner = Clients.RecaptchaEnterpriseServiceRetry(inner, options: options)
    if let logger = options.logger {
      inner = Clients.RecaptchaEnterpriseServiceLogging(inner, logger: logger)
    }
    self.inner = inner
  }

  /// Creates an Assessment of the likelihood an event is legitimate.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_CreateAssessment")
  public func createAssessment(
    request: CreateAssessmentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Assessment {
    try await self.inner.createAssessment(request: request, options: options)
  }

  /// Annotates a previously created Assessment to provide additional information
  /// on whether the event turned out to be authentic or fraudulent.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_AnnotateAssessment")
  public func annotateAssessment(
    request: AnnotateAssessmentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.AnnotateAssessmentResponse {
    try await self.inner.annotateAssessment(request: request, options: options)
  }

  /// Creates a new reCAPTCHA Enterprise key.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_CreateKey")
  public func createKey(
    request: CreateKeyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key {
    try await self.inner.createKey(request: request, options: options)
  }

  /// Returns the list of all keys that belong to a project.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_ListKeys")
  public func listKeys(
    request: ListKeysRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListKeysResponse {
    try await self.inner.listKeys(request: request, options: options)
  }

  /// Returns the list of all keys that belong to a project.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_ListKeys")
  public func listKeys(
    byItem: ListKeysRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Key, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListKeysResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listKeys(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Returns the secret key related to the specified public key.
  /// You must use the legacy secret key only in a 3rd party integration with
  /// legacy reCAPTCHA.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_RetrieveLegacySecretKey")
  public func retrieveLegacySecretKey(
    request: RetrieveLegacySecretKeyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.RetrieveLegacySecretKeyResponse {
    try await self.inner.retrieveLegacySecretKey(request: request, options: options)
  }

  /// Returns the specified key.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_GetKey")
  public func getKey(
    request: GetKeyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key {
    try await self.inner.getKey(request: request, options: options)
  }

  /// Updates the specified key.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_UpdateKey")
  public func updateKey(
    request: UpdateKeyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key {
    try await self.inner.updateKey(request: request, options: options)
  }

  /// Deletes the specified key.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_DeleteKey")
  public func deleteKey(
    request: DeleteKeyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.deleteKey(request: request, options: options)
  }

  /// Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise.
  /// Once a key is migrated, it can be used from either product. SiteVerify
  /// requests are billed as CreateAssessment calls. You must be
  /// authenticated as one of the current owners of the reCAPTCHA Key, and
  /// your user must have the reCAPTCHA Enterprise Admin IAM role in the
  /// destination project.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_MigrateKey")
  public func migrateKey(
    request: MigrateKeyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key {
    try await self.inner.migrateKey(request: request, options: options)
  }

  /// Adds an IP override to a key. The following restrictions hold:
  /// * The maximum number of IP overrides per key is 1000.
  /// * For any conflict (such as IP already exists or IP part of an existing
  ///   IP range), an error is returned.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_AddIpOverride")
  public func addIpOverride(
    request: AddIpOverrideRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.AddIpOverrideResponse {
    try await self.inner.addIpOverride(request: request, options: options)
  }

  /// Removes an IP override from a key. The following restrictions hold:
  /// * If the IP isn't found in an existing IP override, a `NOT_FOUND` error
  /// is returned.
  /// * If the IP is found in an existing IP override, but the
  /// override type does not match, a `NOT_FOUND` error is returned.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_RemoveIpOverride")
  public func removeIpOverride(
    request: RemoveIpOverrideRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.RemoveIpOverrideResponse {
    try await self.inner.removeIpOverride(request: request, options: options)
  }

  /// Lists all IP overrides for a key.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_ListIpOverrides")
  public func listIpOverrides(
    request: ListIpOverridesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListIpOverridesResponse {
    try await self.inner.listIpOverrides(request: request, options: options)
  }

  /// Lists all IP overrides for a key.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_ListIpOverrides")
  public func listIpOverrides(
    byItem: ListIpOverridesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<IpOverrideData, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListIpOverridesResponse
      in
      var request = byItem
      request.pageToken = token
      return try await self.listIpOverrides(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Get some aggregated metrics for a Key. This data can be used to build
  /// dashboards.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_GetMetrics")
  public func getMetrics(
    request: GetMetricsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Metrics {
    try await self.inner.getMetrics(request: request, options: options)
  }

  /// Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA
  /// Enterprise actions can be executed.
  /// A project may have a maximum of 1000 policies.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_CreateFirewallPolicy")
  public func createFirewallPolicy(
    request: CreateFirewallPolicyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy {
    try await self.inner.createFirewallPolicy(request: request, options: options)
  }

  /// Returns the list of all firewall policies that belong to a project.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_ListFirewallPolicies")
  public func listFirewallPolicies(
    request: ListFirewallPoliciesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListFirewallPoliciesResponse {
    try await self.inner.listFirewallPolicies(request: request, options: options)
  }

  /// Returns the list of all firewall policies that belong to a project.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_ListFirewallPolicies")
  public func listFirewallPolicies(
    byItem: ListFirewallPoliciesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<FirewallPolicy, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudRecaptchaEnterpriseV1.ListFirewallPoliciesResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listFirewallPolicies(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Returns the specified firewall policy.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_GetFirewallPolicy")
  public func getFirewallPolicy(
    request: GetFirewallPolicyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy {
    try await self.inner.getFirewallPolicy(request: request, options: options)
  }

  /// Updates the specified firewall policy.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_UpdateFirewallPolicy")
  public func updateFirewallPolicy(
    request: UpdateFirewallPolicyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy {
    try await self.inner.updateFirewallPolicy(request: request, options: options)
  }

  /// Deletes the specified firewall policy.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_DeleteFirewallPolicy")
  public func deleteFirewallPolicy(
    request: DeleteFirewallPolicyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws {
    try await self.inner.deleteFirewallPolicy(request: request, options: options)
  }

  /// Reorders all firewall policies.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_ReorderFirewallPolicies")
  public func reorderFirewallPolicies(
    request: ReorderFirewallPoliciesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ReorderFirewallPoliciesResponse {
    try await self.inner.reorderFirewallPolicies(request: request, options: options)
  }

  /// List groups of related accounts.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_ListRelatedAccountGroups")
  public func listRelatedAccountGroups(
    request: ListRelatedAccountGroupsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListRelatedAccountGroupsResponse {
    try await self.inner.listRelatedAccountGroups(request: request, options: options)
  }

  /// List groups of related accounts.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_ListRelatedAccountGroups")
  public func listRelatedAccountGroups(
    byItem: ListRelatedAccountGroupsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<RelatedAccountGroup, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudRecaptchaEnterpriseV1.ListRelatedAccountGroupsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listRelatedAccountGroups(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Get memberships in a group of related accounts.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships")
  public func listRelatedAccountGroupMemberships(
    request: ListRelatedAccountGroupMembershipsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListRelatedAccountGroupMembershipsResponse {
    try await self.inner.listRelatedAccountGroupMemberships(request: request, options: options)
  }

  /// Get memberships in a group of related accounts.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships")
  public func listRelatedAccountGroupMemberships(
    byItem: ListRelatedAccountGroupMembershipsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<RelatedAccountGroupMembership, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudRecaptchaEnterpriseV1.ListRelatedAccountGroupMembershipsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.listRelatedAccountGroupMemberships(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  /// Search group memberships related to a given account.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships")
  public func searchRelatedAccountGroupMemberships(
    request: SearchRelatedAccountGroupMembershipsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.SearchRelatedAccountGroupMembershipsResponse {
    try await self.inner.searchRelatedAccountGroupMemberships(request: request, options: options)
  }

  /// Search group memberships related to a given account.
  ///
  /// @Snippet(path: "RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships")
  public func searchRelatedAccountGroupMemberships(
    byItem: SearchRelatedAccountGroupMembershipsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<RelatedAccountGroupMembership, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudRecaptchaEnterpriseV1.SearchRelatedAccountGroupMembershipsResponse in
      var request = byItem
      request.pageToken = token
      return try await self.searchRelatedAccountGroupMemberships(request: request, options: options)
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }
}

extension Clients {
  /// A Swift protocol to mock `RecaptchaEnterpriseServiceClient`.
  ///
  /// To mock `RecaptchaEnterpriseServiceClient` change your functions to receive
  /// `some RecaptchaEnterpriseServiceProtocol` or `any RecaptchaEnterpriseServiceProtocol`
  /// and pass a mock implementation in your tests.
  public protocol RecaptchaEnterpriseServiceProtocol {
    /// See `RecaptchaEnterpriseServiceClient.createAssessment`.
    func createAssessment(request: CreateAssessmentRequest) async throws
      -> GoogleCloudRecaptchaEnterpriseV1.Assessment

    /// See `RecaptchaEnterpriseServiceClient.createAssessment`.
    func createAssessment(
      parent: Swift.String,
      assessment: Assessment?,
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Assessment

    /// See `RecaptchaEnterpriseServiceClient.annotateAssessment`.
    func annotateAssessment(request: AnnotateAssessmentRequest) async throws
      -> GoogleCloudRecaptchaEnterpriseV1.AnnotateAssessmentResponse

    /// See `RecaptchaEnterpriseServiceClient.annotateAssessment`.
    func annotateAssessment(
      name: Swift.String,
      annotation: AnnotateAssessmentRequest.Annotation,
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.AnnotateAssessmentResponse

    /// See `RecaptchaEnterpriseServiceClient.createKey`.
    func createKey(request: CreateKeyRequest) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key

    /// See `RecaptchaEnterpriseServiceClient.createKey`.
    func createKey(
      parent: Swift.String,
      key: Key?,
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key

    /// See `RecaptchaEnterpriseServiceClient.listKeys`.
    func listKeys(request: ListKeysRequest) async throws
      -> GoogleCloudRecaptchaEnterpriseV1.ListKeysResponse

    /// See `RecaptchaEnterpriseServiceClient.listKeys`.
    func listKeys(
      byItem: ListKeysRequest
    ) throws -> any AsyncSequence<Key, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.listKeys`.
    func listKeys(
      parent: Swift.String,
    ) throws -> any AsyncSequence<Key, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.retrieveLegacySecretKey`.
    func retrieveLegacySecretKey(request: RetrieveLegacySecretKeyRequest) async throws
      -> GoogleCloudRecaptchaEnterpriseV1.RetrieveLegacySecretKeyResponse

    /// See `RecaptchaEnterpriseServiceClient.retrieveLegacySecretKey`.
    func retrieveLegacySecretKey(
      key: Swift.String,
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.RetrieveLegacySecretKeyResponse

    /// See `RecaptchaEnterpriseServiceClient.getKey`.
    func getKey(request: GetKeyRequest) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key

    /// See `RecaptchaEnterpriseServiceClient.getKey`.
    func getKey(
      name: Swift.String,
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key

    /// See `RecaptchaEnterpriseServiceClient.updateKey`.
    func updateKey(request: UpdateKeyRequest) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key

    /// See `RecaptchaEnterpriseServiceClient.updateKey`.
    func updateKey(
      key: Key?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key

    /// See `RecaptchaEnterpriseServiceClient.deleteKey`.
    func deleteKey(request: DeleteKeyRequest) async throws

    /// See `RecaptchaEnterpriseServiceClient.deleteKey`.
    func deleteKey(
      name: Swift.String,
    ) async throws

    /// See `RecaptchaEnterpriseServiceClient.migrateKey`.
    func migrateKey(request: MigrateKeyRequest) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key

    /// See `RecaptchaEnterpriseServiceClient.addIpOverride`.
    func addIpOverride(request: AddIpOverrideRequest) async throws
      -> GoogleCloudRecaptchaEnterpriseV1.AddIpOverrideResponse

    /// See `RecaptchaEnterpriseServiceClient.addIpOverride`.
    func addIpOverride(
      name: Swift.String,
      ipOverrideData: IpOverrideData?,
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.AddIpOverrideResponse

    /// See `RecaptchaEnterpriseServiceClient.removeIpOverride`.
    func removeIpOverride(request: RemoveIpOverrideRequest) async throws
      -> GoogleCloudRecaptchaEnterpriseV1.RemoveIpOverrideResponse

    /// See `RecaptchaEnterpriseServiceClient.removeIpOverride`.
    func removeIpOverride(
      name: Swift.String,
      ipOverrideData: IpOverrideData?,
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.RemoveIpOverrideResponse

    /// See `RecaptchaEnterpriseServiceClient.listIpOverrides`.
    func listIpOverrides(request: ListIpOverridesRequest) async throws
      -> GoogleCloudRecaptchaEnterpriseV1.ListIpOverridesResponse

    /// See `RecaptchaEnterpriseServiceClient.listIpOverrides`.
    func listIpOverrides(
      byItem: ListIpOverridesRequest
    ) throws -> any AsyncSequence<IpOverrideData, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.listIpOverrides`.
    func listIpOverrides(
      parent: Swift.String,
    ) throws -> any AsyncSequence<IpOverrideData, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.getMetrics`.
    func getMetrics(request: GetMetricsRequest) async throws
      -> GoogleCloudRecaptchaEnterpriseV1.Metrics

    /// See `RecaptchaEnterpriseServiceClient.getMetrics`.
    func getMetrics(
      name: Swift.String,
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Metrics

    /// See `RecaptchaEnterpriseServiceClient.createFirewallPolicy`.
    func createFirewallPolicy(request: CreateFirewallPolicyRequest) async throws
      -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy

    /// See `RecaptchaEnterpriseServiceClient.createFirewallPolicy`.
    func createFirewallPolicy(
      parent: Swift.String,
      firewallPolicy: FirewallPolicy?,
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy

    /// See `RecaptchaEnterpriseServiceClient.listFirewallPolicies`.
    func listFirewallPolicies(request: ListFirewallPoliciesRequest) async throws
      -> GoogleCloudRecaptchaEnterpriseV1.ListFirewallPoliciesResponse

    /// See `RecaptchaEnterpriseServiceClient.listFirewallPolicies`.
    func listFirewallPolicies(
      byItem: ListFirewallPoliciesRequest
    ) throws -> any AsyncSequence<FirewallPolicy, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.listFirewallPolicies`.
    func listFirewallPolicies(
      parent: Swift.String,
    ) throws -> any AsyncSequence<FirewallPolicy, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.getFirewallPolicy`.
    func getFirewallPolicy(request: GetFirewallPolicyRequest) async throws
      -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy

    /// See `RecaptchaEnterpriseServiceClient.getFirewallPolicy`.
    func getFirewallPolicy(
      name: Swift.String,
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy

    /// See `RecaptchaEnterpriseServiceClient.updateFirewallPolicy`.
    func updateFirewallPolicy(request: UpdateFirewallPolicyRequest) async throws
      -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy

    /// See `RecaptchaEnterpriseServiceClient.updateFirewallPolicy`.
    func updateFirewallPolicy(
      firewallPolicy: FirewallPolicy?,
      updateMask: GoogleCloudWkt.FieldMask?,
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy

    /// See `RecaptchaEnterpriseServiceClient.deleteFirewallPolicy`.
    func deleteFirewallPolicy(request: DeleteFirewallPolicyRequest) async throws

    /// See `RecaptchaEnterpriseServiceClient.deleteFirewallPolicy`.
    func deleteFirewallPolicy(
      name: Swift.String,
    ) async throws

    /// See `RecaptchaEnterpriseServiceClient.reorderFirewallPolicies`.
    func reorderFirewallPolicies(request: ReorderFirewallPoliciesRequest) async throws
      -> GoogleCloudRecaptchaEnterpriseV1.ReorderFirewallPoliciesResponse

    /// See `RecaptchaEnterpriseServiceClient.reorderFirewallPolicies`.
    func reorderFirewallPolicies(
      parent: Swift.String,
      names: [Swift.String],
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ReorderFirewallPoliciesResponse

    /// See `RecaptchaEnterpriseServiceClient.listRelatedAccountGroups`.
    func listRelatedAccountGroups(request: ListRelatedAccountGroupsRequest) async throws
      -> GoogleCloudRecaptchaEnterpriseV1.ListRelatedAccountGroupsResponse

    /// See `RecaptchaEnterpriseServiceClient.listRelatedAccountGroups`.
    func listRelatedAccountGroups(
      byItem: ListRelatedAccountGroupsRequest
    ) throws -> any AsyncSequence<RelatedAccountGroup, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.listRelatedAccountGroups`.
    func listRelatedAccountGroups(
      parent: Swift.String,
    ) throws -> any AsyncSequence<RelatedAccountGroup, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.listRelatedAccountGroupMemberships`.
    func listRelatedAccountGroupMemberships(request: ListRelatedAccountGroupMembershipsRequest)
      async throws -> GoogleCloudRecaptchaEnterpriseV1.ListRelatedAccountGroupMembershipsResponse

    /// See `RecaptchaEnterpriseServiceClient.listRelatedAccountGroupMemberships`.
    func listRelatedAccountGroupMemberships(
      byItem: ListRelatedAccountGroupMembershipsRequest
    ) throws -> any AsyncSequence<RelatedAccountGroupMembership, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.listRelatedAccountGroupMemberships`.
    func listRelatedAccountGroupMemberships(
      parent: Swift.String,
    ) throws -> any AsyncSequence<RelatedAccountGroupMembership, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.searchRelatedAccountGroupMemberships`.
    func searchRelatedAccountGroupMemberships(request: SearchRelatedAccountGroupMembershipsRequest)
      async throws -> GoogleCloudRecaptchaEnterpriseV1.SearchRelatedAccountGroupMembershipsResponse

    /// See `RecaptchaEnterpriseServiceClient.searchRelatedAccountGroupMemberships`.
    func searchRelatedAccountGroupMemberships(
      byItem: SearchRelatedAccountGroupMembershipsRequest
    ) throws -> any AsyncSequence<RelatedAccountGroupMembership, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.searchRelatedAccountGroupMemberships`.
    func searchRelatedAccountGroupMemberships(
      project: Swift.String,
      hashedAccountId: Foundation.Data,
    ) throws -> any AsyncSequence<RelatedAccountGroupMembership, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.createAssessment`.
    func createAssessment(
      request: CreateAssessmentRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Assessment

    /// See `RecaptchaEnterpriseServiceClient.annotateAssessment`.
    func annotateAssessment(
      request: AnnotateAssessmentRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.AnnotateAssessmentResponse

    /// See `RecaptchaEnterpriseServiceClient.createKey`.
    func createKey(
      request: CreateKeyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key

    /// See `RecaptchaEnterpriseServiceClient.listKeys`.
    func listKeys(
      request: ListKeysRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListKeysResponse

    /// See `RecaptchaEnterpriseServiceClient.listKeys`.
    func listKeys(
      byItem: ListKeysRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<Key, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.retrieveLegacySecretKey`.
    func retrieveLegacySecretKey(
      request: RetrieveLegacySecretKeyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.RetrieveLegacySecretKeyResponse

    /// See `RecaptchaEnterpriseServiceClient.getKey`.
    func getKey(
      request: GetKeyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key

    /// See `RecaptchaEnterpriseServiceClient.updateKey`.
    func updateKey(
      request: UpdateKeyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key

    /// See `RecaptchaEnterpriseServiceClient.deleteKey`.
    func deleteKey(
      request: DeleteKeyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws

    /// See `RecaptchaEnterpriseServiceClient.migrateKey`.
    func migrateKey(
      request: MigrateKeyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key

    /// See `RecaptchaEnterpriseServiceClient.addIpOverride`.
    func addIpOverride(
      request: AddIpOverrideRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.AddIpOverrideResponse

    /// See `RecaptchaEnterpriseServiceClient.removeIpOverride`.
    func removeIpOverride(
      request: RemoveIpOverrideRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.RemoveIpOverrideResponse

    /// See `RecaptchaEnterpriseServiceClient.listIpOverrides`.
    func listIpOverrides(
      request: ListIpOverridesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListIpOverridesResponse

    /// See `RecaptchaEnterpriseServiceClient.listIpOverrides`.
    func listIpOverrides(
      byItem: ListIpOverridesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<IpOverrideData, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.getMetrics`.
    func getMetrics(
      request: GetMetricsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Metrics

    /// See `RecaptchaEnterpriseServiceClient.createFirewallPolicy`.
    func createFirewallPolicy(
      request: CreateFirewallPolicyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy

    /// See `RecaptchaEnterpriseServiceClient.listFirewallPolicies`.
    func listFirewallPolicies(
      request: ListFirewallPoliciesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListFirewallPoliciesResponse

    /// See `RecaptchaEnterpriseServiceClient.listFirewallPolicies`.
    func listFirewallPolicies(
      byItem: ListFirewallPoliciesRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<FirewallPolicy, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.getFirewallPolicy`.
    func getFirewallPolicy(
      request: GetFirewallPolicyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy

    /// See `RecaptchaEnterpriseServiceClient.updateFirewallPolicy`.
    func updateFirewallPolicy(
      request: UpdateFirewallPolicyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy

    /// See `RecaptchaEnterpriseServiceClient.deleteFirewallPolicy`.
    func deleteFirewallPolicy(
      request: DeleteFirewallPolicyRequest, options: GoogleCloudGax.RequestOptions
    ) async throws

    /// See `RecaptchaEnterpriseServiceClient.reorderFirewallPolicies`.
    func reorderFirewallPolicies(
      request: ReorderFirewallPoliciesRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ReorderFirewallPoliciesResponse

    /// See `RecaptchaEnterpriseServiceClient.listRelatedAccountGroups`.
    func listRelatedAccountGroups(
      request: ListRelatedAccountGroupsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListRelatedAccountGroupsResponse

    /// See `RecaptchaEnterpriseServiceClient.listRelatedAccountGroups`.
    func listRelatedAccountGroups(
      byItem: ListRelatedAccountGroupsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<RelatedAccountGroup, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.listRelatedAccountGroupMemberships`.
    func listRelatedAccountGroupMemberships(
      request: ListRelatedAccountGroupMembershipsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListRelatedAccountGroupMembershipsResponse

    /// See `RecaptchaEnterpriseServiceClient.listRelatedAccountGroupMemberships`.
    func listRelatedAccountGroupMemberships(
      byItem: ListRelatedAccountGroupMembershipsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<RelatedAccountGroupMembership, Swift.Error>

    /// See `RecaptchaEnterpriseServiceClient.searchRelatedAccountGroupMemberships`.
    func searchRelatedAccountGroupMemberships(
      request: SearchRelatedAccountGroupMembershipsRequest, options: GoogleCloudGax.RequestOptions
    ) async throws -> GoogleCloudRecaptchaEnterpriseV1.SearchRelatedAccountGroupMembershipsResponse

    /// See `RecaptchaEnterpriseServiceClient.searchRelatedAccountGroupMemberships`.
    func searchRelatedAccountGroupMemberships(
      byItem: SearchRelatedAccountGroupMembershipsRequest, options: GoogleCloudGax.RequestOptions
    ) throws -> any AsyncSequence<RelatedAccountGroupMembership, Swift.Error>
  }
}

// Default implementations
extension Clients.RecaptchaEnterpriseServiceProtocol {
  public func createAssessment(request: CreateAssessmentRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.Assessment
  {
    try await self.createAssessment(request: request, options: .init())
  }

  public func createAssessment(
    request: CreateAssessmentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Assessment {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func createAssessment(
    parent: Swift.String,
    assessment: Assessment?,
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Assessment {
    let request = CreateAssessmentRequest().with {
      $0.parent = parent
      $0.assessment = assessment
    }
    return try await self.createAssessment(request: request)
  }

  public func annotateAssessment(request: AnnotateAssessmentRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.AnnotateAssessmentResponse
  {
    try await self.annotateAssessment(request: request, options: .init())
  }

  public func annotateAssessment(
    request: AnnotateAssessmentRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.AnnotateAssessmentResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func annotateAssessment(
    name: Swift.String,
    annotation: AnnotateAssessmentRequest.Annotation,
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.AnnotateAssessmentResponse {
    let request = AnnotateAssessmentRequest().with {
      $0.name = name
      $0.annotation = annotation
    }
    return try await self.annotateAssessment(request: request)
  }

  public func createKey(request: CreateKeyRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.Key
  {
    try await self.createKey(request: request, options: .init())
  }

  public func createKey(
    request: CreateKeyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func createKey(
    parent: Swift.String,
    key: Key?,
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key {
    let request = CreateKeyRequest().with {
      $0.parent = parent
      $0.key = key
    }
    return try await self.createKey(request: request)
  }

  public func listKeys(request: ListKeysRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.ListKeysResponse
  {
    try await self.listKeys(request: request, options: .init())
  }

  public func listKeys(
    request: ListKeysRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListKeysResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listKeys(
    byItem: ListKeysRequest
  ) throws -> any AsyncSequence<Key, Swift.Error> {
    try self.listKeys(byItem: byItem, options: .init())
  }

  public func listKeys(
    byItem: ListKeysRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<Key, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListKeysResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func retrieveLegacySecretKey(request: RetrieveLegacySecretKeyRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.RetrieveLegacySecretKeyResponse
  {
    try await self.retrieveLegacySecretKey(request: request, options: .init())
  }

  public func retrieveLegacySecretKey(
    request: RetrieveLegacySecretKeyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.RetrieveLegacySecretKeyResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func retrieveLegacySecretKey(
    key: Swift.String,
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.RetrieveLegacySecretKeyResponse {
    let request = RetrieveLegacySecretKeyRequest().with {
      $0.key = key
    }
    return try await self.retrieveLegacySecretKey(request: request)
  }

  public func getKey(request: GetKeyRequest) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key {
    try await self.getKey(request: request, options: .init())
  }

  public func getKey(
    request: GetKeyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getKey(
    name: Swift.String,
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key {
    let request = GetKeyRequest().with {
      $0.name = name
    }
    return try await self.getKey(request: request)
  }

  public func updateKey(request: UpdateKeyRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.Key
  {
    try await self.updateKey(request: request, options: .init())
  }

  public func updateKey(
    request: UpdateKeyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func updateKey(
    key: Key?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key {
    let request = UpdateKeyRequest().with {
      $0.key = key
      $0.updateMask = updateMask
    }
    return try await self.updateKey(request: request)
  }

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

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

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

  public func migrateKey(request: MigrateKeyRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.Key
  {
    try await self.migrateKey(request: request, options: .init())
  }

  public func migrateKey(
    request: MigrateKeyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Key {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func addIpOverride(request: AddIpOverrideRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.AddIpOverrideResponse
  {
    try await self.addIpOverride(request: request, options: .init())
  }

  public func addIpOverride(
    request: AddIpOverrideRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.AddIpOverrideResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func addIpOverride(
    name: Swift.String,
    ipOverrideData: IpOverrideData?,
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.AddIpOverrideResponse {
    let request = AddIpOverrideRequest().with {
      $0.name = name
      $0.ipOverrideData = ipOverrideData
    }
    return try await self.addIpOverride(request: request)
  }

  public func removeIpOverride(request: RemoveIpOverrideRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.RemoveIpOverrideResponse
  {
    try await self.removeIpOverride(request: request, options: .init())
  }

  public func removeIpOverride(
    request: RemoveIpOverrideRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.RemoveIpOverrideResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func removeIpOverride(
    name: Swift.String,
    ipOverrideData: IpOverrideData?,
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.RemoveIpOverrideResponse {
    let request = RemoveIpOverrideRequest().with {
      $0.name = name
      $0.ipOverrideData = ipOverrideData
    }
    return try await self.removeIpOverride(request: request)
  }

  public func listIpOverrides(request: ListIpOverridesRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.ListIpOverridesResponse
  {
    try await self.listIpOverrides(request: request, options: .init())
  }

  public func listIpOverrides(
    request: ListIpOverridesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListIpOverridesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listIpOverrides(
    byItem: ListIpOverridesRequest
  ) throws -> any AsyncSequence<IpOverrideData, Swift.Error> {
    try self.listIpOverrides(byItem: byItem, options: .init())
  }

  public func listIpOverrides(
    byItem: ListIpOverridesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<IpOverrideData, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListIpOverridesResponse
      in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func getMetrics(request: GetMetricsRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.Metrics
  {
    try await self.getMetrics(request: request, options: .init())
  }

  public func getMetrics(
    request: GetMetricsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Metrics {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getMetrics(
    name: Swift.String,
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.Metrics {
    let request = GetMetricsRequest().with {
      $0.name = name
    }
    return try await self.getMetrics(request: request)
  }

  public func createFirewallPolicy(request: CreateFirewallPolicyRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy
  {
    try await self.createFirewallPolicy(request: request, options: .init())
  }

  public func createFirewallPolicy(
    request: CreateFirewallPolicyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func createFirewallPolicy(
    parent: Swift.String,
    firewallPolicy: FirewallPolicy?,
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy {
    let request = CreateFirewallPolicyRequest().with {
      $0.parent = parent
      $0.firewallPolicy = firewallPolicy
    }
    return try await self.createFirewallPolicy(request: request)
  }

  public func listFirewallPolicies(request: ListFirewallPoliciesRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.ListFirewallPoliciesResponse
  {
    try await self.listFirewallPolicies(request: request, options: .init())
  }

  public func listFirewallPolicies(
    request: ListFirewallPoliciesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListFirewallPoliciesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listFirewallPolicies(
    byItem: ListFirewallPoliciesRequest
  ) throws -> any AsyncSequence<FirewallPolicy, Swift.Error> {
    try self.listFirewallPolicies(byItem: byItem, options: .init())
  }

  public func listFirewallPolicies(
    byItem: ListFirewallPoliciesRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<FirewallPolicy, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudRecaptchaEnterpriseV1.ListFirewallPoliciesResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func getFirewallPolicy(request: GetFirewallPolicyRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy
  {
    try await self.getFirewallPolicy(request: request, options: .init())
  }

  public func getFirewallPolicy(
    request: GetFirewallPolicyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func getFirewallPolicy(
    name: Swift.String,
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy {
    let request = GetFirewallPolicyRequest().with {
      $0.name = name
    }
    return try await self.getFirewallPolicy(request: request)
  }

  public func updateFirewallPolicy(request: UpdateFirewallPolicyRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy
  {
    try await self.updateFirewallPolicy(request: request, options: .init())
  }

  public func updateFirewallPolicy(
    request: UpdateFirewallPolicyRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func updateFirewallPolicy(
    firewallPolicy: FirewallPolicy?,
    updateMask: GoogleCloudWkt.FieldMask?,
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.FirewallPolicy {
    let request = UpdateFirewallPolicyRequest().with {
      $0.firewallPolicy = firewallPolicy
      $0.updateMask = updateMask
    }
    return try await self.updateFirewallPolicy(request: request)
  }

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

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

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

  public func reorderFirewallPolicies(request: ReorderFirewallPoliciesRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.ReorderFirewallPoliciesResponse
  {
    try await self.reorderFirewallPolicies(request: request, options: .init())
  }

  public func reorderFirewallPolicies(
    request: ReorderFirewallPoliciesRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ReorderFirewallPoliciesResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func reorderFirewallPolicies(
    parent: Swift.String,
    names: [Swift.String],
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ReorderFirewallPoliciesResponse {
    let request = ReorderFirewallPoliciesRequest().with {
      $0.parent = parent
      $0.names = names
    }
    return try await self.reorderFirewallPolicies(request: request)
  }

  public func listRelatedAccountGroups(request: ListRelatedAccountGroupsRequest) async throws
    -> GoogleCloudRecaptchaEnterpriseV1.ListRelatedAccountGroupsResponse
  {
    try await self.listRelatedAccountGroups(request: request, options: .init())
  }

  public func listRelatedAccountGroups(
    request: ListRelatedAccountGroupsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListRelatedAccountGroupsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listRelatedAccountGroups(
    byItem: ListRelatedAccountGroupsRequest
  ) throws -> any AsyncSequence<RelatedAccountGroup, Swift.Error> {
    try self.listRelatedAccountGroups(byItem: byItem, options: .init())
  }

  public func listRelatedAccountGroups(
    byItem: ListRelatedAccountGroupsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<RelatedAccountGroup, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudRecaptchaEnterpriseV1.ListRelatedAccountGroupsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func listRelatedAccountGroupMemberships(request: ListRelatedAccountGroupMembershipsRequest)
    async throws -> GoogleCloudRecaptchaEnterpriseV1.ListRelatedAccountGroupMembershipsResponse
  {
    try await self.listRelatedAccountGroupMemberships(request: request, options: .init())
  }

  public func listRelatedAccountGroupMemberships(
    request: ListRelatedAccountGroupMembershipsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.ListRelatedAccountGroupMembershipsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func listRelatedAccountGroupMemberships(
    byItem: ListRelatedAccountGroupMembershipsRequest
  ) throws -> any AsyncSequence<RelatedAccountGroupMembership, Swift.Error> {
    try self.listRelatedAccountGroupMemberships(byItem: byItem, options: .init())
  }

  public func listRelatedAccountGroupMemberships(
    byItem: ListRelatedAccountGroupMembershipsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<RelatedAccountGroupMembership, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudRecaptchaEnterpriseV1.ListRelatedAccountGroupMembershipsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

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

  public func searchRelatedAccountGroupMemberships(
    request: SearchRelatedAccountGroupMembershipsRequest
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.SearchRelatedAccountGroupMembershipsResponse {
    try await self.searchRelatedAccountGroupMemberships(request: request, options: .init())
  }

  public func searchRelatedAccountGroupMemberships(
    request: SearchRelatedAccountGroupMembershipsRequest, options: GoogleCloudGax.RequestOptions
  ) async throws -> GoogleCloudRecaptchaEnterpriseV1.SearchRelatedAccountGroupMembershipsResponse {
    throw GoogleCloudGax.RequestError.unimplemented
  }

  public func searchRelatedAccountGroupMemberships(
    byItem: SearchRelatedAccountGroupMembershipsRequest
  ) throws -> any AsyncSequence<RelatedAccountGroupMembership, Swift.Error> {
    try self.searchRelatedAccountGroupMemberships(byItem: byItem, options: .init())
  }

  public func searchRelatedAccountGroupMemberships(
    byItem: SearchRelatedAccountGroupMembershipsRequest, options: GoogleCloudGax.RequestOptions
  ) throws -> any AsyncSequence<RelatedAccountGroupMembership, Swift.Error> {
    let listRpc = {
      (token: Swift.String) async throws
        -> GoogleCloudRecaptchaEnterpriseV1.SearchRelatedAccountGroupMembershipsResponse in
      throw GoogleCloudGax.RequestError.unimplemented
    }
    return GoogleCloudGax.PaginatedResponseSequence(listRpc: listRpc)
  }

  public func searchRelatedAccountGroupMemberships(
    project: Swift.String,
    hashedAccountId: Foundation.Data,
  ) throws -> any AsyncSequence<RelatedAccountGroupMembership, Swift.Error> {
    let request = SearchRelatedAccountGroupMembershipsRequest().with {
      $0.project = project
      $0.hashedAccountId = hashedAccountId
    }
    return try self.searchRelatedAccountGroupMemberships(byItem: request)
  }
}
