/*
 * 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 request message to annotate an Assessment.
 *
 * <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 GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest extends com.google.api.client.json.GenericJson {

  /**
   * Optional. The annotation that will be assigned to the Event. This field can be left empty to
   * provide reasons that apply to an event without concluding whether the event is legitimate or
   * fraudulent.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String annotation;

  /**
   * Optional. Optional unique stable hashed user identifier to apply to the assessment. This is an
   * alternative to setting the hashed_account_id in CreateAssessment, for example when the account
   * identifier is not yet known in the initial request. It is recommended that the identifier is
   * 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. Optional reasons for the annotation that will be assigned to the Event.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> reasons;

  /**
   * Optional. The annotation that will be assigned to the Event. This field can be left empty to
   * provide reasons that apply to an event without concluding whether the event is legitimate or
   * fraudulent.
   * @return value or {@code null} for none
   */
  public java.lang.String getAnnotation() {
    return annotation;
  }

  /**
   * Optional. The annotation that will be assigned to the Event. This field can be left empty to
   * provide reasons that apply to an event without concluding whether the event is legitimate or
   * fraudulent.
   * @param annotation annotation or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest setAnnotation(java.lang.String annotation) {
    this.annotation = annotation;
    return this;
  }

  /**
   * Optional. Optional unique stable hashed user identifier to apply to the assessment. This is an
   * alternative to setting the hashed_account_id in CreateAssessment, for example when the account
   * identifier is not yet known in the initial request. It is recommended that the identifier is
   * hashed using hmac-sha256 with stable secret.
   * @see #decodeHashedAccountId()
   * @return value or {@code null} for none
   */
  public java.lang.String getHashedAccountId() {
    return hashedAccountId;
  }

  /**
   * Optional. Optional unique stable hashed user identifier to apply to the assessment. This is an
   * alternative to setting the hashed_account_id in CreateAssessment, for example when the account
   * identifier is not yet known in the initial request. It is recommended that the identifier is
   * 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. Optional unique stable hashed user identifier to apply to the assessment. This is an
   * alternative to setting the hashed_account_id in CreateAssessment, for example when the account
   * identifier is not yet known in the initial request. It is recommended that the identifier is
   * hashed using hmac-sha256 with stable secret.
   * @see #encodeHashedAccountId()
   * @param hashedAccountId hashedAccountId or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest setHashedAccountId(java.lang.String hashedAccountId) {
    this.hashedAccountId = hashedAccountId;
    return this;
  }

  /**
   * Optional. Optional unique stable hashed user identifier to apply to the assessment. This is an
   * alternative to setting the hashed_account_id in CreateAssessment, for example when the account
   * identifier is not yet known in the initial request. It is recommended that the identifier is
   * 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 GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest encodeHashedAccountId(byte[] hashedAccountId) {
    this.hashedAccountId = com.google.api.client.util.Base64.encodeBase64URLSafeString(hashedAccountId);
    return this;
  }

  /**
   * Optional. Optional reasons for the annotation that will be assigned to the Event.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getReasons() {
    return reasons;
  }

  /**
   * Optional. Optional reasons for the annotation that will be assigned to the Event.
   * @param reasons reasons or {@code null} for none
   */
  public GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest setReasons(java.util.List<java.lang.String> reasons) {
    this.reasons = reasons;
    return this;
  }

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

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

}
