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

/**
 * Model definition for GoogleCloudRecaptchaenterpriseV1TokenProperties.
 *
 * <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 reCAPTCHA Enterprise 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 GoogleCloudRecaptchaenterpriseV1TokenProperties extends com.google.api.client.json.GenericJson {

  /**
   * Action name provided at token generation.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String action;

  /**
   * The timestamp corresponding to the generation of the token.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String createTime;

  /**
   * The hostname of the page on which the token was generated.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String hostname;

  /**
   * Reason associated with the response when valid = false.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String invalidReason;

  /**
   * Whether the provided user response token is valid. When valid = false, the reason could be
   * specified in invalid_reason or it could also be due to a user failing to solve a challenge or a
   * sitekey mismatch (i.e the sitekey used to generate the token was different than the one
   * specified in the assessment).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean valid;

  /**
   * Action name provided at token generation.
   * @return value or {@code null} for none
   */
  public java.lang.String getAction() {
    return action;
  }

  /**
   * Action name provided at token generation.
   * @param action action or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TokenProperties setAction(java.lang.String action) {
    this.action = action;
    return this;
  }

  /**
   * The timestamp corresponding to the generation of the token.
   * @return value or {@code null} for none
   */
  public String getCreateTime() {
    return createTime;
  }

  /**
   * The timestamp corresponding to the generation of the token.
   * @param createTime createTime or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TokenProperties setCreateTime(String createTime) {
    this.createTime = createTime;
    return this;
  }

  /**
   * The hostname of the page on which the token was generated.
   * @return value or {@code null} for none
   */
  public java.lang.String getHostname() {
    return hostname;
  }

  /**
   * The hostname of the page on which the token was generated.
   * @param hostname hostname or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TokenProperties setHostname(java.lang.String hostname) {
    this.hostname = hostname;
    return this;
  }

  /**
   * Reason associated with the response when valid = false.
   * @return value or {@code null} for none
   */
  public java.lang.String getInvalidReason() {
    return invalidReason;
  }

  /**
   * Reason associated with the response when valid = false.
   * @param invalidReason invalidReason or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TokenProperties setInvalidReason(java.lang.String invalidReason) {
    this.invalidReason = invalidReason;
    return this;
  }

  /**
   * Whether the provided user response token is valid. When valid = false, the reason could be
   * specified in invalid_reason or it could also be due to a user failing to solve a challenge or a
   * sitekey mismatch (i.e the sitekey used to generate the token was different than the one
   * specified in the assessment).
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getValid() {
    return valid;
  }

  /**
   * Whether the provided user response token is valid. When valid = false, the reason could be
   * specified in invalid_reason or it could also be due to a user failing to solve a challenge or a
   * sitekey mismatch (i.e the sitekey used to generate the token was different than the one
   * specified in the assessment).
   * @param valid valid or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TokenProperties setValid(java.lang.Boolean valid) {
    this.valid = valid;
    return this;
  }

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

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

}
