/*
 * Copyright 2020 Google LLC
 *
 * 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
 *
 *     https://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.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto

package com.google.recaptchaenterprise.v1beta1;

/** Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.Event} */
public final class Event extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.recaptchaenterprise.v1beta1.Event)
    EventOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use Event.newBuilder() to construct.
  private Event(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private Event() {
    token_ = "";
    siteKey_ = "";
    userAgent_ = "";
    userIpAddress_ = "";
    expectedAction_ = "";
    hashedAccountId_ = com.google.protobuf.ByteString.EMPTY;
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new Event();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto
        .internal_static_google_cloud_recaptchaenterprise_v1beta1_Event_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto
        .internal_static_google_cloud_recaptchaenterprise_v1beta1_Event_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.recaptchaenterprise.v1beta1.Event.class,
            com.google.recaptchaenterprise.v1beta1.Event.Builder.class);
  }

  public static final int TOKEN_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object token_ = "";
  /**
   *
   *
   * <pre>
   * Optional. The user response token provided by the reCAPTCHA Enterprise
   * client-side integration on your site.
   * </pre>
   *
   * <code>string token = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The token.
   */
  @java.lang.Override
  public java.lang.String getToken() {
    java.lang.Object ref = token_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      token_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Optional. The user response token provided by the reCAPTCHA Enterprise
   * client-side integration on your site.
   * </pre>
   *
   * <code>string token = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The bytes for token.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getTokenBytes() {
    java.lang.Object ref = token_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      token_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SITE_KEY_FIELD_NUMBER = 2;

  @SuppressWarnings("serial")
  private volatile java.lang.Object siteKey_ = "";
  /**
   *
   *
   * <pre>
   * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your
   * site and generate the token.
   * </pre>
   *
   * <code>string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The siteKey.
   */
  @java.lang.Override
  public java.lang.String getSiteKey() {
    java.lang.Object ref = siteKey_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      siteKey_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your
   * site and generate the token.
   * </pre>
   *
   * <code>string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The bytes for siteKey.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getSiteKeyBytes() {
    java.lang.Object ref = siteKey_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      siteKey_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int USER_AGENT_FIELD_NUMBER = 3;

  @SuppressWarnings("serial")
  private volatile java.lang.Object userAgent_ = "";
  /**
   *
   *
   * <pre>
   * Optional. The user agent present in the request from the user's device
   * related to this event.
   * </pre>
   *
   * <code>string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The userAgent.
   */
  @java.lang.Override
  public java.lang.String getUserAgent() {
    java.lang.Object ref = userAgent_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      userAgent_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Optional. The user agent present in the request from the user's device
   * related to this event.
   * </pre>
   *
   * <code>string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The bytes for userAgent.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getUserAgentBytes() {
    java.lang.Object ref = userAgent_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      userAgent_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int USER_IP_ADDRESS_FIELD_NUMBER = 4;

  @SuppressWarnings("serial")
  private volatile java.lang.Object userIpAddress_ = "";
  /**
   *
   *
   * <pre>
   * Optional. The IP address in the request from the user's device related to
   * this event.
   * </pre>
   *
   * <code>string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The userIpAddress.
   */
  @java.lang.Override
  public java.lang.String getUserIpAddress() {
    java.lang.Object ref = userIpAddress_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      userIpAddress_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Optional. The IP address in the request from the user's device related to
   * this event.
   * </pre>
   *
   * <code>string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The bytes for userIpAddress.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getUserIpAddressBytes() {
    java.lang.Object ref = userIpAddress_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      userIpAddress_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int EXPECTED_ACTION_FIELD_NUMBER = 5;

  @SuppressWarnings("serial")
  private volatile java.lang.Object expectedAction_ = "";
  /**
   *
   *
   * <pre>
   * 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.
   * </pre>
   *
   * <code>string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The expectedAction.
   */
  @java.lang.Override
  public java.lang.String getExpectedAction() {
    java.lang.Object ref = expectedAction_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      expectedAction_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * 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.
   * </pre>
   *
   * <code>string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The bytes for expectedAction.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getExpectedActionBytes() {
    java.lang.Object ref = expectedAction_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      expectedAction_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int HASHED_ACCOUNT_ID_FIELD_NUMBER = 6;
  private com.google.protobuf.ByteString hashedAccountId_ = com.google.protobuf.ByteString.EMPTY;
  /**
   *
   *
   * <pre>
   * Optional. Unique stable hashed user identifier for the request. The
   * identifier must be hashed using hmac-sha256 with stable secret.
   * </pre>
   *
   * <code>bytes hashed_account_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
   *
   * @return The hashedAccountId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getHashedAccountId() {
    return hashedAccountId_;
  }

  public static final int TRANSACTION_DATA_FIELD_NUMBER = 13;
  private com.google.recaptchaenterprise.v1beta1.TransactionData transactionData_;
  /**
   *
   *
   * <pre>
   * Optional. Data describing a payment transaction to be assessed. Sending
   * this data enables reCAPTCHA Enterprise Fraud Prevention and the
   * FraudPreventionAssessment component in the response.
   * </pre>
   *
   * <code>
   * .google.cloud.recaptchaenterprise.v1beta1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return Whether the transactionData field is set.
   */
  @java.lang.Override
  public boolean hasTransactionData() {
    return transactionData_ != null;
  }
  /**
   *
   *
   * <pre>
   * Optional. Data describing a payment transaction to be assessed. Sending
   * this data enables reCAPTCHA Enterprise Fraud Prevention and the
   * FraudPreventionAssessment component in the response.
   * </pre>
   *
   * <code>
   * .google.cloud.recaptchaenterprise.v1beta1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The transactionData.
   */
  @java.lang.Override
  public com.google.recaptchaenterprise.v1beta1.TransactionData getTransactionData() {
    return transactionData_ == null
        ? com.google.recaptchaenterprise.v1beta1.TransactionData.getDefaultInstance()
        : transactionData_;
  }
  /**
   *
   *
   * <pre>
   * Optional. Data describing a payment transaction to be assessed. Sending
   * this data enables reCAPTCHA Enterprise Fraud Prevention and the
   * FraudPreventionAssessment component in the response.
   * </pre>
   *
   * <code>
   * .google.cloud.recaptchaenterprise.v1beta1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public com.google.recaptchaenterprise.v1beta1.TransactionDataOrBuilder
      getTransactionDataOrBuilder() {
    return transactionData_ == null
        ? com.google.recaptchaenterprise.v1beta1.TransactionData.getDefaultInstance()
        : transactionData_;
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, token_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(siteKey_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, siteKey_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgent_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userAgent_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userIpAddress_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userIpAddress_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expectedAction_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, expectedAction_);
    }
    if (!hashedAccountId_.isEmpty()) {
      output.writeBytes(6, hashedAccountId_);
    }
    if (transactionData_ != null) {
      output.writeMessage(13, getTransactionData());
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(siteKey_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, siteKey_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgent_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userAgent_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userIpAddress_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userIpAddress_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expectedAction_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, expectedAction_);
    }
    if (!hashedAccountId_.isEmpty()) {
      size += com.google.protobuf.CodedOutputStream.computeBytesSize(6, hashedAccountId_);
    }
    if (transactionData_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getTransactionData());
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.recaptchaenterprise.v1beta1.Event)) {
      return super.equals(obj);
    }
    com.google.recaptchaenterprise.v1beta1.Event other =
        (com.google.recaptchaenterprise.v1beta1.Event) obj;

    if (!getToken().equals(other.getToken())) return false;
    if (!getSiteKey().equals(other.getSiteKey())) return false;
    if (!getUserAgent().equals(other.getUserAgent())) return false;
    if (!getUserIpAddress().equals(other.getUserIpAddress())) return false;
    if (!getExpectedAction().equals(other.getExpectedAction())) return false;
    if (!getHashedAccountId().equals(other.getHashedAccountId())) return false;
    if (hasTransactionData() != other.hasTransactionData()) return false;
    if (hasTransactionData()) {
      if (!getTransactionData().equals(other.getTransactionData())) return false;
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + TOKEN_FIELD_NUMBER;
    hash = (53 * hash) + getToken().hashCode();
    hash = (37 * hash) + SITE_KEY_FIELD_NUMBER;
    hash = (53 * hash) + getSiteKey().hashCode();
    hash = (37 * hash) + USER_AGENT_FIELD_NUMBER;
    hash = (53 * hash) + getUserAgent().hashCode();
    hash = (37 * hash) + USER_IP_ADDRESS_FIELD_NUMBER;
    hash = (53 * hash) + getUserIpAddress().hashCode();
    hash = (37 * hash) + EXPECTED_ACTION_FIELD_NUMBER;
    hash = (53 * hash) + getExpectedAction().hashCode();
    hash = (37 * hash) + HASHED_ACCOUNT_ID_FIELD_NUMBER;
    hash = (53 * hash) + getHashedAccountId().hashCode();
    if (hasTransactionData()) {
      hash = (37 * hash) + TRANSACTION_DATA_FIELD_NUMBER;
      hash = (53 * hash) + getTransactionData().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.recaptchaenterprise.v1beta1.Event parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.recaptchaenterprise.v1beta1.Event parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.recaptchaenterprise.v1beta1.Event parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.recaptchaenterprise.v1beta1.Event parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.recaptchaenterprise.v1beta1.Event parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.recaptchaenterprise.v1beta1.Event parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.recaptchaenterprise.v1beta1.Event parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.recaptchaenterprise.v1beta1.Event parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.recaptchaenterprise.v1beta1.Event parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.recaptchaenterprise.v1beta1.Event parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.recaptchaenterprise.v1beta1.Event parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.recaptchaenterprise.v1beta1.Event parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.recaptchaenterprise.v1beta1.Event prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /** Protobuf type {@code google.cloud.recaptchaenterprise.v1beta1.Event} */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.recaptchaenterprise.v1beta1.Event)
      com.google.recaptchaenterprise.v1beta1.EventOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto
          .internal_static_google_cloud_recaptchaenterprise_v1beta1_Event_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto
          .internal_static_google_cloud_recaptchaenterprise_v1beta1_Event_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.recaptchaenterprise.v1beta1.Event.class,
              com.google.recaptchaenterprise.v1beta1.Event.Builder.class);
    }

    // Construct using com.google.recaptchaenterprise.v1beta1.Event.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      token_ = "";
      siteKey_ = "";
      userAgent_ = "";
      userIpAddress_ = "";
      expectedAction_ = "";
      hashedAccountId_ = com.google.protobuf.ByteString.EMPTY;
      transactionData_ = null;
      if (transactionDataBuilder_ != null) {
        transactionDataBuilder_.dispose();
        transactionDataBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.recaptchaenterprise.v1beta1.RecaptchaEnterpriseProto
          .internal_static_google_cloud_recaptchaenterprise_v1beta1_Event_descriptor;
    }

    @java.lang.Override
    public com.google.recaptchaenterprise.v1beta1.Event getDefaultInstanceForType() {
      return com.google.recaptchaenterprise.v1beta1.Event.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.recaptchaenterprise.v1beta1.Event build() {
      com.google.recaptchaenterprise.v1beta1.Event result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.recaptchaenterprise.v1beta1.Event buildPartial() {
      com.google.recaptchaenterprise.v1beta1.Event result =
          new com.google.recaptchaenterprise.v1beta1.Event(this);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartial0(com.google.recaptchaenterprise.v1beta1.Event result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.token_ = token_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.siteKey_ = siteKey_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.userAgent_ = userAgent_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.userIpAddress_ = userIpAddress_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.expectedAction_ = expectedAction_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.hashedAccountId_ = hashedAccountId_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.transactionData_ =
            transactionDataBuilder_ == null ? transactionData_ : transactionDataBuilder_.build();
      }
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.recaptchaenterprise.v1beta1.Event) {
        return mergeFrom((com.google.recaptchaenterprise.v1beta1.Event) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.recaptchaenterprise.v1beta1.Event other) {
      if (other == com.google.recaptchaenterprise.v1beta1.Event.getDefaultInstance()) return this;
      if (!other.getToken().isEmpty()) {
        token_ = other.token_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (!other.getSiteKey().isEmpty()) {
        siteKey_ = other.siteKey_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      if (!other.getUserAgent().isEmpty()) {
        userAgent_ = other.userAgent_;
        bitField0_ |= 0x00000004;
        onChanged();
      }
      if (!other.getUserIpAddress().isEmpty()) {
        userIpAddress_ = other.userIpAddress_;
        bitField0_ |= 0x00000008;
        onChanged();
      }
      if (!other.getExpectedAction().isEmpty()) {
        expectedAction_ = other.expectedAction_;
        bitField0_ |= 0x00000010;
        onChanged();
      }
      if (other.getHashedAccountId() != com.google.protobuf.ByteString.EMPTY) {
        setHashedAccountId(other.getHashedAccountId());
      }
      if (other.hasTransactionData()) {
        mergeTransactionData(other.getTransactionData());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                token_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 18:
              {
                siteKey_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 18
            case 26:
              {
                userAgent_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            case 34:
              {
                userIpAddress_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000008;
                break;
              } // case 34
            case 42:
              {
                expectedAction_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000010;
                break;
              } // case 42
            case 50:
              {
                hashedAccountId_ = input.readBytes();
                bitField0_ |= 0x00000020;
                break;
              } // case 50
            case 106:
              {
                input.readMessage(getTransactionDataFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000040;
                break;
              } // case 106
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.lang.Object token_ = "";
    /**
     *
     *
     * <pre>
     * Optional. The user response token provided by the reCAPTCHA Enterprise
     * client-side integration on your site.
     * </pre>
     *
     * <code>string token = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The token.
     */
    public java.lang.String getToken() {
      java.lang.Object ref = token_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        token_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The user response token provided by the reCAPTCHA Enterprise
     * client-side integration on your site.
     * </pre>
     *
     * <code>string token = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The bytes for token.
     */
    public com.google.protobuf.ByteString getTokenBytes() {
      java.lang.Object ref = token_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        token_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The user response token provided by the reCAPTCHA Enterprise
     * client-side integration on your site.
     * </pre>
     *
     * <code>string token = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The token to set.
     * @return This builder for chaining.
     */
    public Builder setToken(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      token_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The user response token provided by the reCAPTCHA Enterprise
     * client-side integration on your site.
     * </pre>
     *
     * <code>string token = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearToken() {
      token_ = getDefaultInstance().getToken();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The user response token provided by the reCAPTCHA Enterprise
     * client-side integration on your site.
     * </pre>
     *
     * <code>string token = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The bytes for token to set.
     * @return This builder for chaining.
     */
    public Builder setTokenBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      token_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private java.lang.Object siteKey_ = "";
    /**
     *
     *
     * <pre>
     * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your
     * site and generate the token.
     * </pre>
     *
     * <code>string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The siteKey.
     */
    public java.lang.String getSiteKey() {
      java.lang.Object ref = siteKey_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        siteKey_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your
     * site and generate the token.
     * </pre>
     *
     * <code>string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The bytes for siteKey.
     */
    public com.google.protobuf.ByteString getSiteKeyBytes() {
      java.lang.Object ref = siteKey_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        siteKey_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your
     * site and generate the token.
     * </pre>
     *
     * <code>string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The siteKey to set.
     * @return This builder for chaining.
     */
    public Builder setSiteKey(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      siteKey_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your
     * site and generate the token.
     * </pre>
     *
     * <code>string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearSiteKey() {
      siteKey_ = getDefaultInstance().getSiteKey();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The site key that was used to invoke reCAPTCHA Enterprise on your
     * site and generate the token.
     * </pre>
     *
     * <code>string site_key = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The bytes for siteKey to set.
     * @return This builder for chaining.
     */
    public Builder setSiteKeyBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      siteKey_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    private java.lang.Object userAgent_ = "";
    /**
     *
     *
     * <pre>
     * Optional. The user agent present in the request from the user's device
     * related to this event.
     * </pre>
     *
     * <code>string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The userAgent.
     */
    public java.lang.String getUserAgent() {
      java.lang.Object ref = userAgent_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        userAgent_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The user agent present in the request from the user's device
     * related to this event.
     * </pre>
     *
     * <code>string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The bytes for userAgent.
     */
    public com.google.protobuf.ByteString getUserAgentBytes() {
      java.lang.Object ref = userAgent_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        userAgent_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The user agent present in the request from the user's device
     * related to this event.
     * </pre>
     *
     * <code>string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The userAgent to set.
     * @return This builder for chaining.
     */
    public Builder setUserAgent(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      userAgent_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The user agent present in the request from the user's device
     * related to this event.
     * </pre>
     *
     * <code>string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearUserAgent() {
      userAgent_ = getDefaultInstance().getUserAgent();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The user agent present in the request from the user's device
     * related to this event.
     * </pre>
     *
     * <code>string user_agent = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The bytes for userAgent to set.
     * @return This builder for chaining.
     */
    public Builder setUserAgentBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      userAgent_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    private java.lang.Object userIpAddress_ = "";
    /**
     *
     *
     * <pre>
     * Optional. The IP address in the request from the user's device related to
     * this event.
     * </pre>
     *
     * <code>string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The userIpAddress.
     */
    public java.lang.String getUserIpAddress() {
      java.lang.Object ref = userIpAddress_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        userIpAddress_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The IP address in the request from the user's device related to
     * this event.
     * </pre>
     *
     * <code>string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The bytes for userIpAddress.
     */
    public com.google.protobuf.ByteString getUserIpAddressBytes() {
      java.lang.Object ref = userIpAddress_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        userIpAddress_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The IP address in the request from the user's device related to
     * this event.
     * </pre>
     *
     * <code>string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The userIpAddress to set.
     * @return This builder for chaining.
     */
    public Builder setUserIpAddress(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      userIpAddress_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The IP address in the request from the user's device related to
     * this event.
     * </pre>
     *
     * <code>string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearUserIpAddress() {
      userIpAddress_ = getDefaultInstance().getUserIpAddress();
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The IP address in the request from the user's device related to
     * this event.
     * </pre>
     *
     * <code>string user_ip_address = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The bytes for userIpAddress to set.
     * @return This builder for chaining.
     */
    public Builder setUserIpAddressBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      userIpAddress_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }

    private java.lang.Object expectedAction_ = "";
    /**
     *
     *
     * <pre>
     * 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.
     * </pre>
     *
     * <code>string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The expectedAction.
     */
    public java.lang.String getExpectedAction() {
      java.lang.Object ref = expectedAction_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        expectedAction_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * 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.
     * </pre>
     *
     * <code>string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The bytes for expectedAction.
     */
    public com.google.protobuf.ByteString getExpectedActionBytes() {
      java.lang.Object ref = expectedAction_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        expectedAction_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * 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.
     * </pre>
     *
     * <code>string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The expectedAction to set.
     * @return This builder for chaining.
     */
    public Builder setExpectedAction(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      expectedAction_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * 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.
     * </pre>
     *
     * <code>string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearExpectedAction() {
      expectedAction_ = getDefaultInstance().getExpectedAction();
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * 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.
     * </pre>
     *
     * <code>string expected_action = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The bytes for expectedAction to set.
     * @return This builder for chaining.
     */
    public Builder setExpectedActionBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      expectedAction_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }

    private com.google.protobuf.ByteString hashedAccountId_ = com.google.protobuf.ByteString.EMPTY;
    /**
     *
     *
     * <pre>
     * Optional. Unique stable hashed user identifier for the request. The
     * identifier must be hashed using hmac-sha256 with stable secret.
     * </pre>
     *
     * <code>bytes hashed_account_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The hashedAccountId.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getHashedAccountId() {
      return hashedAccountId_;
    }
    /**
     *
     *
     * <pre>
     * Optional. Unique stable hashed user identifier for the request. The
     * identifier must be hashed using hmac-sha256 with stable secret.
     * </pre>
     *
     * <code>bytes hashed_account_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @param value The hashedAccountId to set.
     * @return This builder for chaining.
     */
    public Builder setHashedAccountId(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      hashedAccountId_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Unique stable hashed user identifier for the request. The
     * identifier must be hashed using hmac-sha256 with stable secret.
     * </pre>
     *
     * <code>bytes hashed_account_id = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearHashedAccountId() {
      bitField0_ = (bitField0_ & ~0x00000020);
      hashedAccountId_ = getDefaultInstance().getHashedAccountId();
      onChanged();
      return this;
    }

    private com.google.recaptchaenterprise.v1beta1.TransactionData transactionData_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.recaptchaenterprise.v1beta1.TransactionData,
            com.google.recaptchaenterprise.v1beta1.TransactionData.Builder,
            com.google.recaptchaenterprise.v1beta1.TransactionDataOrBuilder>
        transactionDataBuilder_;
    /**
     *
     *
     * <pre>
     * Optional. Data describing a payment transaction to be assessed. Sending
     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
     * FraudPreventionAssessment component in the response.
     * </pre>
     *
     * <code>
     * .google.cloud.recaptchaenterprise.v1beta1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return Whether the transactionData field is set.
     */
    public boolean hasTransactionData() {
      return ((bitField0_ & 0x00000040) != 0);
    }
    /**
     *
     *
     * <pre>
     * Optional. Data describing a payment transaction to be assessed. Sending
     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
     * FraudPreventionAssessment component in the response.
     * </pre>
     *
     * <code>
     * .google.cloud.recaptchaenterprise.v1beta1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The transactionData.
     */
    public com.google.recaptchaenterprise.v1beta1.TransactionData getTransactionData() {
      if (transactionDataBuilder_ == null) {
        return transactionData_ == null
            ? com.google.recaptchaenterprise.v1beta1.TransactionData.getDefaultInstance()
            : transactionData_;
      } else {
        return transactionDataBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. Data describing a payment transaction to be assessed. Sending
     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
     * FraudPreventionAssessment component in the response.
     * </pre>
     *
     * <code>
     * .google.cloud.recaptchaenterprise.v1beta1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setTransactionData(
        com.google.recaptchaenterprise.v1beta1.TransactionData value) {
      if (transactionDataBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        transactionData_ = value;
      } else {
        transactionDataBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Data describing a payment transaction to be assessed. Sending
     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
     * FraudPreventionAssessment component in the response.
     * </pre>
     *
     * <code>
     * .google.cloud.recaptchaenterprise.v1beta1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder setTransactionData(
        com.google.recaptchaenterprise.v1beta1.TransactionData.Builder builderForValue) {
      if (transactionDataBuilder_ == null) {
        transactionData_ = builderForValue.build();
      } else {
        transactionDataBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Data describing a payment transaction to be assessed. Sending
     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
     * FraudPreventionAssessment component in the response.
     * </pre>
     *
     * <code>
     * .google.cloud.recaptchaenterprise.v1beta1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder mergeTransactionData(
        com.google.recaptchaenterprise.v1beta1.TransactionData value) {
      if (transactionDataBuilder_ == null) {
        if (((bitField0_ & 0x00000040) != 0)
            && transactionData_ != null
            && transactionData_
                != com.google.recaptchaenterprise.v1beta1.TransactionData.getDefaultInstance()) {
          getTransactionDataBuilder().mergeFrom(value);
        } else {
          transactionData_ = value;
        }
      } else {
        transactionDataBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Data describing a payment transaction to be assessed. Sending
     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
     * FraudPreventionAssessment component in the response.
     * </pre>
     *
     * <code>
     * .google.cloud.recaptchaenterprise.v1beta1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder clearTransactionData() {
      bitField0_ = (bitField0_ & ~0x00000040);
      transactionData_ = null;
      if (transactionDataBuilder_ != null) {
        transactionDataBuilder_.dispose();
        transactionDataBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. Data describing a payment transaction to be assessed. Sending
     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
     * FraudPreventionAssessment component in the response.
     * </pre>
     *
     * <code>
     * .google.cloud.recaptchaenterprise.v1beta1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.recaptchaenterprise.v1beta1.TransactionData.Builder
        getTransactionDataBuilder() {
      bitField0_ |= 0x00000040;
      onChanged();
      return getTransactionDataFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Optional. Data describing a payment transaction to be assessed. Sending
     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
     * FraudPreventionAssessment component in the response.
     * </pre>
     *
     * <code>
     * .google.cloud.recaptchaenterprise.v1beta1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.recaptchaenterprise.v1beta1.TransactionDataOrBuilder
        getTransactionDataOrBuilder() {
      if (transactionDataBuilder_ != null) {
        return transactionDataBuilder_.getMessageOrBuilder();
      } else {
        return transactionData_ == null
            ? com.google.recaptchaenterprise.v1beta1.TransactionData.getDefaultInstance()
            : transactionData_;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. Data describing a payment transaction to be assessed. Sending
     * this data enables reCAPTCHA Enterprise Fraud Prevention and the
     * FraudPreventionAssessment component in the response.
     * </pre>
     *
     * <code>
     * .google.cloud.recaptchaenterprise.v1beta1.TransactionData transaction_data = 13 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.recaptchaenterprise.v1beta1.TransactionData,
            com.google.recaptchaenterprise.v1beta1.TransactionData.Builder,
            com.google.recaptchaenterprise.v1beta1.TransactionDataOrBuilder>
        getTransactionDataFieldBuilder() {
      if (transactionDataBuilder_ == null) {
        transactionDataBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.recaptchaenterprise.v1beta1.TransactionData,
                com.google.recaptchaenterprise.v1beta1.TransactionData.Builder,
                com.google.recaptchaenterprise.v1beta1.TransactionDataOrBuilder>(
                getTransactionData(), getParentForChildren(), isClean());
        transactionData_ = null;
      }
      return transactionDataBuilder_;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.cloud.recaptchaenterprise.v1beta1.Event)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.recaptchaenterprise.v1beta1.Event)
  private static final com.google.recaptchaenterprise.v1beta1.Event DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.recaptchaenterprise.v1beta1.Event();
  }

  public static com.google.recaptchaenterprise.v1beta1.Event getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<Event> PARSER =
      new com.google.protobuf.AbstractParser<Event>() {
        @java.lang.Override
        public Event parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

  public static com.google.protobuf.Parser<Event> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<Event> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.recaptchaenterprise.v1beta1.Event getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
