/*
 * 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
 *
 * http://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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.recaptchaenterprise.v1;

/**
 * Service definition for RecaptchaEnterprise (v1).
 *
 * <p>
 * 
 * </p>
 *
 * <p>
 * For more information about this service, see the
 * <a href="https://cloud.google.com/recaptcha-enterprise/" target="_blank">API Documentation</a>
 * </p>
 *
 * <p>
 * This service uses {@link RecaptchaEnterpriseRequestInitializer} to initialize global parameters via its
 * {@link Builder}.
 * </p>
 *
 * @since 1.3
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public class RecaptchaEnterprise extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient {

  // Note: Leave this static initializer at the top of the file.
  static {
    com.google.api.client.util.Preconditions.checkState(
        com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 &&
        (com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 32 ||
        (com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION == 31 &&
        com.google.api.client.googleapis.GoogleUtils.BUGFIX_VERSION >= 1)),
        "You are currently running with version %s of google-api-client. " +
        "You need at least version 1.31.1 of google-api-client to run version " +
        "1.32.1 of the reCAPTCHA Enterprise API library.", com.google.api.client.googleapis.GoogleUtils.VERSION);
  }

  /**
   * The default encoded root URL of the service. This is determined when the library is generated
   * and normally should not be changed.
   *
   * @since 1.7
   */
  public static final String DEFAULT_ROOT_URL = "https://recaptchaenterprise.googleapis.com/";

  /**
   * The default encoded mTLS root URL of the service. This is determined when the library is generated
   * and normally should not be changed.
   *
   * @since 1.31
   */
  public static final String DEFAULT_MTLS_ROOT_URL = "https://recaptchaenterprise.mtls.googleapis.com/";

  /**
   * The default encoded service path of the service. This is determined when the library is
   * generated and normally should not be changed.
   *
   * @since 1.7
   */
  public static final String DEFAULT_SERVICE_PATH = "";

  /**
   * The default encoded batch path of the service. This is determined when the library is
   * generated and normally should not be changed.
   *
   * @since 1.23
   */
  public static final String DEFAULT_BATCH_PATH = "batch";

  /**
   * The default encoded base URL of the service. This is determined when the library is generated
   * and normally should not be changed.
   */
  public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH;

  /**
   * Constructor.
   *
   * <p>
   * Use {@link Builder} if you need to specify any of the optional parameters.
   * </p>
   *
   * @param transport HTTP transport, which should normally be:
   *        <ul>
   *        <li>Google App Engine:
   *        {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
   *        <li>Android: {@code newCompatibleTransport} from
   *        {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
   *        <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
   *        </li>
   *        </ul>
   * @param jsonFactory JSON factory, which may be:
   *        <ul>
   *        <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
   *        <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
   *        <li>Android Honeycomb or higher:
   *        {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
   *        </ul>
   * @param httpRequestInitializer HTTP request initializer or {@code null} for none
   * @since 1.7
   */
  public RecaptchaEnterprise(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
      com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
    this(new Builder(transport, jsonFactory, httpRequestInitializer));
  }

  /**
   * @param builder builder
   */
  RecaptchaEnterprise(Builder builder) {
    super(builder);
  }

  @Override
  protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest<?> httpClientRequest) throws java.io.IOException {
    super.initialize(httpClientRequest);
  }

  /**
   * An accessor for creating requests from the Projects collection.
   *
   * <p>The typical use is:</p>
   * <pre>
   *   {@code RecaptchaEnterprise recaptchaenterprise = new RecaptchaEnterprise(...);}
   *   {@code RecaptchaEnterprise.Projects.List request = recaptchaenterprise.projects().list(parameters ...)}
   * </pre>
   *
   * @return the resource collection
   */
  public Projects projects() {
    return new Projects();
  }

  /**
   * The "projects" collection of methods.
   */
  public class Projects {

    /**
     * An accessor for creating requests from the Assessments collection.
     *
     * <p>The typical use is:</p>
     * <pre>
     *   {@code RecaptchaEnterprise recaptchaenterprise = new RecaptchaEnterprise(...);}
     *   {@code RecaptchaEnterprise.Assessments.List request = recaptchaenterprise.assessments().list(parameters ...)}
     * </pre>
     *
     * @return the resource collection
     */
    public Assessments assessments() {
      return new Assessments();
    }

    /**
     * The "assessments" collection of methods.
     */
    public class Assessments {

      /**
       * Annotates a previously created Assessment to provide additional information on whether the event
       * turned out to be authentic or fraudulent.
       *
       * Create a request for the method "assessments.annotate".
       *
       * This request holds the parameters needed by the recaptchaenterprise server.  After setting any
       * optional parameters, call the {@link Annotate#execute()} method to invoke the remote operation.
       *
       * @param name Required. The resource name of the Assessment, in the format
       *        "projects/{project}/assessments/{assessment}".
       * @param content the {@link com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest}
       * @return the request
       */
      public Annotate annotate(java.lang.String name, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest content) throws java.io.IOException {
        Annotate result = new Annotate(name, content);
        initialize(result);
        return result;
      }

      public class Annotate extends RecaptchaEnterpriseRequest<com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse> {

        private static final String REST_PATH = "v1/{+name}:annotate";

        private final java.util.regex.Pattern NAME_PATTERN =
            java.util.regex.Pattern.compile("^projects/[^/]+/assessments/[^/]+$");

        /**
         * Annotates a previously created Assessment to provide additional information on whether the
         * event turned out to be authentic or fraudulent.
         *
         * Create a request for the method "assessments.annotate".
         *
         * This request holds the parameters needed by the the recaptchaenterprise server.  After setting
         * any optional parameters, call the {@link Annotate#execute()} method to invoke the remote
         * operation. <p> {@link
         * Annotate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
         * must be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param name Required. The resource name of the Assessment, in the format
       *        "projects/{project}/assessments/{assessment}".
         * @param content the {@link com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest}
         * @since 1.13
         */
        protected Annotate(java.lang.String name, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest content) {
          super(RecaptchaEnterprise.this, "POST", REST_PATH, content, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse.class);
          this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                "Parameter name must conform to the pattern " +
                "^projects/[^/]+/assessments/[^/]+$");
          }
        }

        @Override
        public Annotate set$Xgafv(java.lang.String $Xgafv) {
          return (Annotate) super.set$Xgafv($Xgafv);
        }

        @Override
        public Annotate setAccessToken(java.lang.String accessToken) {
          return (Annotate) super.setAccessToken(accessToken);
        }

        @Override
        public Annotate setAlt(java.lang.String alt) {
          return (Annotate) super.setAlt(alt);
        }

        @Override
        public Annotate setCallback(java.lang.String callback) {
          return (Annotate) super.setCallback(callback);
        }

        @Override
        public Annotate setFields(java.lang.String fields) {
          return (Annotate) super.setFields(fields);
        }

        @Override
        public Annotate setKey(java.lang.String key) {
          return (Annotate) super.setKey(key);
        }

        @Override
        public Annotate setOauthToken(java.lang.String oauthToken) {
          return (Annotate) super.setOauthToken(oauthToken);
        }

        @Override
        public Annotate setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (Annotate) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public Annotate setQuotaUser(java.lang.String quotaUser) {
          return (Annotate) super.setQuotaUser(quotaUser);
        }

        @Override
        public Annotate setUploadType(java.lang.String uploadType) {
          return (Annotate) super.setUploadType(uploadType);
        }

        @Override
        public Annotate setUploadProtocol(java.lang.String uploadProtocol) {
          return (Annotate) super.setUploadProtocol(uploadProtocol);
        }

        /**
         * Required. The resource name of the Assessment, in the format
         * "projects/{project}/assessments/{assessment}".
         */
        @com.google.api.client.util.Key
        private java.lang.String name;

        /** Required. The resource name of the Assessment, in the format
       "projects/{project}/assessments/{assessment}".
         */
        public java.lang.String getName() {
          return name;
        }

        /**
         * Required. The resource name of the Assessment, in the format
         * "projects/{project}/assessments/{assessment}".
         */
        public Annotate setName(java.lang.String name) {
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                "Parameter name must conform to the pattern " +
                "^projects/[^/]+/assessments/[^/]+$");
          }
          this.name = name;
          return this;
        }

        @Override
        public Annotate set(String parameterName, Object value) {
          return (Annotate) super.set(parameterName, value);
        }
      }
      /**
       * Creates an Assessment of the likelihood an event is legitimate.
       *
       * Create a request for the method "assessments.create".
       *
       * This request holds the parameters needed by the recaptchaenterprise server.  After setting any
       * optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
       *
       * @param parent Required. The name of the project in which the assessment will be created, in the format
       *        "projects/{project}".
       * @param content the {@link com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Assessment}
       * @return the request
       */
      public Create create(java.lang.String parent, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Assessment content) throws java.io.IOException {
        Create result = new Create(parent, content);
        initialize(result);
        return result;
      }

      public class Create extends RecaptchaEnterpriseRequest<com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Assessment> {

        private static final String REST_PATH = "v1/{+parent}/assessments";

        private final java.util.regex.Pattern PARENT_PATTERN =
            java.util.regex.Pattern.compile("^projects/[^/]+$");

        /**
         * Creates an Assessment of the likelihood an event is legitimate.
         *
         * Create a request for the method "assessments.create".
         *
         * This request holds the parameters needed by the the recaptchaenterprise server.  After setting
         * any optional parameters, call the {@link Create#execute()} method to invoke the remote
         * operation. <p> {@link
         * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
         * be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param parent Required. The name of the project in which the assessment will be created, in the format
       *        "projects/{project}".
         * @param content the {@link com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Assessment}
         * @since 1.13
         */
        protected Create(java.lang.String parent, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Assessment content) {
          super(RecaptchaEnterprise.this, "POST", REST_PATH, content, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Assessment.class);
          this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                "Parameter parent must conform to the pattern " +
                "^projects/[^/]+$");
          }
        }

        @Override
        public Create set$Xgafv(java.lang.String $Xgafv) {
          return (Create) super.set$Xgafv($Xgafv);
        }

        @Override
        public Create setAccessToken(java.lang.String accessToken) {
          return (Create) super.setAccessToken(accessToken);
        }

        @Override
        public Create setAlt(java.lang.String alt) {
          return (Create) super.setAlt(alt);
        }

        @Override
        public Create setCallback(java.lang.String callback) {
          return (Create) super.setCallback(callback);
        }

        @Override
        public Create setFields(java.lang.String fields) {
          return (Create) super.setFields(fields);
        }

        @Override
        public Create setKey(java.lang.String key) {
          return (Create) super.setKey(key);
        }

        @Override
        public Create setOauthToken(java.lang.String oauthToken) {
          return (Create) super.setOauthToken(oauthToken);
        }

        @Override
        public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (Create) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public Create setQuotaUser(java.lang.String quotaUser) {
          return (Create) super.setQuotaUser(quotaUser);
        }

        @Override
        public Create setUploadType(java.lang.String uploadType) {
          return (Create) super.setUploadType(uploadType);
        }

        @Override
        public Create setUploadProtocol(java.lang.String uploadProtocol) {
          return (Create) super.setUploadProtocol(uploadProtocol);
        }

        /**
         * Required. The name of the project in which the assessment will be created, in the format
         * "projects/{project}".
         */
        @com.google.api.client.util.Key
        private java.lang.String parent;

        /** Required. The name of the project in which the assessment will be created, in the format
       "projects/{project}".
         */
        public java.lang.String getParent() {
          return parent;
        }

        /**
         * Required. The name of the project in which the assessment will be created, in the format
         * "projects/{project}".
         */
        public Create setParent(java.lang.String parent) {
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                "Parameter parent must conform to the pattern " +
                "^projects/[^/]+$");
          }
          this.parent = parent;
          return this;
        }

        @Override
        public Create set(String parameterName, Object value) {
          return (Create) super.set(parameterName, value);
        }
      }

    }
    /**
     * An accessor for creating requests from the Keys collection.
     *
     * <p>The typical use is:</p>
     * <pre>
     *   {@code RecaptchaEnterprise recaptchaenterprise = new RecaptchaEnterprise(...);}
     *   {@code RecaptchaEnterprise.Keys.List request = recaptchaenterprise.keys().list(parameters ...)}
     * </pre>
     *
     * @return the resource collection
     */
    public Keys keys() {
      return new Keys();
    }

    /**
     * The "keys" collection of methods.
     */
    public class Keys {

      /**
       * Creates a new reCAPTCHA Enterprise key.
       *
       * Create a request for the method "keys.create".
       *
       * This request holds the parameters needed by the recaptchaenterprise server.  After setting any
       * optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
       *
       * @param parent Required. The name of the project in which the key will be created, in the format
       *        "projects/{project}".
       * @param content the {@link com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key}
       * @return the request
       */
      public Create create(java.lang.String parent, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key content) throws java.io.IOException {
        Create result = new Create(parent, content);
        initialize(result);
        return result;
      }

      public class Create extends RecaptchaEnterpriseRequest<com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key> {

        private static final String REST_PATH = "v1/{+parent}/keys";

        private final java.util.regex.Pattern PARENT_PATTERN =
            java.util.regex.Pattern.compile("^projects/[^/]+$");

        /**
         * Creates a new reCAPTCHA Enterprise key.
         *
         * Create a request for the method "keys.create".
         *
         * This request holds the parameters needed by the the recaptchaenterprise server.  After setting
         * any optional parameters, call the {@link Create#execute()} method to invoke the remote
         * operation. <p> {@link
         * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
         * be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param parent Required. The name of the project in which the key will be created, in the format
       *        "projects/{project}".
         * @param content the {@link com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key}
         * @since 1.13
         */
        protected Create(java.lang.String parent, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key content) {
          super(RecaptchaEnterprise.this, "POST", REST_PATH, content, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key.class);
          this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                "Parameter parent must conform to the pattern " +
                "^projects/[^/]+$");
          }
        }

        @Override
        public Create set$Xgafv(java.lang.String $Xgafv) {
          return (Create) super.set$Xgafv($Xgafv);
        }

        @Override
        public Create setAccessToken(java.lang.String accessToken) {
          return (Create) super.setAccessToken(accessToken);
        }

        @Override
        public Create setAlt(java.lang.String alt) {
          return (Create) super.setAlt(alt);
        }

        @Override
        public Create setCallback(java.lang.String callback) {
          return (Create) super.setCallback(callback);
        }

        @Override
        public Create setFields(java.lang.String fields) {
          return (Create) super.setFields(fields);
        }

        @Override
        public Create setKey(java.lang.String key) {
          return (Create) super.setKey(key);
        }

        @Override
        public Create setOauthToken(java.lang.String oauthToken) {
          return (Create) super.setOauthToken(oauthToken);
        }

        @Override
        public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (Create) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public Create setQuotaUser(java.lang.String quotaUser) {
          return (Create) super.setQuotaUser(quotaUser);
        }

        @Override
        public Create setUploadType(java.lang.String uploadType) {
          return (Create) super.setUploadType(uploadType);
        }

        @Override
        public Create setUploadProtocol(java.lang.String uploadProtocol) {
          return (Create) super.setUploadProtocol(uploadProtocol);
        }

        /**
         * Required. The name of the project in which the key will be created, in the format
         * "projects/{project}".
         */
        @com.google.api.client.util.Key
        private java.lang.String parent;

        /** Required. The name of the project in which the key will be created, in the format
       "projects/{project}".
         */
        public java.lang.String getParent() {
          return parent;
        }

        /**
         * Required. The name of the project in which the key will be created, in the format
         * "projects/{project}".
         */
        public Create setParent(java.lang.String parent) {
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                "Parameter parent must conform to the pattern " +
                "^projects/[^/]+$");
          }
          this.parent = parent;
          return this;
        }

        @Override
        public Create set(String parameterName, Object value) {
          return (Create) super.set(parameterName, value);
        }
      }
      /**
       * Deletes the specified key.
       *
       * Create a request for the method "keys.delete".
       *
       * This request holds the parameters needed by the recaptchaenterprise server.  After setting any
       * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
       *
       * @param name Required. The name of the key to be deleted, in the format "projects/{project}/keys/{key}".
       * @return the request
       */
      public Delete delete(java.lang.String name) throws java.io.IOException {
        Delete result = new Delete(name);
        initialize(result);
        return result;
      }

      public class Delete extends RecaptchaEnterpriseRequest<com.google.api.services.recaptchaenterprise.v1.model.GoogleProtobufEmpty> {

        private static final String REST_PATH = "v1/{+name}";

        private final java.util.regex.Pattern NAME_PATTERN =
            java.util.regex.Pattern.compile("^projects/[^/]+/keys/[^/]+$");

        /**
         * Deletes the specified key.
         *
         * Create a request for the method "keys.delete".
         *
         * This request holds the parameters needed by the the recaptchaenterprise server.  After setting
         * any optional parameters, call the {@link Delete#execute()} method to invoke the remote
         * operation. <p> {@link
         * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
         * be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param name Required. The name of the key to be deleted, in the format "projects/{project}/keys/{key}".
         * @since 1.13
         */
        protected Delete(java.lang.String name) {
          super(RecaptchaEnterprise.this, "DELETE", REST_PATH, null, com.google.api.services.recaptchaenterprise.v1.model.GoogleProtobufEmpty.class);
          this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                "Parameter name must conform to the pattern " +
                "^projects/[^/]+/keys/[^/]+$");
          }
        }

        @Override
        public Delete set$Xgafv(java.lang.String $Xgafv) {
          return (Delete) super.set$Xgafv($Xgafv);
        }

        @Override
        public Delete setAccessToken(java.lang.String accessToken) {
          return (Delete) super.setAccessToken(accessToken);
        }

        @Override
        public Delete setAlt(java.lang.String alt) {
          return (Delete) super.setAlt(alt);
        }

        @Override
        public Delete setCallback(java.lang.String callback) {
          return (Delete) super.setCallback(callback);
        }

        @Override
        public Delete setFields(java.lang.String fields) {
          return (Delete) super.setFields(fields);
        }

        @Override
        public Delete setKey(java.lang.String key) {
          return (Delete) super.setKey(key);
        }

        @Override
        public Delete setOauthToken(java.lang.String oauthToken) {
          return (Delete) super.setOauthToken(oauthToken);
        }

        @Override
        public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (Delete) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public Delete setQuotaUser(java.lang.String quotaUser) {
          return (Delete) super.setQuotaUser(quotaUser);
        }

        @Override
        public Delete setUploadType(java.lang.String uploadType) {
          return (Delete) super.setUploadType(uploadType);
        }

        @Override
        public Delete setUploadProtocol(java.lang.String uploadProtocol) {
          return (Delete) super.setUploadProtocol(uploadProtocol);
        }

        /**
         * Required. The name of the key to be deleted, in the format
         * "projects/{project}/keys/{key}".
         */
        @com.google.api.client.util.Key
        private java.lang.String name;

        /** Required. The name of the key to be deleted, in the format "projects/{project}/keys/{key}".
         */
        public java.lang.String getName() {
          return name;
        }

        /**
         * Required. The name of the key to be deleted, in the format
         * "projects/{project}/keys/{key}".
         */
        public Delete setName(java.lang.String name) {
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                "Parameter name must conform to the pattern " +
                "^projects/[^/]+/keys/[^/]+$");
          }
          this.name = name;
          return this;
        }

        @Override
        public Delete set(String parameterName, Object value) {
          return (Delete) super.set(parameterName, value);
        }
      }
      /**
       * Returns the specified key.
       *
       * Create a request for the method "keys.get".
       *
       * This request holds the parameters needed by the recaptchaenterprise server.  After setting any
       * optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
       *
       * @param name Required. The name of the requested key, in the format "projects/{project}/keys/{key}".
       * @return the request
       */
      public Get get(java.lang.String name) throws java.io.IOException {
        Get result = new Get(name);
        initialize(result);
        return result;
      }

      public class Get extends RecaptchaEnterpriseRequest<com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key> {

        private static final String REST_PATH = "v1/{+name}";

        private final java.util.regex.Pattern NAME_PATTERN =
            java.util.regex.Pattern.compile("^projects/[^/]+/keys/[^/]+$");

        /**
         * Returns the specified key.
         *
         * Create a request for the method "keys.get".
         *
         * This request holds the parameters needed by the the recaptchaenterprise server.  After setting
         * any optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
         * <p> {@link
         * Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
         * called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param name Required. The name of the requested key, in the format "projects/{project}/keys/{key}".
         * @since 1.13
         */
        protected Get(java.lang.String name) {
          super(RecaptchaEnterprise.this, "GET", REST_PATH, null, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key.class);
          this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                "Parameter name must conform to the pattern " +
                "^projects/[^/]+/keys/[^/]+$");
          }
        }

        @Override
        public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
          return super.executeUsingHead();
        }

        @Override
        public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
          return super.buildHttpRequestUsingHead();
        }

        @Override
        public Get set$Xgafv(java.lang.String $Xgafv) {
          return (Get) super.set$Xgafv($Xgafv);
        }

        @Override
        public Get setAccessToken(java.lang.String accessToken) {
          return (Get) super.setAccessToken(accessToken);
        }

        @Override
        public Get setAlt(java.lang.String alt) {
          return (Get) super.setAlt(alt);
        }

        @Override
        public Get setCallback(java.lang.String callback) {
          return (Get) super.setCallback(callback);
        }

        @Override
        public Get setFields(java.lang.String fields) {
          return (Get) super.setFields(fields);
        }

        @Override
        public Get setKey(java.lang.String key) {
          return (Get) super.setKey(key);
        }

        @Override
        public Get setOauthToken(java.lang.String oauthToken) {
          return (Get) super.setOauthToken(oauthToken);
        }

        @Override
        public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (Get) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public Get setQuotaUser(java.lang.String quotaUser) {
          return (Get) super.setQuotaUser(quotaUser);
        }

        @Override
        public Get setUploadType(java.lang.String uploadType) {
          return (Get) super.setUploadType(uploadType);
        }

        @Override
        public Get setUploadProtocol(java.lang.String uploadProtocol) {
          return (Get) super.setUploadProtocol(uploadProtocol);
        }

        /**
         * Required. The name of the requested key, in the format "projects/{project}/keys/{key}".
         */
        @com.google.api.client.util.Key
        private java.lang.String name;

        /** Required. The name of the requested key, in the format "projects/{project}/keys/{key}".
         */
        public java.lang.String getName() {
          return name;
        }

        /**
         * Required. The name of the requested key, in the format "projects/{project}/keys/{key}".
         */
        public Get setName(java.lang.String name) {
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                "Parameter name must conform to the pattern " +
                "^projects/[^/]+/keys/[^/]+$");
          }
          this.name = name;
          return this;
        }

        @Override
        public Get set(String parameterName, Object value) {
          return (Get) super.set(parameterName, value);
        }
      }
      /**
       * Get some aggregated metrics for a Key. This data can be used to build dashboards.
       *
       * Create a request for the method "keys.getMetrics".
       *
       * This request holds the parameters needed by the recaptchaenterprise server.  After setting any
       * optional parameters, call the {@link GetMetrics#execute()} method to invoke the remote operation.
       *
       * @param name Required. The name of the requested metrics, in the format "projects/{project}/keys/{key}/metrics".
       * @return the request
       */
      public GetMetrics getMetrics(java.lang.String name) throws java.io.IOException {
        GetMetrics result = new GetMetrics(name);
        initialize(result);
        return result;
      }

      public class GetMetrics extends RecaptchaEnterpriseRequest<com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Metrics> {

        private static final String REST_PATH = "v1/{+name}";

        private final java.util.regex.Pattern NAME_PATTERN =
            java.util.regex.Pattern.compile("^projects/[^/]+/keys/[^/]+/metrics$");

        /**
         * Get some aggregated metrics for a Key. This data can be used to build dashboards.
         *
         * Create a request for the method "keys.getMetrics".
         *
         * This request holds the parameters needed by the the recaptchaenterprise server.  After setting
         * any optional parameters, call the {@link GetMetrics#execute()} method to invoke the remote
         * operation. <p> {@link
         * GetMetrics#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
         * must be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param name Required. The name of the requested metrics, in the format "projects/{project}/keys/{key}/metrics".
         * @since 1.13
         */
        protected GetMetrics(java.lang.String name) {
          super(RecaptchaEnterprise.this, "GET", REST_PATH, null, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Metrics.class);
          this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                "Parameter name must conform to the pattern " +
                "^projects/[^/]+/keys/[^/]+/metrics$");
          }
        }

        @Override
        public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
          return super.executeUsingHead();
        }

        @Override
        public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
          return super.buildHttpRequestUsingHead();
        }

        @Override
        public GetMetrics set$Xgafv(java.lang.String $Xgafv) {
          return (GetMetrics) super.set$Xgafv($Xgafv);
        }

        @Override
        public GetMetrics setAccessToken(java.lang.String accessToken) {
          return (GetMetrics) super.setAccessToken(accessToken);
        }

        @Override
        public GetMetrics setAlt(java.lang.String alt) {
          return (GetMetrics) super.setAlt(alt);
        }

        @Override
        public GetMetrics setCallback(java.lang.String callback) {
          return (GetMetrics) super.setCallback(callback);
        }

        @Override
        public GetMetrics setFields(java.lang.String fields) {
          return (GetMetrics) super.setFields(fields);
        }

        @Override
        public GetMetrics setKey(java.lang.String key) {
          return (GetMetrics) super.setKey(key);
        }

        @Override
        public GetMetrics setOauthToken(java.lang.String oauthToken) {
          return (GetMetrics) super.setOauthToken(oauthToken);
        }

        @Override
        public GetMetrics setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (GetMetrics) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public GetMetrics setQuotaUser(java.lang.String quotaUser) {
          return (GetMetrics) super.setQuotaUser(quotaUser);
        }

        @Override
        public GetMetrics setUploadType(java.lang.String uploadType) {
          return (GetMetrics) super.setUploadType(uploadType);
        }

        @Override
        public GetMetrics setUploadProtocol(java.lang.String uploadProtocol) {
          return (GetMetrics) super.setUploadProtocol(uploadProtocol);
        }

        /**
         * Required. The name of the requested metrics, in the format
         * "projects/{project}/keys/{key}/metrics".
         */
        @com.google.api.client.util.Key
        private java.lang.String name;

        /** Required. The name of the requested metrics, in the format "projects/{project}/keys/{key}/metrics".
         */
        public java.lang.String getName() {
          return name;
        }

        /**
         * Required. The name of the requested metrics, in the format
         * "projects/{project}/keys/{key}/metrics".
         */
        public GetMetrics setName(java.lang.String name) {
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                "Parameter name must conform to the pattern " +
                "^projects/[^/]+/keys/[^/]+/metrics$");
          }
          this.name = name;
          return this;
        }

        @Override
        public GetMetrics set(String parameterName, Object value) {
          return (GetMetrics) super.set(parameterName, value);
        }
      }
      /**
       * Returns the list of all keys that belong to a project.
       *
       * Create a request for the method "keys.list".
       *
       * This request holds the parameters needed by the recaptchaenterprise server.  After setting any
       * optional parameters, call the {@link List#execute()} method to invoke the remote operation.
       *
       * @param parent Required. The name of the project that contains the keys that will be listed, in the format
       *        "projects/{project}".
       * @return the request
       */
      public List list(java.lang.String parent) throws java.io.IOException {
        List result = new List(parent);
        initialize(result);
        return result;
      }

      public class List extends RecaptchaEnterpriseRequest<com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1ListKeysResponse> {

        private static final String REST_PATH = "v1/{+parent}/keys";

        private final java.util.regex.Pattern PARENT_PATTERN =
            java.util.regex.Pattern.compile("^projects/[^/]+$");

        /**
         * Returns the list of all keys that belong to a project.
         *
         * Create a request for the method "keys.list".
         *
         * This request holds the parameters needed by the the recaptchaenterprise server.  After setting
         * any optional parameters, call the {@link List#execute()} method to invoke the remote operation.
         * <p> {@link
         * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
         * called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param parent Required. The name of the project that contains the keys that will be listed, in the format
       *        "projects/{project}".
         * @since 1.13
         */
        protected List(java.lang.String parent) {
          super(RecaptchaEnterprise.this, "GET", REST_PATH, null, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1ListKeysResponse.class);
          this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                "Parameter parent must conform to the pattern " +
                "^projects/[^/]+$");
          }
        }

        @Override
        public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
          return super.executeUsingHead();
        }

        @Override
        public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
          return super.buildHttpRequestUsingHead();
        }

        @Override
        public List set$Xgafv(java.lang.String $Xgafv) {
          return (List) super.set$Xgafv($Xgafv);
        }

        @Override
        public List setAccessToken(java.lang.String accessToken) {
          return (List) super.setAccessToken(accessToken);
        }

        @Override
        public List setAlt(java.lang.String alt) {
          return (List) super.setAlt(alt);
        }

        @Override
        public List setCallback(java.lang.String callback) {
          return (List) super.setCallback(callback);
        }

        @Override
        public List setFields(java.lang.String fields) {
          return (List) super.setFields(fields);
        }

        @Override
        public List setKey(java.lang.String key) {
          return (List) super.setKey(key);
        }

        @Override
        public List setOauthToken(java.lang.String oauthToken) {
          return (List) super.setOauthToken(oauthToken);
        }

        @Override
        public List setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (List) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public List setQuotaUser(java.lang.String quotaUser) {
          return (List) super.setQuotaUser(quotaUser);
        }

        @Override
        public List setUploadType(java.lang.String uploadType) {
          return (List) super.setUploadType(uploadType);
        }

        @Override
        public List setUploadProtocol(java.lang.String uploadProtocol) {
          return (List) super.setUploadProtocol(uploadProtocol);
        }

        /**
         * Required. The name of the project that contains the keys that will be listed, in the
         * format "projects/{project}".
         */
        @com.google.api.client.util.Key
        private java.lang.String parent;

        /** Required. The name of the project that contains the keys that will be listed, in the format
       "projects/{project}".
         */
        public java.lang.String getParent() {
          return parent;
        }

        /**
         * Required. The name of the project that contains the keys that will be listed, in the
         * format "projects/{project}".
         */
        public List setParent(java.lang.String parent) {
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                "Parameter parent must conform to the pattern " +
                "^projects/[^/]+$");
          }
          this.parent = parent;
          return this;
        }

        /** Optional. The maximum number of keys to return. Default is 10. Max limit is 1000. */
        @com.google.api.client.util.Key
        private java.lang.Integer pageSize;

        /** Optional. The maximum number of keys to return. Default is 10. Max limit is 1000.
         */
        public java.lang.Integer getPageSize() {
          return pageSize;
        }

        /** Optional. The maximum number of keys to return. Default is 10. Max limit is 1000. */
        public List setPageSize(java.lang.Integer pageSize) {
          this.pageSize = pageSize;
          return this;
        }

        /**
         * Optional. The next_page_token value returned from a previous. ListKeysRequest, if any.
         */
        @com.google.api.client.util.Key
        private java.lang.String pageToken;

        /** Optional. The next_page_token value returned from a previous. ListKeysRequest, if any.
         */
        public java.lang.String getPageToken() {
          return pageToken;
        }

        /**
         * Optional. The next_page_token value returned from a previous. ListKeysRequest, if any.
         */
        public List setPageToken(java.lang.String pageToken) {
          this.pageToken = pageToken;
          return this;
        }

        @Override
        public List set(String parameterName, Object value) {
          return (List) super.set(parameterName, value);
        }
      }
      /**
       * 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 Site Key, and your user must have
       * the reCAPTCHA Enterprise Admin IAM role in the destination project.
       *
       * Create a request for the method "keys.migrate".
       *
       * This request holds the parameters needed by the recaptchaenterprise server.  After setting any
       * optional parameters, call the {@link Migrate#execute()} method to invoke the remote operation.
       *
       * @param name Required. The name of the key to be migrated, in the format "projects/{project}/keys/{key}".
       * @param content the {@link com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest}
       * @return the request
       */
      public Migrate migrate(java.lang.String name, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest content) throws java.io.IOException {
        Migrate result = new Migrate(name, content);
        initialize(result);
        return result;
      }

      public class Migrate extends RecaptchaEnterpriseRequest<com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key> {

        private static final String REST_PATH = "v1/{+name}:migrate";

        private final java.util.regex.Pattern NAME_PATTERN =
            java.util.regex.Pattern.compile("^projects/[^/]+/keys/[^/]+$");

        /**
         * 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 Site Key, and your user must
         * have the reCAPTCHA Enterprise Admin IAM role in the destination project.
         *
         * Create a request for the method "keys.migrate".
         *
         * This request holds the parameters needed by the the recaptchaenterprise server.  After setting
         * any optional parameters, call the {@link Migrate#execute()} method to invoke the remote
         * operation. <p> {@link
         * Migrate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
         * be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param name Required. The name of the key to be migrated, in the format "projects/{project}/keys/{key}".
         * @param content the {@link com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest}
         * @since 1.13
         */
        protected Migrate(java.lang.String name, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest content) {
          super(RecaptchaEnterprise.this, "POST", REST_PATH, content, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key.class);
          this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                "Parameter name must conform to the pattern " +
                "^projects/[^/]+/keys/[^/]+$");
          }
        }

        @Override
        public Migrate set$Xgafv(java.lang.String $Xgafv) {
          return (Migrate) super.set$Xgafv($Xgafv);
        }

        @Override
        public Migrate setAccessToken(java.lang.String accessToken) {
          return (Migrate) super.setAccessToken(accessToken);
        }

        @Override
        public Migrate setAlt(java.lang.String alt) {
          return (Migrate) super.setAlt(alt);
        }

        @Override
        public Migrate setCallback(java.lang.String callback) {
          return (Migrate) super.setCallback(callback);
        }

        @Override
        public Migrate setFields(java.lang.String fields) {
          return (Migrate) super.setFields(fields);
        }

        @Override
        public Migrate setKey(java.lang.String key) {
          return (Migrate) super.setKey(key);
        }

        @Override
        public Migrate setOauthToken(java.lang.String oauthToken) {
          return (Migrate) super.setOauthToken(oauthToken);
        }

        @Override
        public Migrate setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (Migrate) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public Migrate setQuotaUser(java.lang.String quotaUser) {
          return (Migrate) super.setQuotaUser(quotaUser);
        }

        @Override
        public Migrate setUploadType(java.lang.String uploadType) {
          return (Migrate) super.setUploadType(uploadType);
        }

        @Override
        public Migrate setUploadProtocol(java.lang.String uploadProtocol) {
          return (Migrate) super.setUploadProtocol(uploadProtocol);
        }

        /**
         * Required. The name of the key to be migrated, in the format
         * "projects/{project}/keys/{key}".
         */
        @com.google.api.client.util.Key
        private java.lang.String name;

        /** Required. The name of the key to be migrated, in the format "projects/{project}/keys/{key}".
         */
        public java.lang.String getName() {
          return name;
        }

        /**
         * Required. The name of the key to be migrated, in the format
         * "projects/{project}/keys/{key}".
         */
        public Migrate setName(java.lang.String name) {
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                "Parameter name must conform to the pattern " +
                "^projects/[^/]+/keys/[^/]+$");
          }
          this.name = name;
          return this;
        }

        @Override
        public Migrate set(String parameterName, Object value) {
          return (Migrate) super.set(parameterName, value);
        }
      }
      /**
       * Updates the specified key.
       *
       * Create a request for the method "keys.patch".
       *
       * This request holds the parameters needed by the recaptchaenterprise server.  After setting any
       * optional parameters, call the {@link Patch#execute()} method to invoke the remote operation.
       *
       * @param name The resource name for the Key in the format "projects/{project}/keys/{key}".
       * @param content the {@link com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key}
       * @return the request
       */
      public Patch patch(java.lang.String name, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key content) throws java.io.IOException {
        Patch result = new Patch(name, content);
        initialize(result);
        return result;
      }

      public class Patch extends RecaptchaEnterpriseRequest<com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key> {

        private static final String REST_PATH = "v1/{+name}";

        private final java.util.regex.Pattern NAME_PATTERN =
            java.util.regex.Pattern.compile("^projects/[^/]+/keys/[^/]+$");

        /**
         * Updates the specified key.
         *
         * Create a request for the method "keys.patch".
         *
         * This request holds the parameters needed by the the recaptchaenterprise server.  After setting
         * any optional parameters, call the {@link Patch#execute()} method to invoke the remote
         * operation. <p> {@link
         * Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
         * be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param name The resource name for the Key in the format "projects/{project}/keys/{key}".
         * @param content the {@link com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key}
         * @since 1.13
         */
        protected Patch(java.lang.String name, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key content) {
          super(RecaptchaEnterprise.this, "PATCH", REST_PATH, content, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1Key.class);
          this.name = com.google.api.client.util.Preconditions.checkNotNull(name, "Required parameter name must be specified.");
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                "Parameter name must conform to the pattern " +
                "^projects/[^/]+/keys/[^/]+$");
          }
        }

        @Override
        public Patch set$Xgafv(java.lang.String $Xgafv) {
          return (Patch) super.set$Xgafv($Xgafv);
        }

        @Override
        public Patch setAccessToken(java.lang.String accessToken) {
          return (Patch) super.setAccessToken(accessToken);
        }

        @Override
        public Patch setAlt(java.lang.String alt) {
          return (Patch) super.setAlt(alt);
        }

        @Override
        public Patch setCallback(java.lang.String callback) {
          return (Patch) super.setCallback(callback);
        }

        @Override
        public Patch setFields(java.lang.String fields) {
          return (Patch) super.setFields(fields);
        }

        @Override
        public Patch setKey(java.lang.String key) {
          return (Patch) super.setKey(key);
        }

        @Override
        public Patch setOauthToken(java.lang.String oauthToken) {
          return (Patch) super.setOauthToken(oauthToken);
        }

        @Override
        public Patch setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (Patch) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public Patch setQuotaUser(java.lang.String quotaUser) {
          return (Patch) super.setQuotaUser(quotaUser);
        }

        @Override
        public Patch setUploadType(java.lang.String uploadType) {
          return (Patch) super.setUploadType(uploadType);
        }

        @Override
        public Patch setUploadProtocol(java.lang.String uploadProtocol) {
          return (Patch) super.setUploadProtocol(uploadProtocol);
        }

        /** The resource name for the Key in the format "projects/{project}/keys/{key}". */
        @com.google.api.client.util.Key
        private java.lang.String name;

        /** The resource name for the Key in the format "projects/{project}/keys/{key}".
         */
        public java.lang.String getName() {
          return name;
        }

        /** The resource name for the Key in the format "projects/{project}/keys/{key}". */
        public Patch setName(java.lang.String name) {
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(NAME_PATTERN.matcher(name).matches(),
                "Parameter name must conform to the pattern " +
                "^projects/[^/]+/keys/[^/]+$");
          }
          this.name = name;
          return this;
        }

        /**
         * Optional. The mask to control which fields of the key get updated. If the mask is not
         * present, all fields will be updated.
         */
        @com.google.api.client.util.Key
        private String updateMask;

        /** Optional. The mask to control which fields of the key get updated. If the mask is not present, all
       fields will be updated.
         */
        public String getUpdateMask() {
          return updateMask;
        }

        /**
         * Optional. The mask to control which fields of the key get updated. If the mask is not
         * present, all fields will be updated.
         */
        public Patch setUpdateMask(String updateMask) {
          this.updateMask = updateMask;
          return this;
        }

        @Override
        public Patch set(String parameterName, Object value) {
          return (Patch) super.set(parameterName, value);
        }
      }
      /**
       * Returns the secret key related to the specified public key. You should use the legacy secret key
       * only if you are integrating with a 3rd party using the legacy reCAPTCHA instead of reCAPTCHA
       * Enterprise.
       *
       * Create a request for the method "keys.retrieveLegacySecretKey".
       *
       * This request holds the parameters needed by the recaptchaenterprise server.  After setting any
       * optional parameters, call the {@link RetrieveLegacySecretKey#execute()} method to invoke the
       * remote operation.
       *
       * @param key Required. The public key name linked to the requested secret key , in the format
       *        "projects/{project}/keys/{key}".
       * @return the request
       */
      public RetrieveLegacySecretKey retrieveLegacySecretKey(java.lang.String key) throws java.io.IOException {
        RetrieveLegacySecretKey result = new RetrieveLegacySecretKey(key);
        initialize(result);
        return result;
      }

      public class RetrieveLegacySecretKey extends RecaptchaEnterpriseRequest<com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse> {

        private static final String REST_PATH = "v1/{+key}:retrieveLegacySecretKey";

        private final java.util.regex.Pattern KEY_PATTERN =
            java.util.regex.Pattern.compile("^projects/[^/]+/keys/[^/]+$");

        /**
         * Returns the secret key related to the specified public key. You should use the legacy secret
         * key only if you are integrating with a 3rd party using the legacy reCAPTCHA instead of
         * reCAPTCHA Enterprise.
         *
         * Create a request for the method "keys.retrieveLegacySecretKey".
         *
         * This request holds the parameters needed by the the recaptchaenterprise server.  After setting
         * any optional parameters, call the {@link RetrieveLegacySecretKey#execute()} method to invoke
         * the remote operation. <p> {@link RetrieveLegacySecretKey#initialize(com.google.api.client.googl
         * eapis.services.AbstractGoogleClientRequest)} must be called to initialize this instance
         * immediately after invoking the constructor. </p>
         *
         * @param key Required. The public key name linked to the requested secret key , in the format
       *        "projects/{project}/keys/{key}".
         * @since 1.13
         */
        protected RetrieveLegacySecretKey(java.lang.String key) {
          super(RecaptchaEnterprise.this, "GET", REST_PATH, null, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse.class);
          this.key = com.google.api.client.util.Preconditions.checkNotNull(key, "Required parameter key must be specified.");
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(KEY_PATTERN.matcher(key).matches(),
                "Parameter key must conform to the pattern " +
                "^projects/[^/]+/keys/[^/]+$");
          }
        }

        @Override
        public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
          return super.executeUsingHead();
        }

        @Override
        public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
          return super.buildHttpRequestUsingHead();
        }

        @Override
        public RetrieveLegacySecretKey set$Xgafv(java.lang.String $Xgafv) {
          return (RetrieveLegacySecretKey) super.set$Xgafv($Xgafv);
        }

        @Override
        public RetrieveLegacySecretKey setAccessToken(java.lang.String accessToken) {
          return (RetrieveLegacySecretKey) super.setAccessToken(accessToken);
        }

        @Override
        public RetrieveLegacySecretKey setAlt(java.lang.String alt) {
          return (RetrieveLegacySecretKey) super.setAlt(alt);
        }

        @Override
        public RetrieveLegacySecretKey setCallback(java.lang.String callback) {
          return (RetrieveLegacySecretKey) super.setCallback(callback);
        }

        @Override
        public RetrieveLegacySecretKey setFields(java.lang.String fields) {
          return (RetrieveLegacySecretKey) super.setFields(fields);
        }

        @Override
        public RetrieveLegacySecretKey setKey(java.lang.String key) {
          return (RetrieveLegacySecretKey) super.setKey(key);
        }

        @Override
        public RetrieveLegacySecretKey setOauthToken(java.lang.String oauthToken) {
          return (RetrieveLegacySecretKey) super.setOauthToken(oauthToken);
        }

        @Override
        public RetrieveLegacySecretKey setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (RetrieveLegacySecretKey) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public RetrieveLegacySecretKey setQuotaUser(java.lang.String quotaUser) {
          return (RetrieveLegacySecretKey) super.setQuotaUser(quotaUser);
        }

        @Override
        public RetrieveLegacySecretKey setUploadType(java.lang.String uploadType) {
          return (RetrieveLegacySecretKey) super.setUploadType(uploadType);
        }

        @Override
        public RetrieveLegacySecretKey setUploadProtocol(java.lang.String uploadProtocol) {
          return (RetrieveLegacySecretKey) super.setUploadProtocol(uploadProtocol);
        }

        /**
         * Required. The public key name linked to the requested secret key , in the format
         * "projects/{project}/keys/{key}".
         */
        @com.google.api.client.util.Key
        private java.lang.String key;

        /** Required. The public key name linked to the requested secret key , in the format
       "projects/{project}/keys/{key}".
         */
        public java.lang.String getKey() {
          return key;
        }

        /**
         * Required. The public key name linked to the requested secret key , in the format
         * "projects/{project}/keys/{key}".
         */
        public RetrieveLegacySecretKey setKey(java.lang.String key) {
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(KEY_PATTERN.matcher(key).matches(),
                "Parameter key must conform to the pattern " +
                "^projects/[^/]+/keys/[^/]+$");
          }
          this.key = key;
          return this;
        }

        @Override
        public RetrieveLegacySecretKey set(String parameterName, Object value) {
          return (RetrieveLegacySecretKey) super.set(parameterName, value);
        }
      }

    }
    /**
     * An accessor for creating requests from the Relatedaccountgroupmemberships collection.
     *
     * <p>The typical use is:</p>
     * <pre>
     *   {@code RecaptchaEnterprise recaptchaenterprise = new RecaptchaEnterprise(...);}
     *   {@code RecaptchaEnterprise.Relatedaccountgroupmemberships.List request = recaptchaenterprise.relatedaccountgroupmemberships().list(parameters ...)}
     * </pre>
     *
     * @return the resource collection
     */
    public Relatedaccountgroupmemberships relatedaccountgroupmemberships() {
      return new Relatedaccountgroupmemberships();
    }

    /**
     * The "relatedaccountgroupmemberships" collection of methods.
     */
    public class Relatedaccountgroupmemberships {

      /**
       * Search group memberships related to a given account.
       *
       * Create a request for the method "relatedaccountgroupmemberships.search".
       *
       * This request holds the parameters needed by the recaptchaenterprise server.  After setting any
       * optional parameters, call the {@link Search#execute()} method to invoke the remote operation.
       *
       * @param project Required. The name of the project to search related account group memberships from, in the format
       *        "projects/{project}".
       * @param content the {@link com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest}
       * @return the request
       */
      public Search search(java.lang.String project, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest content) throws java.io.IOException {
        Search result = new Search(project, content);
        initialize(result);
        return result;
      }

      public class Search extends RecaptchaEnterpriseRequest<com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse> {

        private static final String REST_PATH = "v1/{+project}/relatedaccountgroupmemberships:search";

        private final java.util.regex.Pattern PROJECT_PATTERN =
            java.util.regex.Pattern.compile("^projects/[^/]+$");

        /**
         * Search group memberships related to a given account.
         *
         * Create a request for the method "relatedaccountgroupmemberships.search".
         *
         * This request holds the parameters needed by the the recaptchaenterprise server.  After setting
         * any optional parameters, call the {@link Search#execute()} method to invoke the remote
         * operation. <p> {@link
         * Search#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
         * be called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param project Required. The name of the project to search related account group memberships from, in the format
       *        "projects/{project}".
         * @param content the {@link com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest}
         * @since 1.13
         */
        protected Search(java.lang.String project, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest content) {
          super(RecaptchaEnterprise.this, "POST", REST_PATH, content, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse.class);
          this.project = com.google.api.client.util.Preconditions.checkNotNull(project, "Required parameter project must be specified.");
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(),
                "Parameter project must conform to the pattern " +
                "^projects/[^/]+$");
          }
        }

        @Override
        public Search set$Xgafv(java.lang.String $Xgafv) {
          return (Search) super.set$Xgafv($Xgafv);
        }

        @Override
        public Search setAccessToken(java.lang.String accessToken) {
          return (Search) super.setAccessToken(accessToken);
        }

        @Override
        public Search setAlt(java.lang.String alt) {
          return (Search) super.setAlt(alt);
        }

        @Override
        public Search setCallback(java.lang.String callback) {
          return (Search) super.setCallback(callback);
        }

        @Override
        public Search setFields(java.lang.String fields) {
          return (Search) super.setFields(fields);
        }

        @Override
        public Search setKey(java.lang.String key) {
          return (Search) super.setKey(key);
        }

        @Override
        public Search setOauthToken(java.lang.String oauthToken) {
          return (Search) super.setOauthToken(oauthToken);
        }

        @Override
        public Search setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (Search) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public Search setQuotaUser(java.lang.String quotaUser) {
          return (Search) super.setQuotaUser(quotaUser);
        }

        @Override
        public Search setUploadType(java.lang.String uploadType) {
          return (Search) super.setUploadType(uploadType);
        }

        @Override
        public Search setUploadProtocol(java.lang.String uploadProtocol) {
          return (Search) super.setUploadProtocol(uploadProtocol);
        }

        /**
         * Required. The name of the project to search related account group memberships from, in
         * the format "projects/{project}".
         */
        @com.google.api.client.util.Key
        private java.lang.String project;

        /** Required. The name of the project to search related account group memberships from, in the format
       "projects/{project}".
         */
        public java.lang.String getProject() {
          return project;
        }

        /**
         * Required. The name of the project to search related account group memberships from, in
         * the format "projects/{project}".
         */
        public Search setProject(java.lang.String project) {
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(PROJECT_PATTERN.matcher(project).matches(),
                "Parameter project must conform to the pattern " +
                "^projects/[^/]+$");
          }
          this.project = project;
          return this;
        }

        @Override
        public Search set(String parameterName, Object value) {
          return (Search) super.set(parameterName, value);
        }
      }

    }
    /**
     * An accessor for creating requests from the Relatedaccountgroups collection.
     *
     * <p>The typical use is:</p>
     * <pre>
     *   {@code RecaptchaEnterprise recaptchaenterprise = new RecaptchaEnterprise(...);}
     *   {@code RecaptchaEnterprise.Relatedaccountgroups.List request = recaptchaenterprise.relatedaccountgroups().list(parameters ...)}
     * </pre>
     *
     * @return the resource collection
     */
    public Relatedaccountgroups relatedaccountgroups() {
      return new Relatedaccountgroups();
    }

    /**
     * The "relatedaccountgroups" collection of methods.
     */
    public class Relatedaccountgroups {

      /**
       * List groups of related accounts.
       *
       * Create a request for the method "relatedaccountgroups.list".
       *
       * This request holds the parameters needed by the recaptchaenterprise server.  After setting any
       * optional parameters, call the {@link List#execute()} method to invoke the remote operation.
       *
       * @param parent Required. The name of the project to list related account groups from, in the format
       *        "projects/{project}".
       * @return the request
       */
      public List list(java.lang.String parent) throws java.io.IOException {
        List result = new List(parent);
        initialize(result);
        return result;
      }

      public class List extends RecaptchaEnterpriseRequest<com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse> {

        private static final String REST_PATH = "v1/{+parent}/relatedaccountgroups";

        private final java.util.regex.Pattern PARENT_PATTERN =
            java.util.regex.Pattern.compile("^projects/[^/]+$");

        /**
         * List groups of related accounts.
         *
         * Create a request for the method "relatedaccountgroups.list".
         *
         * This request holds the parameters needed by the the recaptchaenterprise server.  After setting
         * any optional parameters, call the {@link List#execute()} method to invoke the remote operation.
         * <p> {@link
         * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
         * called to initialize this instance immediately after invoking the constructor. </p>
         *
         * @param parent Required. The name of the project to list related account groups from, in the format
       *        "projects/{project}".
         * @since 1.13
         */
        protected List(java.lang.String parent) {
          super(RecaptchaEnterprise.this, "GET", REST_PATH, null, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse.class);
          this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                "Parameter parent must conform to the pattern " +
                "^projects/[^/]+$");
          }
        }

        @Override
        public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
          return super.executeUsingHead();
        }

        @Override
        public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
          return super.buildHttpRequestUsingHead();
        }

        @Override
        public List set$Xgafv(java.lang.String $Xgafv) {
          return (List) super.set$Xgafv($Xgafv);
        }

        @Override
        public List setAccessToken(java.lang.String accessToken) {
          return (List) super.setAccessToken(accessToken);
        }

        @Override
        public List setAlt(java.lang.String alt) {
          return (List) super.setAlt(alt);
        }

        @Override
        public List setCallback(java.lang.String callback) {
          return (List) super.setCallback(callback);
        }

        @Override
        public List setFields(java.lang.String fields) {
          return (List) super.setFields(fields);
        }

        @Override
        public List setKey(java.lang.String key) {
          return (List) super.setKey(key);
        }

        @Override
        public List setOauthToken(java.lang.String oauthToken) {
          return (List) super.setOauthToken(oauthToken);
        }

        @Override
        public List setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (List) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public List setQuotaUser(java.lang.String quotaUser) {
          return (List) super.setQuotaUser(quotaUser);
        }

        @Override
        public List setUploadType(java.lang.String uploadType) {
          return (List) super.setUploadType(uploadType);
        }

        @Override
        public List setUploadProtocol(java.lang.String uploadProtocol) {
          return (List) super.setUploadProtocol(uploadProtocol);
        }

        /**
         * Required. The name of the project to list related account groups from, in the format
         * "projects/{project}".
         */
        @com.google.api.client.util.Key
        private java.lang.String parent;

        /** Required. The name of the project to list related account groups from, in the format
       "projects/{project}".
         */
        public java.lang.String getParent() {
          return parent;
        }

        /**
         * Required. The name of the project to list related account groups from, in the format
         * "projects/{project}".
         */
        public List setParent(java.lang.String parent) {
          if (!getSuppressPatternChecks()) {
            com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                "Parameter parent must conform to the pattern " +
                "^projects/[^/]+$");
          }
          this.parent = parent;
          return this;
        }

        /**
         * Optional. The maximum number of groups to return. The service may return fewer than this
         * value. If unspecified, at most 50 groups will be returned. The maximum value is 1000;
         * values above 1000 will be coerced to 1000.
         */
        @com.google.api.client.util.Key
        private java.lang.Integer pageSize;

        /** Optional. The maximum number of groups to return. The service may return fewer than this value. If
       unspecified, at most 50 groups will be returned. The maximum value is 1000; values above 1000 will
       be coerced to 1000.
         */
        public java.lang.Integer getPageSize() {
          return pageSize;
        }

        /**
         * Optional. The maximum number of groups to return. The service may return fewer than this
         * value. If unspecified, at most 50 groups will be returned. The maximum value is 1000;
         * values above 1000 will be coerced to 1000.
         */
        public List setPageSize(java.lang.Integer pageSize) {
          this.pageSize = pageSize;
          return this;
        }

        /**
         * Optional. A page token, received from a previous `ListRelatedAccountGroups` call. Provide
         * this to retrieve the subsequent page. When paginating, all other parameters provided to
         * `ListRelatedAccountGroups` must match the call that provided the page token.
         */
        @com.google.api.client.util.Key
        private java.lang.String pageToken;

        /** Optional. A page token, received from a previous `ListRelatedAccountGroups` call. Provide this to
       retrieve the subsequent page. When paginating, all other parameters provided to
       `ListRelatedAccountGroups` must match the call that provided the page token.
         */
        public java.lang.String getPageToken() {
          return pageToken;
        }

        /**
         * Optional. A page token, received from a previous `ListRelatedAccountGroups` call. Provide
         * this to retrieve the subsequent page. When paginating, all other parameters provided to
         * `ListRelatedAccountGroups` must match the call that provided the page token.
         */
        public List setPageToken(java.lang.String pageToken) {
          this.pageToken = pageToken;
          return this;
        }

        @Override
        public List set(String parameterName, Object value) {
          return (List) super.set(parameterName, value);
        }
      }

      /**
       * An accessor for creating requests from the Memberships collection.
       *
       * <p>The typical use is:</p>
       * <pre>
       *   {@code RecaptchaEnterprise recaptchaenterprise = new RecaptchaEnterprise(...);}
       *   {@code RecaptchaEnterprise.Memberships.List request = recaptchaenterprise.memberships().list(parameters ...)}
       * </pre>
       *
       * @return the resource collection
       */
      public Memberships memberships() {
        return new Memberships();
      }

      /**
       * The "memberships" collection of methods.
       */
      public class Memberships {

        /**
         * Get the memberships in a group of related accounts.
         *
         * Create a request for the method "memberships.list".
         *
         * This request holds the parameters needed by the recaptchaenterprise server.  After setting any
         * optional parameters, call the {@link List#execute()} method to invoke the remote operation.
         *
         * @param parent Required. The resource name for the related account group in the format
         *        `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`.
         * @return the request
         */
        public List list(java.lang.String parent) throws java.io.IOException {
          List result = new List(parent);
          initialize(result);
          return result;
        }

        public class List extends RecaptchaEnterpriseRequest<com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse> {

          private static final String REST_PATH = "v1/{+parent}/memberships";

          private final java.util.regex.Pattern PARENT_PATTERN =
              java.util.regex.Pattern.compile("^projects/[^/]+/relatedaccountgroups/[^/]+$");

          /**
           * Get the memberships in a group of related accounts.
           *
           * Create a request for the method "memberships.list".
           *
           * This request holds the parameters needed by the the recaptchaenterprise server.  After setting
           * any optional parameters, call the {@link List#execute()} method to invoke the remote operation.
           * <p> {@link
           * List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
           * called to initialize this instance immediately after invoking the constructor. </p>
           *
           * @param parent Required. The resource name for the related account group in the format
         *        `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`.
           * @since 1.13
           */
          protected List(java.lang.String parent) {
            super(RecaptchaEnterprise.this, "GET", REST_PATH, null, com.google.api.services.recaptchaenterprise.v1.model.GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse.class);
            this.parent = com.google.api.client.util.Preconditions.checkNotNull(parent, "Required parameter parent must be specified.");
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                  "Parameter parent must conform to the pattern " +
                  "^projects/[^/]+/relatedaccountgroups/[^/]+$");
            }
          }

          @Override
          public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
            return super.executeUsingHead();
          }

          @Override
          public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
            return super.buildHttpRequestUsingHead();
          }

          @Override
          public List set$Xgafv(java.lang.String $Xgafv) {
            return (List) super.set$Xgafv($Xgafv);
          }

          @Override
          public List setAccessToken(java.lang.String accessToken) {
            return (List) super.setAccessToken(accessToken);
          }

          @Override
          public List setAlt(java.lang.String alt) {
            return (List) super.setAlt(alt);
          }

          @Override
          public List setCallback(java.lang.String callback) {
            return (List) super.setCallback(callback);
          }

          @Override
          public List setFields(java.lang.String fields) {
            return (List) super.setFields(fields);
          }

          @Override
          public List setKey(java.lang.String key) {
            return (List) super.setKey(key);
          }

          @Override
          public List setOauthToken(java.lang.String oauthToken) {
            return (List) super.setOauthToken(oauthToken);
          }

          @Override
          public List setPrettyPrint(java.lang.Boolean prettyPrint) {
            return (List) super.setPrettyPrint(prettyPrint);
          }

          @Override
          public List setQuotaUser(java.lang.String quotaUser) {
            return (List) super.setQuotaUser(quotaUser);
          }

          @Override
          public List setUploadType(java.lang.String uploadType) {
            return (List) super.setUploadType(uploadType);
          }

          @Override
          public List setUploadProtocol(java.lang.String uploadProtocol) {
            return (List) super.setUploadProtocol(uploadProtocol);
          }

          /**
           * Required. The resource name for the related account group in the format
           * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`.
           */
          @com.google.api.client.util.Key
          private java.lang.String parent;

          /** Required. The resource name for the related account group in the format
         `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`.
           */
          public java.lang.String getParent() {
            return parent;
          }

          /**
           * Required. The resource name for the related account group in the format
           * `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`.
           */
          public List setParent(java.lang.String parent) {
            if (!getSuppressPatternChecks()) {
              com.google.api.client.util.Preconditions.checkArgument(PARENT_PATTERN.matcher(parent).matches(),
                  "Parameter parent must conform to the pattern " +
                  "^projects/[^/]+/relatedaccountgroups/[^/]+$");
            }
            this.parent = parent;
            return this;
          }

          /**
           * Optional. The maximum number of accounts to return. The service may return fewer than
           * this value. If unspecified, at most 50 accounts will be returned. The maximum value is
           * 1000; values above 1000 will be coerced to 1000.
           */
          @com.google.api.client.util.Key
          private java.lang.Integer pageSize;

          /** Optional. The maximum number of accounts to return. The service may return fewer than this value.
         If unspecified, at most 50 accounts will be returned. The maximum value is 1000; values above 1000
         will be coerced to 1000.
           */
          public java.lang.Integer getPageSize() {
            return pageSize;
          }

          /**
           * Optional. The maximum number of accounts to return. The service may return fewer than
           * this value. If unspecified, at most 50 accounts will be returned. The maximum value is
           * 1000; values above 1000 will be coerced to 1000.
           */
          public List setPageSize(java.lang.Integer pageSize) {
            this.pageSize = pageSize;
            return this;
          }

          /**
           * Optional. A page token, received from a previous `ListRelatedAccountGroupMemberships`
           * call. When paginating, all other parameters provided to
           * `ListRelatedAccountGroupMemberships` must match the call that provided the page token.
           */
          @com.google.api.client.util.Key
          private java.lang.String pageToken;

          /** Optional. A page token, received from a previous `ListRelatedAccountGroupMemberships` call. When
         paginating, all other parameters provided to `ListRelatedAccountGroupMemberships` must match the
         call that provided the page token.
           */
          public java.lang.String getPageToken() {
            return pageToken;
          }

          /**
           * Optional. A page token, received from a previous `ListRelatedAccountGroupMemberships`
           * call. When paginating, all other parameters provided to
           * `ListRelatedAccountGroupMemberships` must match the call that provided the page token.
           */
          public List setPageToken(java.lang.String pageToken) {
            this.pageToken = pageToken;
            return this;
          }

          @Override
          public List set(String parameterName, Object value) {
            return (List) super.set(parameterName, value);
          }
        }

      }
    }
  }

  /**
   * Builder for {@link RecaptchaEnterprise}.
   *
   * <p>
   * Implementation is not thread-safe.
   * </p>
   *
   * @since 1.3.0
   */
  public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder {

    private static String chooseEndpoint(com.google.api.client.http.HttpTransport transport) {
      // If the GOOGLE_API_USE_MTLS_ENDPOINT environment variable value is "always", use mTLS endpoint.
      // If the env variable is "auto", use mTLS endpoint if and only if the transport is mTLS.
      // Use the regular endpoint for all other cases.
      String useMtlsEndpoint = System.getenv("GOOGLE_API_USE_MTLS_ENDPOINT");
      useMtlsEndpoint = useMtlsEndpoint == null ? "auto" : useMtlsEndpoint;
      if ("always".equals(useMtlsEndpoint) || ("auto".equals(useMtlsEndpoint) && transport != null && transport.isMtls())) {
        return DEFAULT_MTLS_ROOT_URL;
      }
      return DEFAULT_ROOT_URL;
    }

    /**
     * Returns an instance of a new builder.
     *
     * @param transport HTTP transport, which should normally be:
     *        <ul>
     *        <li>Google App Engine:
     *        {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
     *        <li>Android: {@code newCompatibleTransport} from
     *        {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
     *        <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
     *        </li>
     *        </ul>
     * @param jsonFactory JSON factory, which may be:
     *        <ul>
     *        <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
     *        <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
     *        <li>Android Honeycomb or higher:
     *        {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
     *        </ul>
     * @param httpRequestInitializer HTTP request initializer or {@code null} for none
     * @since 1.7
     */
    public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
        com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
      super(
          transport,
          jsonFactory,
          Builder.chooseEndpoint(transport),
          DEFAULT_SERVICE_PATH,
          httpRequestInitializer,
          false);
      setBatchPath(DEFAULT_BATCH_PATH);
    }

    /** Builds a new instance of {@link RecaptchaEnterprise}. */
    @Override
    public RecaptchaEnterprise build() {
      return new RecaptchaEnterprise(this);
    }

    @Override
    public Builder setRootUrl(String rootUrl) {
      return (Builder) super.setRootUrl(rootUrl);
    }

    @Override
    public Builder setServicePath(String servicePath) {
      return (Builder) super.setServicePath(servicePath);
    }

    @Override
    public Builder setBatchPath(String batchPath) {
      return (Builder) super.setBatchPath(batchPath);
    }

    @Override
    public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
      return (Builder) super.setHttpRequestInitializer(httpRequestInitializer);
    }

    @Override
    public Builder setApplicationName(String applicationName) {
      return (Builder) super.setApplicationName(applicationName);
    }

    @Override
    public Builder setSuppressPatternChecks(boolean suppressPatternChecks) {
      return (Builder) super.setSuppressPatternChecks(suppressPatternChecks);
    }

    @Override
    public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) {
      return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks);
    }

    @Override
    public Builder setSuppressAllChecks(boolean suppressAllChecks) {
      return (Builder) super.setSuppressAllChecks(suppressAllChecks);
    }

    /**
     * Set the {@link RecaptchaEnterpriseRequestInitializer}.
     *
     * @since 1.12
     */
    public Builder setRecaptchaEnterpriseRequestInitializer(
        RecaptchaEnterpriseRequestInitializer recaptchaenterpriseRequestInitializer) {
      return (Builder) super.setGoogleClientRequestInitializer(recaptchaenterpriseRequestInitializer);
    }

    @Override
    public Builder setGoogleClientRequestInitializer(
        com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
      return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
    }
  }
}
