/*
 * 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.identitytoolkit.v2.model;

/**
 * The config for a reCAPTCHA managed rule. Models a single interval [start_score, end_score]. The
 * start_score is implicit. It is either the closest smaller end_score (if one is available) or 0.
 * Intervals in aggregate span [0, 1] without overlapping.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Identity Toolkit API. For a detailed explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule extends com.google.api.client.json.GenericJson {

  /**
   * The action taken if the reCAPTCHA score of a request is within the interval [start_score,
   * end_score].
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String action;

  /**
   * The end score (inclusive) of the score range for an action. Must be a value between 0.0 and
   * 1.0, at 11 discrete values; e.g. 0, 0.1, 0.2, 0.3, ... 0.9, 1.0. A score of 0.0 indicates the
   * riskiest request (likely a bot), whereas 1.0 indicates the safest request (likely a human). See
   * https://cloud.google.com/recaptcha-enterprise/docs/interpret-assessment.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Float endScore;

  /**
   * The action taken if the reCAPTCHA score of a request is within the interval [start_score,
   * end_score].
   * @return value or {@code null} for none
   */
  public java.lang.String getAction() {
    return action;
  }

  /**
   * The action taken if the reCAPTCHA score of a request is within the interval [start_score,
   * end_score].
   * @param action action or {@code null} for none
   */
  public GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule setAction(java.lang.String action) {
    this.action = action;
    return this;
  }

  /**
   * The end score (inclusive) of the score range for an action. Must be a value between 0.0 and
   * 1.0, at 11 discrete values; e.g. 0, 0.1, 0.2, 0.3, ... 0.9, 1.0. A score of 0.0 indicates the
   * riskiest request (likely a bot), whereas 1.0 indicates the safest request (likely a human). See
   * https://cloud.google.com/recaptcha-enterprise/docs/interpret-assessment.
   * @return value or {@code null} for none
   */
  public java.lang.Float getEndScore() {
    return endScore;
  }

  /**
   * The end score (inclusive) of the score range for an action. Must be a value between 0.0 and
   * 1.0, at 11 discrete values; e.g. 0, 0.1, 0.2, 0.3, ... 0.9, 1.0. A score of 0.0 indicates the
   * riskiest request (likely a bot), whereas 1.0 indicates the safest request (likely a human). See
   * https://cloud.google.com/recaptcha-enterprise/docs/interpret-assessment.
   * @param endScore endScore or {@code null} for none
   */
  public GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule setEndScore(java.lang.Float endScore) {
    this.endScore = endScore;
    return this;
  }

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

  @Override
  public GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule clone() {
    return (GoogleCloudIdentitytoolkitAdminV2RecaptchaManagedRule) super.clone();
  }

}
