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

/**
 * The event being assessed.
 *
 * <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 GoogleCloudRecaptchaenterpriseV1Event extends com.google.api.client.json.GenericJson {

  /**
   * Optional. The expected action for this type of event. This should be the same action provided
   * at token generation time on client-side platforms already integrated with recaptcha enterprise.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String expectedAction;

  /**
   * Optional. Flag for a reCAPTCHA express request for an assessment without a token. If enabled,
   * `site_key` must reference a SCORE key with WAF feature set to EXPRESS.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean express;

  /**
   * Optional. Flag for enabling firewall policy config assessment. If this flag is enabled, the
   * firewall policy will be evaluated and a suggested firewall action will be returned in the
   * response.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean firewallPolicyEvaluation;

  /**
   * Optional. Unique stable hashed user identifier for the request. The identifier must be hashed
   * using hmac-sha256 with stable secret.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String hashedAccountId;

  /**
   * Optional. HTTP header information about the request.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> headers;

  /**
   * Optional. Optional JA3 fingerprint for SSL clients.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String ja3;

  /**
   * Optional. The URI resource the user requested that triggered an assessment.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String requestedUri;

  /**
   * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your site and generate
   * the token.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String siteKey;

  /**
   * Optional. The user response token provided by the reCAPTCHA Enterprise client-side integration
   * on your site.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String token;

  /**
   * Optional. Data describing a payment transaction to be assessed. Sending this data enables
   * reCAPTCHA Enterprise Fraud Prevention and the FraudPreventionAssessment component in the
   * response.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudRecaptchaenterpriseV1TransactionData transactionData;

  /**
   * Optional. The user agent present in the request from the user's device related to this event.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String userAgent;

  /**
   * Optional. The IP address in the request from the user's device related to this event.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String userIpAddress;

  /**
   * Optional. Flag for running WAF token assessment. If enabled, the token must be specified, and
   * have been created by a WAF-enabled key.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean wafTokenAssessment;

  /**
   * Optional. The expected action for this type of event. This should be the same action provided
   * at token generation time on client-side platforms already integrated with recaptcha enterprise.
   * @return value or {@code null} for none
   */
  public java.lang.String getExpectedAction() {
    return expectedAction;
  }

  /**
   * Optional. The expected action for this type of event. This should be the same action provided
   * at token generation time on client-side platforms already integrated with recaptcha enterprise.
   * @param expectedAction expectedAction or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1Event setExpectedAction(java.lang.String expectedAction) {
    this.expectedAction = expectedAction;
    return this;
  }

  /**
   * Optional. Flag for a reCAPTCHA express request for an assessment without a token. If enabled,
   * `site_key` must reference a SCORE key with WAF feature set to EXPRESS.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getExpress() {
    return express;
  }

  /**
   * Optional. Flag for a reCAPTCHA express request for an assessment without a token. If enabled,
   * `site_key` must reference a SCORE key with WAF feature set to EXPRESS.
   * @param express express or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1Event setExpress(java.lang.Boolean express) {
    this.express = express;
    return this;
  }

  /**
   * Optional. Flag for enabling firewall policy config assessment. If this flag is enabled, the
   * firewall policy will be evaluated and a suggested firewall action will be returned in the
   * response.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getFirewallPolicyEvaluation() {
    return firewallPolicyEvaluation;
  }

  /**
   * Optional. Flag for enabling firewall policy config assessment. If this flag is enabled, the
   * firewall policy will be evaluated and a suggested firewall action will be returned in the
   * response.
   * @param firewallPolicyEvaluation firewallPolicyEvaluation or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1Event setFirewallPolicyEvaluation(java.lang.Boolean firewallPolicyEvaluation) {
    this.firewallPolicyEvaluation = firewallPolicyEvaluation;
    return this;
  }

  /**
   * Optional. Unique stable hashed user identifier for the request. The identifier must be hashed
   * using hmac-sha256 with stable secret.
   * @see #decodeHashedAccountId()
   * @return value or {@code null} for none
   */
  public java.lang.String getHashedAccountId() {
    return hashedAccountId;
  }

  /**
   * Optional. Unique stable hashed user identifier for the request. The identifier must be hashed
   * using hmac-sha256 with stable secret.
   * @see #getHashedAccountId()
   * @return Base64 decoded value or {@code null} for none
   *
   * @since 1.14
   */
  public byte[] decodeHashedAccountId() {
    return com.google.api.client.util.Base64.decodeBase64(hashedAccountId);
  }

  /**
   * Optional. Unique stable hashed user identifier for the request. The identifier must be hashed
   * using hmac-sha256 with stable secret.
   * @see #encodeHashedAccountId()
   * @param hashedAccountId hashedAccountId or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1Event setHashedAccountId(java.lang.String hashedAccountId) {
    this.hashedAccountId = hashedAccountId;
    return this;
  }

  /**
   * Optional. Unique stable hashed user identifier for the request. The identifier must be hashed
   * using hmac-sha256 with stable secret.
   * @see #setHashedAccountId()
   *
   * <p>
   * The value is encoded Base64 or {@code null} for none.
   * </p>
   *
   * @since 1.14
   */
  public GoogleCloudRecaptchaenterpriseV1Event encodeHashedAccountId(byte[] hashedAccountId) {
    this.hashedAccountId = com.google.api.client.util.Base64.encodeBase64URLSafeString(hashedAccountId);
    return this;
  }

  /**
   * Optional. HTTP header information about the request.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getHeaders() {
    return headers;
  }

  /**
   * Optional. HTTP header information about the request.
   * @param headers headers or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1Event setHeaders(java.util.List<java.lang.String> headers) {
    this.headers = headers;
    return this;
  }

  /**
   * Optional. Optional JA3 fingerprint for SSL clients.
   * @return value or {@code null} for none
   */
  public java.lang.String getJa3() {
    return ja3;
  }

  /**
   * Optional. Optional JA3 fingerprint for SSL clients.
   * @param ja3 ja3 or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1Event setJa3(java.lang.String ja3) {
    this.ja3 = ja3;
    return this;
  }

  /**
   * Optional. The URI resource the user requested that triggered an assessment.
   * @return value or {@code null} for none
   */
  public java.lang.String getRequestedUri() {
    return requestedUri;
  }

  /**
   * Optional. The URI resource the user requested that triggered an assessment.
   * @param requestedUri requestedUri or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1Event setRequestedUri(java.lang.String requestedUri) {
    this.requestedUri = requestedUri;
    return this;
  }

  /**
   * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your site and generate
   * the token.
   * @return value or {@code null} for none
   */
  public java.lang.String getSiteKey() {
    return siteKey;
  }

  /**
   * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your site and generate
   * the token.
   * @param siteKey siteKey or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1Event setSiteKey(java.lang.String siteKey) {
    this.siteKey = siteKey;
    return this;
  }

  /**
   * Optional. The user response token provided by the reCAPTCHA Enterprise client-side integration
   * on your site.
   * @return value or {@code null} for none
   */
  public java.lang.String getToken() {
    return token;
  }

  /**
   * Optional. The user response token provided by the reCAPTCHA Enterprise client-side integration
   * on your site.
   * @param token token or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1Event setToken(java.lang.String token) {
    this.token = token;
    return this;
  }

  /**
   * Optional. Data describing a payment transaction to be assessed. Sending this data enables
   * reCAPTCHA Enterprise Fraud Prevention and the FraudPreventionAssessment component in the
   * response.
   * @return value or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1TransactionData getTransactionData() {
    return transactionData;
  }

  /**
   * Optional. Data describing a payment transaction to be assessed. Sending this data enables
   * reCAPTCHA Enterprise Fraud Prevention and the FraudPreventionAssessment component in the
   * response.
   * @param transactionData transactionData or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1Event setTransactionData(GoogleCloudRecaptchaenterpriseV1TransactionData transactionData) {
    this.transactionData = transactionData;
    return this;
  }

  /**
   * Optional. The user agent present in the request from the user's device related to this event.
   * @return value or {@code null} for none
   */
  public java.lang.String getUserAgent() {
    return userAgent;
  }

  /**
   * Optional. The user agent present in the request from the user's device related to this event.
   * @param userAgent userAgent or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1Event setUserAgent(java.lang.String userAgent) {
    this.userAgent = userAgent;
    return this;
  }

  /**
   * Optional. The IP address in the request from the user's device related to this event.
   * @return value or {@code null} for none
   */
  public java.lang.String getUserIpAddress() {
    return userIpAddress;
  }

  /**
   * Optional. The IP address in the request from the user's device related to this event.
   * @param userIpAddress userIpAddress or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1Event setUserIpAddress(java.lang.String userIpAddress) {
    this.userIpAddress = userIpAddress;
    return this;
  }

  /**
   * Optional. Flag for running WAF token assessment. If enabled, the token must be specified, and
   * have been created by a WAF-enabled key.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getWafTokenAssessment() {
    return wafTokenAssessment;
  }

  /**
   * Optional. Flag for running WAF token assessment. If enabled, the token must be specified, and
   * have been created by a WAF-enabled key.
   * @param wafTokenAssessment wafTokenAssessment or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1Event setWafTokenAssessment(java.lang.Boolean wafTokenAssessment) {
    this.wafTokenAssessment = wafTokenAssessment;
    return this;
  }

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

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

}
