text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/dialogflow/cx/v3/webhook.proto

package com.google.cloud.dialogflow.cx.v3;

/**
 *
 *
 *

 * The response message for a webhook call.
 *

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

  private WebhookResponse() {}

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

  @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.cloud.dialogflow.cx.v3.WebhookProto
        .internal_static_google_cloud_dialogflow_cx_v3_WebhookResponse_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.dialogflow.cx.v3.WebhookProto
        .internal_static_google_cloud_dialogflow_cx_v3_WebhookResponse_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.dialogflow.cx.v3.WebhookResponse.class,
            com.google.cloud.dialogflow.cx.v3.WebhookResponse.Builder.class);
  }

  public interface FulfillmentResponseOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     *

     * The list of rich message responses to present to the user.
     *

     *
     * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
     */
    java.util.List<com.google.cloud.dialogflow.cx.v3.ResponseMessage> getMessagesList();
    /**
     *
     *
     *

     * The list of rich message responses to present to the user.
     *

     *
     * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
     */
    com.google.cloud.dialogflow.cx.v3.ResponseMessage getMessages(int index);
    /**
     *
     *
     *

     * The list of rich message responses to present to the user.
     *

     *
     * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
     */
    int getMessagesCount();
    /**
     *
     *
     *

     * The list of rich message responses to present to the user.
     *

     *
     * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
     */
    java.util.List<? extends com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder>
        getMessagesOrBuilderList();
    /**
     *
     *
     *

     * The list of rich message responses to present to the user.
     *

     *
     * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
     */
    com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getMessagesOrBuilder(int index);

    /**
     *
     *
     *

     * Merge behavior for `messages`.
     *

     *
     *
     * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2;
     *
     *
     * @return The enum numeric value on the wire for mergeBehavior.
     */
    int getMergeBehaviorValue();
    /**
     *
     *
     *

     * Merge behavior for `messages`.
     *

     *
     *
     * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2;
     *
     *
     * @return The mergeBehavior.
     */
    com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior
        getMergeBehavior();
  }
  /**
   *
   *
   *

   * Represents a fulfillment response to the user.
   *

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

    private FulfillmentResponse() {
      messages_ = java.util.Collections.emptyList();
      mergeBehavior_ = 0;
    }

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

    @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.cloud.dialogflow.cx.v3.WebhookProto
          .internal_static_google_cloud_dialogflow_cx_v3_WebhookResponse_FulfillmentResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.dialogflow.cx.v3.WebhookProto
          .internal_static_google_cloud_dialogflow_cx_v3_WebhookResponse_FulfillmentResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.class,
              com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.Builder.class);
    }

    /**
     *
     *
     *

     * Defines merge behavior for `messages`.
     *

     *
     * Protobuf enum {@code
     * google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior}
     */
    public enum MergeBehavior implements com.google.protobuf.ProtocolMessageEnum {
      /**
       *
       *
       *

       * Not specified. `APPEND` will be used.
       *

       *
       * MERGE_BEHAVIOR_UNSPECIFIED = 0;
       */
      MERGE_BEHAVIOR_UNSPECIFIED(0),
      /**
       *
       *
       *

       * `messages` will be appended to the list of messages waiting to be sent
       * to the user.
       *

       *
       * APPEND = 1;
       */
      APPEND(1),
      /**
       *
       *
       *

       * `messages` will replace the list of messages waiting to be sent to the
       * user.
       *

       *
       * REPLACE = 2;
       */
      REPLACE(2),
      UNRECOGNIZED(-1),
      ;

      /**
       *
       *
       *

       * Not specified. `APPEND` will be used.
       *

       *
       * MERGE_BEHAVIOR_UNSPECIFIED = 0;
       */
      public static final int MERGE_BEHAVIOR_UNSPECIFIED_VALUE = 0;
      /**
       *
       *
       *

       * `messages` will be appended to the list of messages waiting to be sent
       * to the user.
       *

       *
       * APPEND = 1;
       */
      public static final int APPEND_VALUE = 1;
      /**
       *
       *
       *

       * `messages` will replace the list of messages waiting to be sent to the
       * user.
       *

       *
       * REPLACE = 2;
       */
      public static final int REPLACE_VALUE = 2;

      public final int getNumber() {
        if (this == UNRECOGNIZED) {
          throw new java.lang.IllegalArgumentException(
              "Can't get the number of an unknown enum value.");
        }
        return value;
      }

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static MergeBehavior valueOf(int value) {
        return forNumber(value);
      }

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       */
      public static MergeBehavior forNumber(int value) {
        switch (value) {
          case 0:
            return MERGE_BEHAVIOR_UNSPECIFIED;
          case 1:
            return APPEND;
          case 2:
            return REPLACE;
          default:
            return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<MergeBehavior> internalGetValueMap() {
        return internalValueMap;
      }

      private static final com.google.protobuf.Internal.EnumLiteMap<MergeBehavior>
          internalValueMap =
              new com.google.protobuf.Internal.EnumLiteMap<MergeBehavior>() {
                public MergeBehavior findValueByNumber(int number) {
                  return MergeBehavior.forNumber(number);
                }
              };

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
        if (this == UNRECOGNIZED) {
          throw new java.lang.IllegalStateException(
              "Can't get the descriptor of an unrecognized enum value.");
        }
        return getDescriptor().getValues().get(ordinal());
      }

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
        return getDescriptor();
      }

      public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
        return com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.getDescriptor()
            .getEnumTypes()
            .get(0);
      }

      private static final MergeBehavior[] VALUES = values();

      public static MergeBehavior valueOf(
          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
          throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
        }
        if (desc.getIndex() == -1) {
          return UNRECOGNIZED;
        }
        return VALUES[desc.getIndex()];
      }

      private final int value;

      private MergeBehavior(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior)
    }

    public static final int MESSAGES_FIELD_NUMBER = 1;
    private java.util.List<com.google.cloud.dialogflow.cx.v3.ResponseMessage> messages_;
    /**
     *
     *
     *

     * The list of rich message responses to present to the user.
     *

     *
     * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
     */
    @java.lang.Override
    public java.util.List<com.google.cloud.dialogflow.cx.v3.ResponseMessage> getMessagesList() {
      return messages_;
    }
    /**
     *
     *
     *

     * The list of rich message responses to present to the user.
     *

     *
     * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
     */
    @java.lang.Override
    public java.util.List<? extends com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder>
        getMessagesOrBuilderList() {
      return messages_;
    }
    /**
     *
     *
     *

     * The list of rich message responses to present to the user.
     *

     *
     * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
     */
    @java.lang.Override
    public int getMessagesCount() {
      return messages_.size();
    }
    /**
     *
     *
     *

     * The list of rich message responses to present to the user.
     *

     *
     * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
     */
    @java.lang.Override
    public com.google.cloud.dialogflow.cx.v3.ResponseMessage getMessages(int index) {
      return messages_.get(index);
    }
    /**
     *
     *
     *

     * The list of rich message responses to present to the user.
     *

     *
     * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
     */
    @java.lang.Override
    public com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getMessagesOrBuilder(
        int index) {
      return messages_.get(index);
    }

    public static final int MERGE_BEHAVIOR_FIELD_NUMBER = 2;
    private int mergeBehavior_;
    /**
     *
     *
     *

     * Merge behavior for `messages`.
     *

     *
     *
     * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2;
     *
     *
     * @return The enum numeric value on the wire for mergeBehavior.
     */
    @java.lang.Override
    public int getMergeBehaviorValue() {
      return mergeBehavior_;
    }
    /**
     *
     *
     *

     * Merge behavior for `messages`.
     *

     *
     *
     * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2;
     *
     *
     * @return The mergeBehavior.
     */
    @java.lang.Override
    public com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior
        getMergeBehavior() {
      @SuppressWarnings("deprecation")
      com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior result =
          com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior
              .valueOf(mergeBehavior_);
      return result == null
          ? com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior
              .UNRECOGNIZED
          : result;
    }

    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 {
      for (int i = 0; i < messages_.size(); i++) {
        output.writeMessage(1, messages_.get(i));
      }
      if (mergeBehavior_
          != com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior
              .MERGE_BEHAVIOR_UNSPECIFIED
              .getNumber()) {
        output.writeEnum(2, mergeBehavior_);
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      for (int i = 0; i < messages_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, messages_.get(i));
      }
      if (mergeBehavior_
          != com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior
              .MERGE_BEHAVIOR_UNSPECIFIED
              .getNumber()) {
        size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, mergeBehavior_);
      }
      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.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse)) {
        return super.equals(obj);
      }
      com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse other =
          (com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse) obj;

      if (!getMessagesList().equals(other.getMessagesList())) return false;
      if (mergeBehavior_ != other.mergeBehavior_) 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();
      if (getMessagesCount() > 0) {
        hash = (37 * hash) + MESSAGES_FIELD_NUMBER;
        hash = (53 * hash) + getMessagesList().hashCode();
      }
      hash = (37 * hash) + MERGE_BEHAVIOR_FIELD_NUMBER;
      hash = (53 * hash) + mergeBehavior_;
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse parseFrom(
        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse 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.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse parseFrom(
        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse 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.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse
        parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse
        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.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse 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.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse 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;
    }
    /**
     *
     *
     *

     * Represents a fulfillment response to the user.
     *

     *
     * Protobuf type {@code google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse)
        com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponseOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.dialogflow.cx.v3.WebhookProto
            .internal_static_google_cloud_dialogflow_cx_v3_WebhookResponse_FulfillmentResponse_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.dialogflow.cx.v3.WebhookProto
            .internal_static_google_cloud_dialogflow_cx_v3_WebhookResponse_FulfillmentResponse_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.class,
                com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.Builder
                    .class);
      }

      // Construct using
      // com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.newBuilder()
      private Builder() {}

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        if (messagesBuilder_ == null) {
          messages_ = java.util.Collections.emptyList();
        } else {
          messages_ = null;
          messagesBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        mergeBehavior_ = 0;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.dialogflow.cx.v3.WebhookProto
            .internal_static_google_cloud_dialogflow_cx_v3_WebhookResponse_FulfillmentResponse_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse
          getDefaultInstanceForType() {
        return com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse
            .getDefaultInstance();
      }

      @java.lang.Override
      public com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse build() {
        com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse result =
            buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse buildPartial() {
        com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse result =
            new com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse(this);
        int from_bitField0_ = bitField0_;
        if (messagesBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            messages_ = java.util.Collections.unmodifiableList(messages_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.messages_ = messages_;
        } else {
          result.messages_ = messagesBuilder_.build();
        }
        result.mergeBehavior_ = mergeBehavior_;
        onBuilt();
        return result;
      }

      @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.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse) {
          return mergeFrom(
              (com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse other) {
        if (other
            == com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse
                .getDefaultInstance()) return this;
        if (messagesBuilder_ == null) {
          if (!other.messages_.isEmpty()) {
            if (messages_.isEmpty()) {
              messages_ = other.messages_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureMessagesIsMutable();
              messages_.addAll(other.messages_);
            }
            onChanged();
          }
        } else {
          if (!other.messages_.isEmpty()) {
            if (messagesBuilder_.isEmpty()) {
              messagesBuilder_.dispose();
              messagesBuilder_ = null;
              messages_ = other.messages_;
              bitField0_ = (bitField0_ & ~0x00000001);
              messagesBuilder_ =
                  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                      ? getMessagesFieldBuilder()
                      : null;
            } else {
              messagesBuilder_.addAllMessages(other.messages_);
            }
          }
        }
        if (other.mergeBehavior_ != 0) {
          setMergeBehaviorValue(other.getMergeBehaviorValue());
        }
        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:
                {
                  com.google.cloud.dialogflow.cx.v3.ResponseMessage m =
                      input.readMessage(
                          com.google.cloud.dialogflow.cx.v3.ResponseMessage.parser(),
                          extensionRegistry);
                  if (messagesBuilder_ == null) {
                    ensureMessagesIsMutable();
                    messages_.add(m);
                  } else {
                    messagesBuilder_.addMessage(m);
                  }
                  break;
                } // case 10
              case 16:
                {
                  mergeBehavior_ = input.readEnum();

                  break;
                } // case 16
              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.util.List<com.google.cloud.dialogflow.cx.v3.ResponseMessage> messages_ =
          java.util.Collections.emptyList();

      private void ensureMessagesIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          messages_ =
              new java.util.ArrayList<com.google.cloud.dialogflow.cx.v3.ResponseMessage>(messages_);
          bitField0_ |= 0x00000001;
        }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.cloud.dialogflow.cx.v3.ResponseMessage,
              com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder,
              com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder>
          messagesBuilder_;

      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public java.util.List<com.google.cloud.dialogflow.cx.v3.ResponseMessage> getMessagesList() {
        if (messagesBuilder_ == null) {
          return java.util.Collections.unmodifiableList(messages_);
        } else {
          return messagesBuilder_.getMessageList();
        }
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public int getMessagesCount() {
        if (messagesBuilder_ == null) {
          return messages_.size();
        } else {
          return messagesBuilder_.getCount();
        }
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public com.google.cloud.dialogflow.cx.v3.ResponseMessage getMessages(int index) {
        if (messagesBuilder_ == null) {
          return messages_.get(index);
        } else {
          return messagesBuilder_.getMessage(index);
        }
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public Builder setMessages(
          int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage value) {
        if (messagesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMessagesIsMutable();
          messages_.set(index, value);
          onChanged();
        } else {
          messagesBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public Builder setMessages(
          int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder builderForValue) {
        if (messagesBuilder_ == null) {
          ensureMessagesIsMutable();
          messages_.set(index, builderForValue.build());
          onChanged();
        } else {
          messagesBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public Builder addMessages(com.google.cloud.dialogflow.cx.v3.ResponseMessage value) {
        if (messagesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMessagesIsMutable();
          messages_.add(value);
          onChanged();
        } else {
          messagesBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public Builder addMessages(
          int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage value) {
        if (messagesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureMessagesIsMutable();
          messages_.add(index, value);
          onChanged();
        } else {
          messagesBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public Builder addMessages(
          com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder builderForValue) {
        if (messagesBuilder_ == null) {
          ensureMessagesIsMutable();
          messages_.add(builderForValue.build());
          onChanged();
        } else {
          messagesBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public Builder addMessages(
          int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder builderForValue) {
        if (messagesBuilder_ == null) {
          ensureMessagesIsMutable();
          messages_.add(index, builderForValue.build());
          onChanged();
        } else {
          messagesBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public Builder addAllMessages(
          java.lang.Iterable<? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage> values) {
        if (messagesBuilder_ == null) {
          ensureMessagesIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(values, messages_);
          onChanged();
        } else {
          messagesBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public Builder clearMessages() {
        if (messagesBuilder_ == null) {
          messages_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          messagesBuilder_.clear();
        }
        return this;
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public Builder removeMessages(int index) {
        if (messagesBuilder_ == null) {
          ensureMessagesIsMutable();
          messages_.remove(index);
          onChanged();
        } else {
          messagesBuilder_.remove(index);
        }
        return this;
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder getMessagesBuilder(
          int index) {
        return getMessagesFieldBuilder().getBuilder(index);
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder getMessagesOrBuilder(
          int index) {
        if (messagesBuilder_ == null) {
          return messages_.get(index);
        } else {
          return messagesBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public java.util.List<? extends com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder>
          getMessagesOrBuilderList() {
        if (messagesBuilder_ != null) {
          return messagesBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(messages_);
        }
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder addMessagesBuilder() {
        return getMessagesFieldBuilder()
            .addBuilder(com.google.cloud.dialogflow.cx.v3.ResponseMessage.getDefaultInstance());
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder addMessagesBuilder(
          int index) {
        return getMessagesFieldBuilder()
            .addBuilder(
                index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.getDefaultInstance());
      }
      /**
       *
       *
       *

       * The list of rich message responses to present to the user.
       *

       *
       * repeated .google.cloud.dialogflow.cx.v3.ResponseMessage messages = 1;
       */
      public java.util.List<com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder>
          getMessagesBuilderList() {
        return getMessagesFieldBuilder().getBuilderList();
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.cloud.dialogflow.cx.v3.ResponseMessage,
              com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder,
              com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder>
          getMessagesFieldBuilder() {
        if (messagesBuilder_ == null) {
          messagesBuilder_ =
              new com.google.protobuf.RepeatedFieldBuilderV3<
                  com.google.cloud.dialogflow.cx.v3.ResponseMessage,
                  com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder,
                  com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder>(
                  messages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
          messages_ = null;
        }
        return messagesBuilder_;
      }

      private int mergeBehavior_ = 0;
      /**
       *
       *
       *

       * Merge behavior for `messages`.
       *

       *
       *
       * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2;
       *
       *
       * @return The enum numeric value on the wire for mergeBehavior.
       */
      @java.lang.Override
      public int getMergeBehaviorValue() {
        return mergeBehavior_;
      }
      /**
       *
       *
       *

       * Merge behavior for `messages`.
       *

       *
       *
       * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2;
       *
       *
       * @param value The enum numeric value on the wire for mergeBehavior to set.
       * @return This builder for chaining.
       */
      public Builder setMergeBehaviorValue(int value) {

        mergeBehavior_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       *

       * Merge behavior for `messages`.
       *

       *
       *
       * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2;
       *
       *
       * @return The mergeBehavior.
       */
      @java.lang.Override
      public com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior
          getMergeBehavior() {
        @SuppressWarnings("deprecation")
        com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior result =
            com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior
                .valueOf(mergeBehavior_);
        return result == null
            ? com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior
                .UNRECOGNIZED
            : result;
      }
      /**
       *
       *
       *

       * Merge behavior for `messages`.
       *

       *
       *
       * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2;
       *
       *
       * @param value The mergeBehavior to set.
       * @return This builder for chaining.
       */
      public Builder setMergeBehavior(
          com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior
              value) {
        if (value == null) {
          throw new NullPointerException();
        }

        mergeBehavior_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       *
       *
       *

       * Merge behavior for `messages`.
       *

       *
       *
       * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.MergeBehavior merge_behavior = 2;
       *
       *
       * @return This builder for chaining.
       */
      public Builder clearMergeBehavior() {

        mergeBehavior_ = 0;
        onChanged();
        return this;
      }

      @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.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse)
    private static final com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse
        DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE =
          new com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse();
    }

    public static com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse
        getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<FulfillmentResponse> PARSER =
        new com.google.protobuf.AbstractParser<FulfillmentResponse>() {
          @java.lang.Override
          public FulfillmentResponse 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<FulfillmentResponse> parser() {
      return PARSER;
    }

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

    @java.lang.Override
    public com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse
        getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  private int transitionCase_ = 0;
  private java.lang.Object transition_;

  public enum TransitionCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    TARGET_PAGE(5),
    TARGET_FLOW(6),
    TRANSITION_NOT_SET(0);
    private final int value;

    private TransitionCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static TransitionCase valueOf(int value) {
      return forNumber(value);
    }

    public static TransitionCase forNumber(int value) {
      switch (value) {
        case 5:
          return TARGET_PAGE;
        case 6:
          return TARGET_FLOW;
        case 0:
          return TRANSITION_NOT_SET;
        default:
          return null;
      }
    }

    public int getNumber() {
      return this.value;
    }
  };

  public TransitionCase getTransitionCase() {
    return TransitionCase.forNumber(transitionCase_);
  }

  public static final int FULFILLMENT_RESPONSE_FIELD_NUMBER = 1;
  private com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse
      fulfillmentResponse_;
  /**
   *
   *
   *

   * The fulfillment response to send to the user. This field can be omitted by
   * the webhook if it does not intend to send any response to the user.
   *

   *
   *
   * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1;
   *
   *
   * @return Whether the fulfillmentResponse field is set.
   */
  @java.lang.Override
  public boolean hasFulfillmentResponse() {
    return fulfillmentResponse_ != null;
  }
  /**
   *
   *
   *

   * The fulfillment response to send to the user. This field can be omitted by
   * the webhook if it does not intend to send any response to the user.
   *

   *
   *
   * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1;
   *
   *
   * @return The fulfillmentResponse.
   */
  @java.lang.Override
  public com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse
      getFulfillmentResponse() {
    return fulfillmentResponse_ == null
        ? com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.getDefaultInstance()
        : fulfillmentResponse_;
  }
  /**
   *
   *
   *

   * The fulfillment response to send to the user. This field can be omitted by
   * the webhook if it does not intend to send any response to the user.
   *

   *
   *
   * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1;
   *
   */
  @java.lang.Override
  public com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponseOrBuilder
      getFulfillmentResponseOrBuilder() {
    return getFulfillmentResponse();
  }

  public static final int PAGE_INFO_FIELD_NUMBER = 2;
  private com.google.cloud.dialogflow.cx.v3.PageInfo pageInfo_;
  /**
   *
   *
   *

   * Information about page status. This field can be omitted by the webhook if
   * it does not intend to modify page status.
   *

   *
   * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2;
   *
   * @return Whether the pageInfo field is set.
   */
  @java.lang.Override
  public boolean hasPageInfo() {
    return pageInfo_ != null;
  }
  /**
   *
   *
   *

   * Information about page status. This field can be omitted by the webhook if
   * it does not intend to modify page status.
   *

   *
   * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2;
   *
   * @return The pageInfo.
   */
  @java.lang.Override
  public com.google.cloud.dialogflow.cx.v3.PageInfo getPageInfo() {
    return pageInfo_ == null
        ? com.google.cloud.dialogflow.cx.v3.PageInfo.getDefaultInstance()
        : pageInfo_;
  }
  /**
   *
   *
   *

   * Information about page status. This field can be omitted by the webhook if
   * it does not intend to modify page status.
   *

   *
   * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2;
   */
  @java.lang.Override
  public com.google.cloud.dialogflow.cx.v3.PageInfoOrBuilder getPageInfoOrBuilder() {
    return getPageInfo();
  }

  public static final int SESSION_INFO_FIELD_NUMBER = 3;
  private com.google.cloud.dialogflow.cx.v3.SessionInfo sessionInfo_;
  /**
   *
   *
   *

   * Information about session status. This field can be omitted by the webhook
   * if it does not intend to modify session status.
   *

   *
   * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3;
   *
   * @return Whether the sessionInfo field is set.
   */
  @java.lang.Override
  public boolean hasSessionInfo() {
    return sessionInfo_ != null;
  }
  /**
   *
   *
   *

   * Information about session status. This field can be omitted by the webhook
   * if it does not intend to modify session status.
   *

   *
   * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3;
   *
   * @return The sessionInfo.
   */
  @java.lang.Override
  public com.google.cloud.dialogflow.cx.v3.SessionInfo getSessionInfo() {
    return sessionInfo_ == null
        ? com.google.cloud.dialogflow.cx.v3.SessionInfo.getDefaultInstance()
        : sessionInfo_;
  }
  /**
   *
   *
   *

   * Information about session status. This field can be omitted by the webhook
   * if it does not intend to modify session status.
   *

   *
   * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3;
   */
  @java.lang.Override
  public com.google.cloud.dialogflow.cx.v3.SessionInfoOrBuilder getSessionInfoOrBuilder() {
    return getSessionInfo();
  }

  public static final int PAYLOAD_FIELD_NUMBER = 4;
  private com.google.protobuf.Struct payload_;
  /**
   *
   *
   *

   * Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads].
   *

   *
   * .google.protobuf.Struct payload = 4;
   *
   * @return Whether the payload field is set.
   */
  @java.lang.Override
  public boolean hasPayload() {
    return payload_ != null;
  }
  /**
   *
   *
   *

   * Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads].
   *

   *
   * .google.protobuf.Struct payload = 4;
   *
   * @return The payload.
   */
  @java.lang.Override
  public com.google.protobuf.Struct getPayload() {
    return payload_ == null ? com.google.protobuf.Struct.getDefaultInstance() : payload_;
  }
  /**
   *
   *
   *

   * Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads].
   *

   *
   * .google.protobuf.Struct payload = 4;
   */
  @java.lang.Override
  public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() {
    return getPayload();
  }

  public static final int TARGET_PAGE_FIELD_NUMBER = 5;
  /**
   *
   *
   *

   * The target page to transition to.
   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
   * ID>/flows/<Flow ID>/pages/<Page ID>`.
   *

   *
   * string target_page = 5 [(.google.api.resource_reference) = { ... }
   *
   * @return Whether the targetPage field is set.
   */
  public boolean hasTargetPage() {
    return transitionCase_ == 5;
  }
  /**
   *
   *
   *

   * The target page to transition to.
   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
   * ID>/flows/<Flow ID>/pages/<Page ID>`.
   *

   *
   * string target_page = 5 [(.google.api.resource_reference) = { ... }
   *
   * @return The targetPage.
   */
  public java.lang.String getTargetPage() {
    java.lang.Object ref = "";
    if (transitionCase_ == 5) {
      ref = transition_;
    }
    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();
      if (transitionCase_ == 5) {
        transition_ = s;
      }
      return s;
    }
  }
  /**
   *
   *
   *

   * The target page to transition to.
   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
   * ID>/flows/<Flow ID>/pages/<Page ID>`.
   *

   *
   * string target_page = 5 [(.google.api.resource_reference) = { ... }
   *
   * @return The bytes for targetPage.
   */
  public com.google.protobuf.ByteString getTargetPageBytes() {
    java.lang.Object ref = "";
    if (transitionCase_ == 5) {
      ref = transition_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      if (transitionCase_ == 5) {
        transition_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TARGET_FLOW_FIELD_NUMBER = 6;
  /**
   *
   *
   *

   * The target flow to transition to.
   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
   * ID>/flows/<Flow ID>`.
   *

   *
   * string target_flow = 6 [(.google.api.resource_reference) = { ... }
   *
   * @return Whether the targetFlow field is set.
   */
  public boolean hasTargetFlow() {
    return transitionCase_ == 6;
  }
  /**
   *
   *
   *

   * The target flow to transition to.
   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
   * ID>/flows/<Flow ID>`.
   *

   *
   * string target_flow = 6 [(.google.api.resource_reference) = { ... }
   *
   * @return The targetFlow.
   */
  public java.lang.String getTargetFlow() {
    java.lang.Object ref = "";
    if (transitionCase_ == 6) {
      ref = transition_;
    }
    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();
      if (transitionCase_ == 6) {
        transition_ = s;
      }
      return s;
    }
  }
  /**
   *
   *
   *

   * The target flow to transition to.
   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
   * ID>/flows/<Flow ID>`.
   *

   *
   * string target_flow = 6 [(.google.api.resource_reference) = { ... }
   *
   * @return The bytes for targetFlow.
   */
  public com.google.protobuf.ByteString getTargetFlowBytes() {
    java.lang.Object ref = "";
    if (transitionCase_ == 6) {
      ref = transition_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      if (transitionCase_ == 6) {
        transition_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  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 (fulfillmentResponse_ != null) {
      output.writeMessage(1, getFulfillmentResponse());
    }
    if (pageInfo_ != null) {
      output.writeMessage(2, getPageInfo());
    }
    if (sessionInfo_ != null) {
      output.writeMessage(3, getSessionInfo());
    }
    if (payload_ != null) {
      output.writeMessage(4, getPayload());
    }
    if (transitionCase_ == 5) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, transition_);
    }
    if (transitionCase_ == 6) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, transition_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (fulfillmentResponse_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFulfillmentResponse());
    }
    if (pageInfo_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPageInfo());
    }
    if (sessionInfo_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSessionInfo());
    }
    if (payload_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPayload());
    }
    if (transitionCase_ == 5) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, transition_);
    }
    if (transitionCase_ == 6) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, transition_);
    }
    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.cloud.dialogflow.cx.v3.WebhookResponse)) {
      return super.equals(obj);
    }
    com.google.cloud.dialogflow.cx.v3.WebhookResponse other =
        (com.google.cloud.dialogflow.cx.v3.WebhookResponse) obj;

    if (hasFulfillmentResponse() != other.hasFulfillmentResponse()) return false;
    if (hasFulfillmentResponse()) {
      if (!getFulfillmentResponse().equals(other.getFulfillmentResponse())) return false;
    }
    if (hasPageInfo() != other.hasPageInfo()) return false;
    if (hasPageInfo()) {
      if (!getPageInfo().equals(other.getPageInfo())) return false;
    }
    if (hasSessionInfo() != other.hasSessionInfo()) return false;
    if (hasSessionInfo()) {
      if (!getSessionInfo().equals(other.getSessionInfo())) return false;
    }
    if (hasPayload() != other.hasPayload()) return false;
    if (hasPayload()) {
      if (!getPayload().equals(other.getPayload())) return false;
    }
    if (!getTransitionCase().equals(other.getTransitionCase())) return false;
    switch (transitionCase_) {
      case 5:
        if (!getTargetPage().equals(other.getTargetPage())) return false;
        break;
      case 6:
        if (!getTargetFlow().equals(other.getTargetFlow())) return false;
        break;
      case 0:
      default:
    }
    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();
    if (hasFulfillmentResponse()) {
      hash = (37 * hash) + FULFILLMENT_RESPONSE_FIELD_NUMBER;
      hash = (53 * hash) + getFulfillmentResponse().hashCode();
    }
    if (hasPageInfo()) {
      hash = (37 * hash) + PAGE_INFO_FIELD_NUMBER;
      hash = (53 * hash) + getPageInfo().hashCode();
    }
    if (hasSessionInfo()) {
      hash = (37 * hash) + SESSION_INFO_FIELD_NUMBER;
      hash = (53 * hash) + getSessionInfo().hashCode();
    }
    if (hasPayload()) {
      hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
      hash = (53 * hash) + getPayload().hashCode();
    }
    switch (transitionCase_) {
      case 5:
        hash = (37 * hash) + TARGET_PAGE_FIELD_NUMBER;
        hash = (53 * hash) + getTargetPage().hashCode();
        break;
      case 6:
        hash = (37 * hash) + TARGET_FLOW_FIELD_NUMBER;
        hash = (53 * hash) + getTargetFlow().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.dialogflow.cx.v3.WebhookResponse parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.dialogflow.cx.v3.WebhookResponse parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.dialogflow.cx.v3.WebhookResponse parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.dialogflow.cx.v3.WebhookResponse 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.cloud.dialogflow.cx.v3.WebhookResponse parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.dialogflow.cx.v3.WebhookResponse parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.dialogflow.cx.v3.WebhookResponse parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.dialogflow.cx.v3.WebhookResponse 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.cloud.dialogflow.cx.v3.WebhookResponse parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.dialogflow.cx.v3.WebhookResponse 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.cloud.dialogflow.cx.v3.WebhookResponse parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.dialogflow.cx.v3.WebhookResponse 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.cloud.dialogflow.cx.v3.WebhookResponse 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;
  }
  /**
   *
   *
   *

   * The response message for a webhook call.
   *

   *
   * Protobuf type {@code google.cloud.dialogflow.cx.v3.WebhookResponse}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.WebhookResponse)
      com.google.cloud.dialogflow.cx.v3.WebhookResponseOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.dialogflow.cx.v3.WebhookProto
          .internal_static_google_cloud_dialogflow_cx_v3_WebhookResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.dialogflow.cx.v3.WebhookProto
          .internal_static_google_cloud_dialogflow_cx_v3_WebhookResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.dialogflow.cx.v3.WebhookResponse.class,
              com.google.cloud.dialogflow.cx.v3.WebhookResponse.Builder.class);
    }

    // Construct using com.google.cloud.dialogflow.cx.v3.WebhookResponse.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (fulfillmentResponseBuilder_ == null) {
        fulfillmentResponse_ = null;
      } else {
        fulfillmentResponse_ = null;
        fulfillmentResponseBuilder_ = null;
      }
      if (pageInfoBuilder_ == null) {
        pageInfo_ = null;
      } else {
        pageInfo_ = null;
        pageInfoBuilder_ = null;
      }
      if (sessionInfoBuilder_ == null) {
        sessionInfo_ = null;
      } else {
        sessionInfo_ = null;
        sessionInfoBuilder_ = null;
      }
      if (payloadBuilder_ == null) {
        payload_ = null;
      } else {
        payload_ = null;
        payloadBuilder_ = null;
      }
      transitionCase_ = 0;
      transition_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.dialogflow.cx.v3.WebhookProto
          .internal_static_google_cloud_dialogflow_cx_v3_WebhookResponse_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.dialogflow.cx.v3.WebhookResponse getDefaultInstanceForType() {
      return com.google.cloud.dialogflow.cx.v3.WebhookResponse.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.dialogflow.cx.v3.WebhookResponse build() {
      com.google.cloud.dialogflow.cx.v3.WebhookResponse result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.dialogflow.cx.v3.WebhookResponse buildPartial() {
      com.google.cloud.dialogflow.cx.v3.WebhookResponse result =
          new com.google.cloud.dialogflow.cx.v3.WebhookResponse(this);
      if (fulfillmentResponseBuilder_ == null) {
        result.fulfillmentResponse_ = fulfillmentResponse_;
      } else {
        result.fulfillmentResponse_ = fulfillmentResponseBuilder_.build();
      }
      if (pageInfoBuilder_ == null) {
        result.pageInfo_ = pageInfo_;
      } else {
        result.pageInfo_ = pageInfoBuilder_.build();
      }
      if (sessionInfoBuilder_ == null) {
        result.sessionInfo_ = sessionInfo_;
      } else {
        result.sessionInfo_ = sessionInfoBuilder_.build();
      }
      if (payloadBuilder_ == null) {
        result.payload_ = payload_;
      } else {
        result.payload_ = payloadBuilder_.build();
      }
      if (transitionCase_ == 5) {
        result.transition_ = transition_;
      }
      if (transitionCase_ == 6) {
        result.transition_ = transition_;
      }
      result.transitionCase_ = transitionCase_;
      onBuilt();
      return result;
    }

    @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.cloud.dialogflow.cx.v3.WebhookResponse) {
        return mergeFrom((com.google.cloud.dialogflow.cx.v3.WebhookResponse) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.WebhookResponse other) {
      if (other == com.google.cloud.dialogflow.cx.v3.WebhookResponse.getDefaultInstance())
        return this;
      if (other.hasFulfillmentResponse()) {
        mergeFulfillmentResponse(other.getFulfillmentResponse());
      }
      if (other.hasPageInfo()) {
        mergePageInfo(other.getPageInfo());
      }
      if (other.hasSessionInfo()) {
        mergeSessionInfo(other.getSessionInfo());
      }
      if (other.hasPayload()) {
        mergePayload(other.getPayload());
      }
      switch (other.getTransitionCase()) {
        case TARGET_PAGE:
          {
            transitionCase_ = 5;
            transition_ = other.transition_;
            onChanged();
            break;
          }
        case TARGET_FLOW:
          {
            transitionCase_ = 6;
            transition_ = other.transition_;
            onChanged();
            break;
          }
        case TRANSITION_NOT_SET:
          {
            break;
          }
      }
      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:
              {
                input.readMessage(
                    getFulfillmentResponseFieldBuilder().getBuilder(), extensionRegistry);

                break;
              } // case 10
            case 18:
              {
                input.readMessage(getPageInfoFieldBuilder().getBuilder(), extensionRegistry);

                break;
              } // case 18
            case 26:
              {
                input.readMessage(getSessionInfoFieldBuilder().getBuilder(), extensionRegistry);

                break;
              } // case 26
            case 34:
              {
                input.readMessage(getPayloadFieldBuilder().getBuilder(), extensionRegistry);

                break;
              } // case 34
            case 42:
              {
                java.lang.String s = input.readStringRequireUtf8();
                transitionCase_ = 5;
                transition_ = s;
                break;
              } // case 42
            case 50:
              {
                java.lang.String s = input.readStringRequireUtf8();
                transitionCase_ = 6;
                transition_ = s;
                break;
              } // case 50
            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 transitionCase_ = 0;
    private java.lang.Object transition_;

    public TransitionCase getTransitionCase() {
      return TransitionCase.forNumber(transitionCase_);
    }

    public Builder clearTransition() {
      transitionCase_ = 0;
      transition_ = null;
      onChanged();
      return this;
    }

    private com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse
        fulfillmentResponse_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse,
            com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.Builder,
            com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponseOrBuilder>
        fulfillmentResponseBuilder_;
    /**
     *
     *
     *

     * The fulfillment response to send to the user. This field can be omitted by
     * the webhook if it does not intend to send any response to the user.
     *

     *
     *
     * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1;
     *
     *
     * @return Whether the fulfillmentResponse field is set.
     */
    public boolean hasFulfillmentResponse() {
      return fulfillmentResponseBuilder_ != null || fulfillmentResponse_ != null;
    }
    /**
     *
     *
     *

     * The fulfillment response to send to the user. This field can be omitted by
     * the webhook if it does not intend to send any response to the user.
     *

     *
     *
     * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1;
     *
     *
     * @return The fulfillmentResponse.
     */
    public com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse
        getFulfillmentResponse() {
      if (fulfillmentResponseBuilder_ == null) {
        return fulfillmentResponse_ == null
            ? com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse
                .getDefaultInstance()
            : fulfillmentResponse_;
      } else {
        return fulfillmentResponseBuilder_.getMessage();
      }
    }
    /**
     *
     *
     *

     * The fulfillment response to send to the user. This field can be omitted by
     * the webhook if it does not intend to send any response to the user.
     *

     *
     *
     * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1;
     *
     */
    public Builder setFulfillmentResponse(
        com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse value) {
      if (fulfillmentResponseBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        fulfillmentResponse_ = value;
        onChanged();
      } else {
        fulfillmentResponseBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * The fulfillment response to send to the user. This field can be omitted by
     * the webhook if it does not intend to send any response to the user.
     *

     *
     *
     * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1;
     *
     */
    public Builder setFulfillmentResponse(
        com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.Builder
            builderForValue) {
      if (fulfillmentResponseBuilder_ == null) {
        fulfillmentResponse_ = builderForValue.build();
        onChanged();
      } else {
        fulfillmentResponseBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     *

     * The fulfillment response to send to the user. This field can be omitted by
     * the webhook if it does not intend to send any response to the user.
     *

     *
     *
     * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1;
     *
     */
    public Builder mergeFulfillmentResponse(
        com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse value) {
      if (fulfillmentResponseBuilder_ == null) {
        if (fulfillmentResponse_ != null) {
          fulfillmentResponse_ =
              com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.newBuilder(
                      fulfillmentResponse_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          fulfillmentResponse_ = value;
        }
        onChanged();
      } else {
        fulfillmentResponseBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * The fulfillment response to send to the user. This field can be omitted by
     * the webhook if it does not intend to send any response to the user.
     *

     *
     *
     * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1;
     *
     */
    public Builder clearFulfillmentResponse() {
      if (fulfillmentResponseBuilder_ == null) {
        fulfillmentResponse_ = null;
        onChanged();
      } else {
        fulfillmentResponse_ = null;
        fulfillmentResponseBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     *

     * The fulfillment response to send to the user. This field can be omitted by
     * the webhook if it does not intend to send any response to the user.
     *

     *
     *
     * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1;
     *
     */
    public com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.Builder
        getFulfillmentResponseBuilder() {

      onChanged();
      return getFulfillmentResponseFieldBuilder().getBuilder();
    }
    /**
     *
     *
     *

     * The fulfillment response to send to the user. This field can be omitted by
     * the webhook if it does not intend to send any response to the user.
     *

     *
     *
     * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1;
     *
     */
    public com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponseOrBuilder
        getFulfillmentResponseOrBuilder() {
      if (fulfillmentResponseBuilder_ != null) {
        return fulfillmentResponseBuilder_.getMessageOrBuilder();
      } else {
        return fulfillmentResponse_ == null
            ? com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse
                .getDefaultInstance()
            : fulfillmentResponse_;
      }
    }
    /**
     *
     *
     *

     * The fulfillment response to send to the user. This field can be omitted by
     * the webhook if it does not intend to send any response to the user.
     *

     *
     *
     * .google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse fulfillment_response = 1;
     *
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse,
            com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.Builder,
            com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponseOrBuilder>
        getFulfillmentResponseFieldBuilder() {
      if (fulfillmentResponseBuilder_ == null) {
        fulfillmentResponseBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse,
                com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponse.Builder,
                com.google.cloud.dialogflow.cx.v3.WebhookResponse.FulfillmentResponseOrBuilder>(
                getFulfillmentResponse(), getParentForChildren(), isClean());
        fulfillmentResponse_ = null;
      }
      return fulfillmentResponseBuilder_;
    }

    private com.google.cloud.dialogflow.cx.v3.PageInfo pageInfo_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dialogflow.cx.v3.PageInfo,
            com.google.cloud.dialogflow.cx.v3.PageInfo.Builder,
            com.google.cloud.dialogflow.cx.v3.PageInfoOrBuilder>
        pageInfoBuilder_;
    /**
     *
     *
     *

     * Information about page status. This field can be omitted by the webhook if
     * it does not intend to modify page status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2;
     *
     * @return Whether the pageInfo field is set.
     */
    public boolean hasPageInfo() {
      return pageInfoBuilder_ != null || pageInfo_ != null;
    }
    /**
     *
     *
     *

     * Information about page status. This field can be omitted by the webhook if
     * it does not intend to modify page status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2;
     *
     * @return The pageInfo.
     */
    public com.google.cloud.dialogflow.cx.v3.PageInfo getPageInfo() {
      if (pageInfoBuilder_ == null) {
        return pageInfo_ == null
            ? com.google.cloud.dialogflow.cx.v3.PageInfo.getDefaultInstance()
            : pageInfo_;
      } else {
        return pageInfoBuilder_.getMessage();
      }
    }
    /**
     *
     *
     *

     * Information about page status. This field can be omitted by the webhook if
     * it does not intend to modify page status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2;
     */
    public Builder setPageInfo(com.google.cloud.dialogflow.cx.v3.PageInfo value) {
      if (pageInfoBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        pageInfo_ = value;
        onChanged();
      } else {
        pageInfoBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * Information about page status. This field can be omitted by the webhook if
     * it does not intend to modify page status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2;
     */
    public Builder setPageInfo(com.google.cloud.dialogflow.cx.v3.PageInfo.Builder builderForValue) {
      if (pageInfoBuilder_ == null) {
        pageInfo_ = builderForValue.build();
        onChanged();
      } else {
        pageInfoBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     *

     * Information about page status. This field can be omitted by the webhook if
     * it does not intend to modify page status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2;
     */
    public Builder mergePageInfo(com.google.cloud.dialogflow.cx.v3.PageInfo value) {
      if (pageInfoBuilder_ == null) {
        if (pageInfo_ != null) {
          pageInfo_ =
              com.google.cloud.dialogflow.cx.v3.PageInfo.newBuilder(pageInfo_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          pageInfo_ = value;
        }
        onChanged();
      } else {
        pageInfoBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * Information about page status. This field can be omitted by the webhook if
     * it does not intend to modify page status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2;
     */
    public Builder clearPageInfo() {
      if (pageInfoBuilder_ == null) {
        pageInfo_ = null;
        onChanged();
      } else {
        pageInfo_ = null;
        pageInfoBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     *

     * Information about page status. This field can be omitted by the webhook if
     * it does not intend to modify page status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2;
     */
    public com.google.cloud.dialogflow.cx.v3.PageInfo.Builder getPageInfoBuilder() {

      onChanged();
      return getPageInfoFieldBuilder().getBuilder();
    }
    /**
     *
     *
     *

     * Information about page status. This field can be omitted by the webhook if
     * it does not intend to modify page status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2;
     */
    public com.google.cloud.dialogflow.cx.v3.PageInfoOrBuilder getPageInfoOrBuilder() {
      if (pageInfoBuilder_ != null) {
        return pageInfoBuilder_.getMessageOrBuilder();
      } else {
        return pageInfo_ == null
            ? com.google.cloud.dialogflow.cx.v3.PageInfo.getDefaultInstance()
            : pageInfo_;
      }
    }
    /**
     *
     *
     *

     * Information about page status. This field can be omitted by the webhook if
     * it does not intend to modify page status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.PageInfo page_info = 2;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dialogflow.cx.v3.PageInfo,
            com.google.cloud.dialogflow.cx.v3.PageInfo.Builder,
            com.google.cloud.dialogflow.cx.v3.PageInfoOrBuilder>
        getPageInfoFieldBuilder() {
      if (pageInfoBuilder_ == null) {
        pageInfoBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.dialogflow.cx.v3.PageInfo,
                com.google.cloud.dialogflow.cx.v3.PageInfo.Builder,
                com.google.cloud.dialogflow.cx.v3.PageInfoOrBuilder>(
                getPageInfo(), getParentForChildren(), isClean());
        pageInfo_ = null;
      }
      return pageInfoBuilder_;
    }

    private com.google.cloud.dialogflow.cx.v3.SessionInfo sessionInfo_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dialogflow.cx.v3.SessionInfo,
            com.google.cloud.dialogflow.cx.v3.SessionInfo.Builder,
            com.google.cloud.dialogflow.cx.v3.SessionInfoOrBuilder>
        sessionInfoBuilder_;
    /**
     *
     *
     *

     * Information about session status. This field can be omitted by the webhook
     * if it does not intend to modify session status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3;
     *
     * @return Whether the sessionInfo field is set.
     */
    public boolean hasSessionInfo() {
      return sessionInfoBuilder_ != null || sessionInfo_ != null;
    }
    /**
     *
     *
     *

     * Information about session status. This field can be omitted by the webhook
     * if it does not intend to modify session status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3;
     *
     * @return The sessionInfo.
     */
    public com.google.cloud.dialogflow.cx.v3.SessionInfo getSessionInfo() {
      if (sessionInfoBuilder_ == null) {
        return sessionInfo_ == null
            ? com.google.cloud.dialogflow.cx.v3.SessionInfo.getDefaultInstance()
            : sessionInfo_;
      } else {
        return sessionInfoBuilder_.getMessage();
      }
    }
    /**
     *
     *
     *

     * Information about session status. This field can be omitted by the webhook
     * if it does not intend to modify session status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3;
     */
    public Builder setSessionInfo(com.google.cloud.dialogflow.cx.v3.SessionInfo value) {
      if (sessionInfoBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        sessionInfo_ = value;
        onChanged();
      } else {
        sessionInfoBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * Information about session status. This field can be omitted by the webhook
     * if it does not intend to modify session status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3;
     */
    public Builder setSessionInfo(
        com.google.cloud.dialogflow.cx.v3.SessionInfo.Builder builderForValue) {
      if (sessionInfoBuilder_ == null) {
        sessionInfo_ = builderForValue.build();
        onChanged();
      } else {
        sessionInfoBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     *

     * Information about session status. This field can be omitted by the webhook
     * if it does not intend to modify session status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3;
     */
    public Builder mergeSessionInfo(com.google.cloud.dialogflow.cx.v3.SessionInfo value) {
      if (sessionInfoBuilder_ == null) {
        if (sessionInfo_ != null) {
          sessionInfo_ =
              com.google.cloud.dialogflow.cx.v3.SessionInfo.newBuilder(sessionInfo_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          sessionInfo_ = value;
        }
        onChanged();
      } else {
        sessionInfoBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * Information about session status. This field can be omitted by the webhook
     * if it does not intend to modify session status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3;
     */
    public Builder clearSessionInfo() {
      if (sessionInfoBuilder_ == null) {
        sessionInfo_ = null;
        onChanged();
      } else {
        sessionInfo_ = null;
        sessionInfoBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     *

     * Information about session status. This field can be omitted by the webhook
     * if it does not intend to modify session status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3;
     */
    public com.google.cloud.dialogflow.cx.v3.SessionInfo.Builder getSessionInfoBuilder() {

      onChanged();
      return getSessionInfoFieldBuilder().getBuilder();
    }
    /**
     *
     *
     *

     * Information about session status. This field can be omitted by the webhook
     * if it does not intend to modify session status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3;
     */
    public com.google.cloud.dialogflow.cx.v3.SessionInfoOrBuilder getSessionInfoOrBuilder() {
      if (sessionInfoBuilder_ != null) {
        return sessionInfoBuilder_.getMessageOrBuilder();
      } else {
        return sessionInfo_ == null
            ? com.google.cloud.dialogflow.cx.v3.SessionInfo.getDefaultInstance()
            : sessionInfo_;
      }
    }
    /**
     *
     *
     *

     * Information about session status. This field can be omitted by the webhook
     * if it does not intend to modify session status.
     *

     *
     * .google.cloud.dialogflow.cx.v3.SessionInfo session_info = 3;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dialogflow.cx.v3.SessionInfo,
            com.google.cloud.dialogflow.cx.v3.SessionInfo.Builder,
            com.google.cloud.dialogflow.cx.v3.SessionInfoOrBuilder>
        getSessionInfoFieldBuilder() {
      if (sessionInfoBuilder_ == null) {
        sessionInfoBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.dialogflow.cx.v3.SessionInfo,
                com.google.cloud.dialogflow.cx.v3.SessionInfo.Builder,
                com.google.cloud.dialogflow.cx.v3.SessionInfoOrBuilder>(
                getSessionInfo(), getParentForChildren(), isClean());
        sessionInfo_ = null;
      }
      return sessionInfoBuilder_;
    }

    private com.google.protobuf.Struct payload_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Struct,
            com.google.protobuf.Struct.Builder,
            com.google.protobuf.StructOrBuilder>
        payloadBuilder_;
    /**
     *
     *
     *

     * Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads].
     *

     *
     * .google.protobuf.Struct payload = 4;
     *
     * @return Whether the payload field is set.
     */
    public boolean hasPayload() {
      return payloadBuilder_ != null || payload_ != null;
    }
    /**
     *
     *
     *

     * Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads].
     *

     *
     * .google.protobuf.Struct payload = 4;
     *
     * @return The payload.
     */
    public com.google.protobuf.Struct getPayload() {
      if (payloadBuilder_ == null) {
        return payload_ == null ? com.google.protobuf.Struct.getDefaultInstance() : payload_;
      } else {
        return payloadBuilder_.getMessage();
      }
    }
    /**
     *
     *
     *

     * Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads].
     *

     *
     * .google.protobuf.Struct payload = 4;
     */
    public Builder setPayload(com.google.protobuf.Struct value) {
      if (payloadBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        payload_ = value;
        onChanged();
      } else {
        payloadBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads].
     *

     *
     * .google.protobuf.Struct payload = 4;
     */
    public Builder setPayload(com.google.protobuf.Struct.Builder builderForValue) {
      if (payloadBuilder_ == null) {
        payload_ = builderForValue.build();
        onChanged();
      } else {
        payloadBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     *

     * Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads].
     *

     *
     * .google.protobuf.Struct payload = 4;
     */
    public Builder mergePayload(com.google.protobuf.Struct value) {
      if (payloadBuilder_ == null) {
        if (payload_ != null) {
          payload_ =
              com.google.protobuf.Struct.newBuilder(payload_).mergeFrom(value).buildPartial();
        } else {
          payload_ = value;
        }
        onChanged();
      } else {
        payloadBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads].
     *

     *
     * .google.protobuf.Struct payload = 4;
     */
    public Builder clearPayload() {
      if (payloadBuilder_ == null) {
        payload_ = null;
        onChanged();
      } else {
        payload_ = null;
        payloadBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     *

     * Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads].
     *

     *
     * .google.protobuf.Struct payload = 4;
     */
    public com.google.protobuf.Struct.Builder getPayloadBuilder() {

      onChanged();
      return getPayloadFieldBuilder().getBuilder();
    }
    /**
     *
     *
     *

     * Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads].
     *

     *
     * .google.protobuf.Struct payload = 4;
     */
    public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() {
      if (payloadBuilder_ != null) {
        return payloadBuilder_.getMessageOrBuilder();
      } else {
        return payload_ == null ? com.google.protobuf.Struct.getDefaultInstance() : payload_;
      }
    }
    /**
     *
     *
     *

     * Value to append directly to [QueryResult.webhook_payloads][google.cloud.dialogflow.cx.v3.QueryResult.webhook_payloads].
     *

     *
     * .google.protobuf.Struct payload = 4;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Struct,
            com.google.protobuf.Struct.Builder,
            com.google.protobuf.StructOrBuilder>
        getPayloadFieldBuilder() {
      if (payloadBuilder_ == null) {
        payloadBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Struct,
                com.google.protobuf.Struct.Builder,
                com.google.protobuf.StructOrBuilder>(
                getPayload(), getParentForChildren(), isClean());
        payload_ = null;
      }
      return payloadBuilder_;
    }

    /**
     *
     *
     *

     * The target page to transition to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>/pages/<Page ID>`.
     *

     *
     * string target_page = 5 [(.google.api.resource_reference) = { ... }
     *
     * @return Whether the targetPage field is set.
     */
    @java.lang.Override
    public boolean hasTargetPage() {
      return transitionCase_ == 5;
    }
    /**
     *
     *
     *

     * The target page to transition to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>/pages/<Page ID>`.
     *

     *
     * string target_page = 5 [(.google.api.resource_reference) = { ... }
     *
     * @return The targetPage.
     */
    @java.lang.Override
    public java.lang.String getTargetPage() {
      java.lang.Object ref = "";
      if (transitionCase_ == 5) {
        ref = transition_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (transitionCase_ == 5) {
          transition_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     *

     * The target page to transition to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>/pages/<Page ID>`.
     *

     *
     * string target_page = 5 [(.google.api.resource_reference) = { ... }
     *
     * @return The bytes for targetPage.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getTargetPageBytes() {
      java.lang.Object ref = "";
      if (transitionCase_ == 5) {
        ref = transition_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        if (transitionCase_ == 5) {
          transition_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     *

     * The target page to transition to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>/pages/<Page ID>`.
     *

     *
     * string target_page = 5 [(.google.api.resource_reference) = { ... }
     *
     * @param value The targetPage to set.
     * @return This builder for chaining.
     */
    public Builder setTargetPage(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      transitionCase_ = 5;
      transition_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * The target page to transition to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>/pages/<Page ID>`.
     *

     *
     * string target_page = 5 [(.google.api.resource_reference) = { ... }
     *
     * @return This builder for chaining.
     */
    public Builder clearTargetPage() {
      if (transitionCase_ == 5) {
        transitionCase_ = 0;
        transition_ = null;
        onChanged();
      }
      return this;
    }
    /**
     *
     *
     *

     * The target page to transition to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>/pages/<Page ID>`.
     *

     *
     * string target_page = 5 [(.google.api.resource_reference) = { ... }
     *
     * @param value The bytes for targetPage to set.
     * @return This builder for chaining.
     */
    public Builder setTargetPageBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      transitionCase_ = 5;
      transition_ = value;
      onChanged();
      return this;
    }

    /**
     *
     *
     *

     * The target flow to transition to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>`.
     *

     *
     * string target_flow = 6 [(.google.api.resource_reference) = { ... }
     *
     * @return Whether the targetFlow field is set.
     */
    @java.lang.Override
    public boolean hasTargetFlow() {
      return transitionCase_ == 6;
    }
    /**
     *
     *
     *

     * The target flow to transition to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>`.
     *

     *
     * string target_flow = 6 [(.google.api.resource_reference) = { ... }
     *
     * @return The targetFlow.
     */
    @java.lang.Override
    public java.lang.String getTargetFlow() {
      java.lang.Object ref = "";
      if (transitionCase_ == 6) {
        ref = transition_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (transitionCase_ == 6) {
          transition_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     *

     * The target flow to transition to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>`.
     *

     *
     * string target_flow = 6 [(.google.api.resource_reference) = { ... }
     *
     * @return The bytes for targetFlow.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getTargetFlowBytes() {
      java.lang.Object ref = "";
      if (transitionCase_ == 6) {
        ref = transition_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        if (transitionCase_ == 6) {
          transition_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     *

     * The target flow to transition to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>`.
     *

     *
     * string target_flow = 6 [(.google.api.resource_reference) = { ... }
     *
     * @param value The targetFlow to set.
     * @return This builder for chaining.
     */
    public Builder setTargetFlow(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      transitionCase_ = 6;
      transition_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * The target flow to transition to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>`.
     *

     *
     * string target_flow = 6 [(.google.api.resource_reference) = { ... }
     *
     * @return This builder for chaining.
     */
    public Builder clearTargetFlow() {
      if (transitionCase_ == 6) {
        transitionCase_ = 0;
        transition_ = null;
        onChanged();
      }
      return this;
    }
    /**
     *
     *
     *

     * The target flow to transition to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/flows/<Flow ID>`.
     *

     *
     * string target_flow = 6 [(.google.api.resource_reference) = { ... }
     *
     * @param value The bytes for targetFlow to set.
     * @return This builder for chaining.
     */
    public Builder setTargetFlowBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      transitionCase_ = 6;
      transition_ = value;
      onChanged();
      return this;
    }

    @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.dialogflow.cx.v3.WebhookResponse)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.WebhookResponse)
  private static final com.google.cloud.dialogflow.cx.v3.WebhookResponse DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.WebhookResponse();
  }

  public static com.google.cloud.dialogflow.cx.v3.WebhookResponse getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<WebhookResponse> PARSER =
      new com.google.protobuf.AbstractParser<WebhookResponse>() {
        @java.lang.Override
        public WebhookResponse 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<WebhookResponse> parser() {
    return PARSER;
  }

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

  @java.lang.Override
  public com.google.cloud.dialogflow.cx.v3.WebhookResponse getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}