/*
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/dialogflow/cx/v3/generative_settings.proto

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

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

  private GenerativeSettings() {
    name_ = "";
    languageCode_ = "";
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto
        .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_descriptor;
  }

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

  public interface FallbackSettingsOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Display name of the selected prompt.
     * </pre>
     *
     * <code>string selected_prompt = 3;</code>
     *
     * @return The selectedPrompt.
     */
    java.lang.String getSelectedPrompt();
    /**
     *
     *
     * <pre>
     * Display name of the selected prompt.
     * </pre>
     *
     * <code>string selected_prompt = 3;</code>
     *
     * @return The bytes for selectedPrompt.
     */
    com.google.protobuf.ByteString getSelectedPromptBytes();

    /**
     *
     *
     * <pre>
     * Stored prompts that can be selected, for example default templates like
     * "conservative" or "chatty", or user defined ones.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
     * </code>
     */
    java.util.List<
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate>
        getPromptTemplatesList();
    /**
     *
     *
     * <pre>
     * Stored prompts that can be selected, for example default templates like
     * "conservative" or "chatty", or user defined ones.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
     * </code>
     */
    com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
        getPromptTemplates(int index);
    /**
     *
     *
     * <pre>
     * Stored prompts that can be selected, for example default templates like
     * "conservative" or "chatty", or user defined ones.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
     * </code>
     */
    int getPromptTemplatesCount();
    /**
     *
     *
     * <pre>
     * Stored prompts that can be selected, for example default templates like
     * "conservative" or "chatty", or user defined ones.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
     * </code>
     */
    java.util.List<
            ? extends
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                    .PromptTemplateOrBuilder>
        getPromptTemplatesOrBuilderList();
    /**
     *
     *
     * <pre>
     * Stored prompts that can be selected, for example default templates like
     * "conservative" or "chatty", or user defined ones.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
     * </code>
     */
    com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplateOrBuilder
        getPromptTemplatesOrBuilder(int index);
  }
  /**
   *
   *
   * <pre>
   * Settings for Generative Fallback.
   * </pre>
   *
   * Protobuf type {@code google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings}
   */
  public static final class FallbackSettings extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings)
      FallbackSettingsOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use FallbackSettings.newBuilder() to construct.
    private FallbackSettings(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private FallbackSettings() {
      selectedPrompt_ = "";
      promptTemplates_ = java.util.Collections.emptyList();
    }

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

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto
          .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto
          .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.class,
              com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.Builder.class);
    }

    public interface PromptTemplateOrBuilder
        extends
        // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate)
        com.google.protobuf.MessageOrBuilder {

      /**
       *
       *
       * <pre>
       * Prompt name.
       * </pre>
       *
       * <code>string display_name = 1;</code>
       *
       * @return The displayName.
       */
      java.lang.String getDisplayName();
      /**
       *
       *
       * <pre>
       * Prompt name.
       * </pre>
       *
       * <code>string display_name = 1;</code>
       *
       * @return The bytes for displayName.
       */
      com.google.protobuf.ByteString getDisplayNameBytes();

      /**
       *
       *
       * <pre>
       * Prompt text that is sent to a LLM on no-match default, placeholders are
       * filled downstream. For example: "Here is a conversation $conversation,
       * a response is: "
       * </pre>
       *
       * <code>string prompt_text = 2;</code>
       *
       * @return The promptText.
       */
      java.lang.String getPromptText();
      /**
       *
       *
       * <pre>
       * Prompt text that is sent to a LLM on no-match default, placeholders are
       * filled downstream. For example: "Here is a conversation $conversation,
       * a response is: "
       * </pre>
       *
       * <code>string prompt_text = 2;</code>
       *
       * @return The bytes for promptText.
       */
      com.google.protobuf.ByteString getPromptTextBytes();

      /**
       *
       *
       * <pre>
       * If the flag is true, the prompt is frozen and cannot be modified by
       * users.
       * </pre>
       *
       * <code>bool frozen = 3;</code>
       *
       * @return The frozen.
       */
      boolean getFrozen();
    }
    /**
     *
     *
     * <pre>
     * Prompt template.
     * </pre>
     *
     * Protobuf type {@code
     * google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate}
     */
    public static final class PromptTemplate extends com.google.protobuf.GeneratedMessageV3
        implements
        // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate)
        PromptTemplateOrBuilder {
      private static final long serialVersionUID = 0L;
      // Use PromptTemplate.newBuilder() to construct.
      private PromptTemplate(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }

      private PromptTemplate() {
        displayName_ = "";
        promptText_ = "";
      }

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

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto
            .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto
            .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_PromptTemplate_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
                    .class,
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
                    .Builder.class);
      }

      public static final int DISPLAY_NAME_FIELD_NUMBER = 1;

      @SuppressWarnings("serial")
      private volatile java.lang.Object displayName_ = "";
      /**
       *
       *
       * <pre>
       * Prompt name.
       * </pre>
       *
       * <code>string display_name = 1;</code>
       *
       * @return The displayName.
       */
      @java.lang.Override
      public java.lang.String getDisplayName() {
        java.lang.Object ref = displayName_;
        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();
          displayName_ = s;
          return s;
        }
      }
      /**
       *
       *
       * <pre>
       * Prompt name.
       * </pre>
       *
       * <code>string display_name = 1;</code>
       *
       * @return The bytes for displayName.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getDisplayNameBytes() {
        java.lang.Object ref = displayName_;
        if (ref instanceof java.lang.String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          displayName_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      public static final int PROMPT_TEXT_FIELD_NUMBER = 2;

      @SuppressWarnings("serial")
      private volatile java.lang.Object promptText_ = "";
      /**
       *
       *
       * <pre>
       * Prompt text that is sent to a LLM on no-match default, placeholders are
       * filled downstream. For example: "Here is a conversation $conversation,
       * a response is: "
       * </pre>
       *
       * <code>string prompt_text = 2;</code>
       *
       * @return The promptText.
       */
      @java.lang.Override
      public java.lang.String getPromptText() {
        java.lang.Object ref = promptText_;
        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();
          promptText_ = s;
          return s;
        }
      }
      /**
       *
       *
       * <pre>
       * Prompt text that is sent to a LLM on no-match default, placeholders are
       * filled downstream. For example: "Here is a conversation $conversation,
       * a response is: "
       * </pre>
       *
       * <code>string prompt_text = 2;</code>
       *
       * @return The bytes for promptText.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getPromptTextBytes() {
        java.lang.Object ref = promptText_;
        if (ref instanceof java.lang.String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          promptText_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      public static final int FROZEN_FIELD_NUMBER = 3;
      private boolean frozen_ = false;
      /**
       *
       *
       * <pre>
       * If the flag is true, the prompt is frozen and cannot be modified by
       * users.
       * </pre>
       *
       * <code>bool frozen = 3;</code>
       *
       * @return The frozen.
       */
      @java.lang.Override
      public boolean getFrozen() {
        return frozen_;
      }

      private byte memoizedIsInitialized = -1;

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

        memoizedIsInitialized = 1;
        return true;
      }

      @java.lang.Override
      public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
        if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_);
        }
        if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promptText_)) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 2, promptText_);
        }
        if (frozen_ != false) {
          output.writeBool(3, frozen_);
        }
        getUnknownFields().writeTo(output);
      }

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

        size = 0;
        if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_);
        }
        if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promptText_)) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, promptText_);
        }
        if (frozen_ != false) {
          size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, frozen_);
        }
        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.GenerativeSettings.FallbackSettings.PromptTemplate)) {
          return super.equals(obj);
        }
        com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate other =
            (com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate)
                obj;

        if (!getDisplayName().equals(other.getDisplayName())) return false;
        if (!getPromptText().equals(other.getPromptText())) return false;
        if (getFrozen() != other.getFrozen()) return false;
        if (!getUnknownFields().equals(other.getUnknownFields())) return false;
        return true;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
        hash = (53 * hash) + getDisplayName().hashCode();
        hash = (37 * hash) + PROMPT_TEXT_FIELD_NUMBER;
        hash = (53 * hash) + getPromptText().hashCode();
        hash = (37 * hash) + FROZEN_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFrozen());
        hash = (29 * hash) + getUnknownFields().hashCode();
        memoizedHashCode = hash;
        return hash;
      }

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

      public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
              .PromptTemplate
          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.GenerativeSettings.FallbackSettings
              .PromptTemplate
          parseFrom(com.google.protobuf.ByteString data)
              throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

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

      public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
              .PromptTemplate
          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.GenerativeSettings.FallbackSettings
              .PromptTemplate
          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.GenerativeSettings.FallbackSettings
              .PromptTemplate
          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.GenerativeSettings.FallbackSettings
              .PromptTemplate
          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.GenerativeSettings.FallbackSettings
              .PromptTemplate
          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.GenerativeSettings.FallbackSettings
              .PromptTemplate
          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.GenerativeSettings.FallbackSettings
              .PromptTemplate
          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.GenerativeSettings.FallbackSettings.PromptTemplate
              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;
      }
      /**
       *
       *
       * <pre>
       * Prompt template.
       * </pre>
       *
       * Protobuf type {@code
       * google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate}
       */
      public static final class Builder
          extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
          implements
          // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate)
          com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
              .PromptTemplateOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
          return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto
              .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_PromptTemplate_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto
              .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_PromptTemplate_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                      .PromptTemplate.class,
                  com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                      .PromptTemplate.Builder.class);
        }

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

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

        @java.lang.Override
        public Builder clear() {
          super.clear();
          bitField0_ = 0;
          displayName_ = "";
          promptText_ = "";
          frozen_ = false;
          return this;
        }

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

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

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

        @java.lang.Override
        public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
            buildPartial() {
          com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
              result =
                  new com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                      .PromptTemplate(this);
          if (bitField0_ != 0) {
            buildPartial0(result);
          }
          onBuilt();
          return result;
        }

        private void buildPartial0(
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
                result) {
          int from_bitField0_ = bitField0_;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            result.displayName_ = displayName_;
          }
          if (((from_bitField0_ & 0x00000002) != 0)) {
            result.promptText_ = promptText_;
          }
          if (((from_bitField0_ & 0x00000004) != 0)) {
            result.frozen_ = frozen_;
          }
        }

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

        public Builder mergeFrom(
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
                other) {
          if (other
              == com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                  .PromptTemplate.getDefaultInstance()) return this;
          if (!other.getDisplayName().isEmpty()) {
            displayName_ = other.displayName_;
            bitField0_ |= 0x00000001;
            onChanged();
          }
          if (!other.getPromptText().isEmpty()) {
            promptText_ = other.promptText_;
            bitField0_ |= 0x00000002;
            onChanged();
          }
          if (other.getFrozen() != false) {
            setFrozen(other.getFrozen());
          }
          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:
                  {
                    displayName_ = input.readStringRequireUtf8();
                    bitField0_ |= 0x00000001;
                    break;
                  } // case 10
                case 18:
                  {
                    promptText_ = input.readStringRequireUtf8();
                    bitField0_ |= 0x00000002;
                    break;
                  } // case 18
                case 24:
                  {
                    frozen_ = input.readBool();
                    bitField0_ |= 0x00000004;
                    break;
                  } // case 24
                default:
                  {
                    if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                      done = true; // was an endgroup tag
                    }
                    break;
                  } // default:
              } // switch (tag)
            } // while (!done)
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.unwrapIOException();
          } finally {
            onChanged();
          } // finally
          return this;
        }

        private int bitField0_;

        private java.lang.Object displayName_ = "";
        /**
         *
         *
         * <pre>
         * Prompt name.
         * </pre>
         *
         * <code>string display_name = 1;</code>
         *
         * @return The displayName.
         */
        public java.lang.String getDisplayName() {
          java.lang.Object ref = displayName_;
          if (!(ref instanceof java.lang.String)) {
            com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
            java.lang.String s = bs.toStringUtf8();
            displayName_ = s;
            return s;
          } else {
            return (java.lang.String) ref;
          }
        }
        /**
         *
         *
         * <pre>
         * Prompt name.
         * </pre>
         *
         * <code>string display_name = 1;</code>
         *
         * @return The bytes for displayName.
         */
        public com.google.protobuf.ByteString getDisplayNameBytes() {
          java.lang.Object ref = displayName_;
          if (ref instanceof String) {
            com.google.protobuf.ByteString b =
                com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
            displayName_ = b;
            return b;
          } else {
            return (com.google.protobuf.ByteString) ref;
          }
        }
        /**
         *
         *
         * <pre>
         * Prompt name.
         * </pre>
         *
         * <code>string display_name = 1;</code>
         *
         * @param value The displayName to set.
         * @return This builder for chaining.
         */
        public Builder setDisplayName(java.lang.String value) {
          if (value == null) {
            throw new NullPointerException();
          }
          displayName_ = value;
          bitField0_ |= 0x00000001;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Prompt name.
         * </pre>
         *
         * <code>string display_name = 1;</code>
         *
         * @return This builder for chaining.
         */
        public Builder clearDisplayName() {
          displayName_ = getDefaultInstance().getDisplayName();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Prompt name.
         * </pre>
         *
         * <code>string display_name = 1;</code>
         *
         * @param value The bytes for displayName to set.
         * @return This builder for chaining.
         */
        public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
          if (value == null) {
            throw new NullPointerException();
          }
          checkByteStringIsUtf8(value);
          displayName_ = value;
          bitField0_ |= 0x00000001;
          onChanged();
          return this;
        }

        private java.lang.Object promptText_ = "";
        /**
         *
         *
         * <pre>
         * Prompt text that is sent to a LLM on no-match default, placeholders are
         * filled downstream. For example: "Here is a conversation $conversation,
         * a response is: "
         * </pre>
         *
         * <code>string prompt_text = 2;</code>
         *
         * @return The promptText.
         */
        public java.lang.String getPromptText() {
          java.lang.Object ref = promptText_;
          if (!(ref instanceof java.lang.String)) {
            com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
            java.lang.String s = bs.toStringUtf8();
            promptText_ = s;
            return s;
          } else {
            return (java.lang.String) ref;
          }
        }
        /**
         *
         *
         * <pre>
         * Prompt text that is sent to a LLM on no-match default, placeholders are
         * filled downstream. For example: "Here is a conversation $conversation,
         * a response is: "
         * </pre>
         *
         * <code>string prompt_text = 2;</code>
         *
         * @return The bytes for promptText.
         */
        public com.google.protobuf.ByteString getPromptTextBytes() {
          java.lang.Object ref = promptText_;
          if (ref instanceof String) {
            com.google.protobuf.ByteString b =
                com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
            promptText_ = b;
            return b;
          } else {
            return (com.google.protobuf.ByteString) ref;
          }
        }
        /**
         *
         *
         * <pre>
         * Prompt text that is sent to a LLM on no-match default, placeholders are
         * filled downstream. For example: "Here is a conversation $conversation,
         * a response is: "
         * </pre>
         *
         * <code>string prompt_text = 2;</code>
         *
         * @param value The promptText to set.
         * @return This builder for chaining.
         */
        public Builder setPromptText(java.lang.String value) {
          if (value == null) {
            throw new NullPointerException();
          }
          promptText_ = value;
          bitField0_ |= 0x00000002;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Prompt text that is sent to a LLM on no-match default, placeholders are
         * filled downstream. For example: "Here is a conversation $conversation,
         * a response is: "
         * </pre>
         *
         * <code>string prompt_text = 2;</code>
         *
         * @return This builder for chaining.
         */
        public Builder clearPromptText() {
          promptText_ = getDefaultInstance().getPromptText();
          bitField0_ = (bitField0_ & ~0x00000002);
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Prompt text that is sent to a LLM on no-match default, placeholders are
         * filled downstream. For example: "Here is a conversation $conversation,
         * a response is: "
         * </pre>
         *
         * <code>string prompt_text = 2;</code>
         *
         * @param value The bytes for promptText to set.
         * @return This builder for chaining.
         */
        public Builder setPromptTextBytes(com.google.protobuf.ByteString value) {
          if (value == null) {
            throw new NullPointerException();
          }
          checkByteStringIsUtf8(value);
          promptText_ = value;
          bitField0_ |= 0x00000002;
          onChanged();
          return this;
        }

        private boolean frozen_;
        /**
         *
         *
         * <pre>
         * If the flag is true, the prompt is frozen and cannot be modified by
         * users.
         * </pre>
         *
         * <code>bool frozen = 3;</code>
         *
         * @return The frozen.
         */
        @java.lang.Override
        public boolean getFrozen() {
          return frozen_;
        }
        /**
         *
         *
         * <pre>
         * If the flag is true, the prompt is frozen and cannot be modified by
         * users.
         * </pre>
         *
         * <code>bool frozen = 3;</code>
         *
         * @param value The frozen to set.
         * @return This builder for chaining.
         */
        public Builder setFrozen(boolean value) {

          frozen_ = value;
          bitField0_ |= 0x00000004;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * If the flag is true, the prompt is frozen and cannot be modified by
         * users.
         * </pre>
         *
         * <code>bool frozen = 3;</code>
         *
         * @return This builder for chaining.
         */
        public Builder clearFrozen() {
          bitField0_ = (bitField0_ & ~0x00000004);
          frozen_ = false;
          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.GenerativeSettings.FallbackSettings.PromptTemplate)
      }

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

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

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

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

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

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

    public static final int SELECTED_PROMPT_FIELD_NUMBER = 3;

    @SuppressWarnings("serial")
    private volatile java.lang.Object selectedPrompt_ = "";
    /**
     *
     *
     * <pre>
     * Display name of the selected prompt.
     * </pre>
     *
     * <code>string selected_prompt = 3;</code>
     *
     * @return The selectedPrompt.
     */
    @java.lang.Override
    public java.lang.String getSelectedPrompt() {
      java.lang.Object ref = selectedPrompt_;
      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();
        selectedPrompt_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Display name of the selected prompt.
     * </pre>
     *
     * <code>string selected_prompt = 3;</code>
     *
     * @return The bytes for selectedPrompt.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getSelectedPromptBytes() {
      java.lang.Object ref = selectedPrompt_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        selectedPrompt_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int PROMPT_TEMPLATES_FIELD_NUMBER = 4;

    @SuppressWarnings("serial")
    private java.util.List<
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate>
        promptTemplates_;
    /**
     *
     *
     * <pre>
     * Stored prompts that can be selected, for example default templates like
     * "conservative" or "chatty", or user defined ones.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
     * </code>
     */
    @java.lang.Override
    public java.util.List<
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate>
        getPromptTemplatesList() {
      return promptTemplates_;
    }
    /**
     *
     *
     * <pre>
     * Stored prompts that can be selected, for example default templates like
     * "conservative" or "chatty", or user defined ones.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
     * </code>
     */
    @java.lang.Override
    public java.util.List<
            ? extends
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                    .PromptTemplateOrBuilder>
        getPromptTemplatesOrBuilderList() {
      return promptTemplates_;
    }
    /**
     *
     *
     * <pre>
     * Stored prompts that can be selected, for example default templates like
     * "conservative" or "chatty", or user defined ones.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
     * </code>
     */
    @java.lang.Override
    public int getPromptTemplatesCount() {
      return promptTemplates_.size();
    }
    /**
     *
     *
     * <pre>
     * Stored prompts that can be selected, for example default templates like
     * "conservative" or "chatty", or user defined ones.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
        getPromptTemplates(int index) {
      return promptTemplates_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Stored prompts that can be selected, for example default templates like
     * "conservative" or "chatty", or user defined ones.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
            .PromptTemplateOrBuilder
        getPromptTemplatesOrBuilder(int index) {
      return promptTemplates_.get(index);
    }

    private byte memoizedIsInitialized = -1;

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

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selectedPrompt_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, selectedPrompt_);
      }
      for (int i = 0; i < promptTemplates_.size(); i++) {
        output.writeMessage(4, promptTemplates_.get(i));
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selectedPrompt_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, selectedPrompt_);
      }
      for (int i = 0; i < promptTemplates_.size(); i++) {
        size +=
            com.google.protobuf.CodedOutputStream.computeMessageSize(4, promptTemplates_.get(i));
      }
      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.GenerativeSettings.FallbackSettings)) {
        return super.equals(obj);
      }
      com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings other =
          (com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings) obj;

      if (!getSelectedPrompt().equals(other.getSelectedPrompt())) return false;
      if (!getPromptTemplatesList().equals(other.getPromptTemplatesList())) return false;
      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + SELECTED_PROMPT_FIELD_NUMBER;
      hash = (53 * hash) + getSelectedPrompt().hashCode();
      if (getPromptTemplatesCount() > 0) {
        hash = (37 * hash) + PROMPT_TEMPLATES_FIELD_NUMBER;
        hash = (53 * hash) + getPromptTemplatesList().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

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

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

    public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings 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.GenerativeSettings.FallbackSettings 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.GenerativeSettings.FallbackSettings 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.GenerativeSettings.FallbackSettings
        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.GenerativeSettings.FallbackSettings
        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.GenerativeSettings.FallbackSettings 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.GenerativeSettings.FallbackSettings 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.GenerativeSettings.FallbackSettings 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;
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Fallback.
     * </pre>
     *
     * Protobuf type {@code google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings)
        com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto
            .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto
            .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_FallbackSettings_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.class,
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.Builder
                    .class);
      }

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

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        selectedPrompt_ = "";
        if (promptTemplatesBuilder_ == null) {
          promptTemplates_ = java.util.Collections.emptyList();
        } else {
          promptTemplates_ = null;
          promptTemplatesBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

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

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

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

      @java.lang.Override
      public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings buildPartial() {
        com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings result =
            new com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings(this);
        buildPartialRepeatedFields(result);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        onBuilt();
        return result;
      }

      private void buildPartialRepeatedFields(
          com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings result) {
        if (promptTemplatesBuilder_ == null) {
          if (((bitField0_ & 0x00000002) != 0)) {
            promptTemplates_ = java.util.Collections.unmodifiableList(promptTemplates_);
            bitField0_ = (bitField0_ & ~0x00000002);
          }
          result.promptTemplates_ = promptTemplates_;
        } else {
          result.promptTemplates_ = promptTemplatesBuilder_.build();
        }
      }

      private void buildPartial0(
          com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.selectedPrompt_ = selectedPrompt_;
        }
      }

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

      public Builder mergeFrom(
          com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings other) {
        if (other
            == com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                .getDefaultInstance()) return this;
        if (!other.getSelectedPrompt().isEmpty()) {
          selectedPrompt_ = other.selectedPrompt_;
          bitField0_ |= 0x00000001;
          onChanged();
        }
        if (promptTemplatesBuilder_ == null) {
          if (!other.promptTemplates_.isEmpty()) {
            if (promptTemplates_.isEmpty()) {
              promptTemplates_ = other.promptTemplates_;
              bitField0_ = (bitField0_ & ~0x00000002);
            } else {
              ensurePromptTemplatesIsMutable();
              promptTemplates_.addAll(other.promptTemplates_);
            }
            onChanged();
          }
        } else {
          if (!other.promptTemplates_.isEmpty()) {
            if (promptTemplatesBuilder_.isEmpty()) {
              promptTemplatesBuilder_.dispose();
              promptTemplatesBuilder_ = null;
              promptTemplates_ = other.promptTemplates_;
              bitField0_ = (bitField0_ & ~0x00000002);
              promptTemplatesBuilder_ =
                  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                      ? getPromptTemplatesFieldBuilder()
                      : null;
            } else {
              promptTemplatesBuilder_.addAllMessages(other.promptTemplates_);
            }
          }
        }
        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 26:
                {
                  selectedPrompt_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 26
              case 34:
                {
                  com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                          .PromptTemplate
                      m =
                          input.readMessage(
                              com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                                  .PromptTemplate.parser(),
                              extensionRegistry);
                  if (promptTemplatesBuilder_ == null) {
                    ensurePromptTemplatesIsMutable();
                    promptTemplates_.add(m);
                  } else {
                    promptTemplatesBuilder_.addMessage(m);
                  }
                  break;
                } // case 34
              default:
                {
                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                    done = true; // was an endgroup tag
                  }
                  break;
                } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }

      private int bitField0_;

      private java.lang.Object selectedPrompt_ = "";
      /**
       *
       *
       * <pre>
       * Display name of the selected prompt.
       * </pre>
       *
       * <code>string selected_prompt = 3;</code>
       *
       * @return The selectedPrompt.
       */
      public java.lang.String getSelectedPrompt() {
        java.lang.Object ref = selectedPrompt_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          selectedPrompt_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Display name of the selected prompt.
       * </pre>
       *
       * <code>string selected_prompt = 3;</code>
       *
       * @return The bytes for selectedPrompt.
       */
      public com.google.protobuf.ByteString getSelectedPromptBytes() {
        java.lang.Object ref = selectedPrompt_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          selectedPrompt_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Display name of the selected prompt.
       * </pre>
       *
       * <code>string selected_prompt = 3;</code>
       *
       * @param value The selectedPrompt to set.
       * @return This builder for chaining.
       */
      public Builder setSelectedPrompt(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        selectedPrompt_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Display name of the selected prompt.
       * </pre>
       *
       * <code>string selected_prompt = 3;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearSelectedPrompt() {
        selectedPrompt_ = getDefaultInstance().getSelectedPrompt();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Display name of the selected prompt.
       * </pre>
       *
       * <code>string selected_prompt = 3;</code>
       *
       * @param value The bytes for selectedPrompt to set.
       * @return This builder for chaining.
       */
      public Builder setSelectedPromptBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        selectedPrompt_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      private java.util.List<
              com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate>
          promptTemplates_ = java.util.Collections.emptyList();

      private void ensurePromptTemplatesIsMutable() {
        if (!((bitField0_ & 0x00000002) != 0)) {
          promptTemplates_ =
              new java.util.ArrayList<
                  com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                      .PromptTemplate>(promptTemplates_);
          bitField0_ |= 0x00000002;
        }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate,
              com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
                  .Builder,
              com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                  .PromptTemplateOrBuilder>
          promptTemplatesBuilder_;

      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public java.util.List<
              com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate>
          getPromptTemplatesList() {
        if (promptTemplatesBuilder_ == null) {
          return java.util.Collections.unmodifiableList(promptTemplates_);
        } else {
          return promptTemplatesBuilder_.getMessageList();
        }
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public int getPromptTemplatesCount() {
        if (promptTemplatesBuilder_ == null) {
          return promptTemplates_.size();
        } else {
          return promptTemplatesBuilder_.getCount();
        }
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
          getPromptTemplates(int index) {
        if (promptTemplatesBuilder_ == null) {
          return promptTemplates_.get(index);
        } else {
          return promptTemplatesBuilder_.getMessage(index);
        }
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public Builder setPromptTemplates(
          int index,
          com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
              value) {
        if (promptTemplatesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensurePromptTemplatesIsMutable();
          promptTemplates_.set(index, value);
          onChanged();
        } else {
          promptTemplatesBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public Builder setPromptTemplates(
          int index,
          com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
                  .Builder
              builderForValue) {
        if (promptTemplatesBuilder_ == null) {
          ensurePromptTemplatesIsMutable();
          promptTemplates_.set(index, builderForValue.build());
          onChanged();
        } else {
          promptTemplatesBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public Builder addPromptTemplates(
          com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
              value) {
        if (promptTemplatesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensurePromptTemplatesIsMutable();
          promptTemplates_.add(value);
          onChanged();
        } else {
          promptTemplatesBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public Builder addPromptTemplates(
          int index,
          com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
              value) {
        if (promptTemplatesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensurePromptTemplatesIsMutable();
          promptTemplates_.add(index, value);
          onChanged();
        } else {
          promptTemplatesBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public Builder addPromptTemplates(
          com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
                  .Builder
              builderForValue) {
        if (promptTemplatesBuilder_ == null) {
          ensurePromptTemplatesIsMutable();
          promptTemplates_.add(builderForValue.build());
          onChanged();
        } else {
          promptTemplatesBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public Builder addPromptTemplates(
          int index,
          com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
                  .Builder
              builderForValue) {
        if (promptTemplatesBuilder_ == null) {
          ensurePromptTemplatesIsMutable();
          promptTemplates_.add(index, builderForValue.build());
          onChanged();
        } else {
          promptTemplatesBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public Builder addAllPromptTemplates(
          java.lang.Iterable<
                  ? extends
                      com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                          .PromptTemplate>
              values) {
        if (promptTemplatesBuilder_ == null) {
          ensurePromptTemplatesIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(values, promptTemplates_);
          onChanged();
        } else {
          promptTemplatesBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public Builder clearPromptTemplates() {
        if (promptTemplatesBuilder_ == null) {
          promptTemplates_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000002);
          onChanged();
        } else {
          promptTemplatesBuilder_.clear();
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public Builder removePromptTemplates(int index) {
        if (promptTemplatesBuilder_ == null) {
          ensurePromptTemplatesIsMutable();
          promptTemplates_.remove(index);
          onChanged();
        } else {
          promptTemplatesBuilder_.remove(index);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
              .Builder
          getPromptTemplatesBuilder(int index) {
        return getPromptTemplatesFieldBuilder().getBuilder(index);
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
              .PromptTemplateOrBuilder
          getPromptTemplatesOrBuilder(int index) {
        if (promptTemplatesBuilder_ == null) {
          return promptTemplates_.get(index);
        } else {
          return promptTemplatesBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public java.util.List<
              ? extends
                  com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                      .PromptTemplateOrBuilder>
          getPromptTemplatesOrBuilderList() {
        if (promptTemplatesBuilder_ != null) {
          return promptTemplatesBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(promptTemplates_);
        }
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
              .Builder
          addPromptTemplatesBuilder() {
        return getPromptTemplatesFieldBuilder()
            .addBuilder(
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
                    .getDefaultInstance());
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
              .Builder
          addPromptTemplatesBuilder(int index) {
        return getPromptTemplatesFieldBuilder()
            .addBuilder(
                index,
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
                    .getDefaultInstance());
      }
      /**
       *
       *
       * <pre>
       * Stored prompts that can be selected, for example default templates like
       * "conservative" or "chatty", or user defined ones.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate prompt_templates = 4;
       * </code>
       */
      public java.util.List<
              com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
                  .Builder>
          getPromptTemplatesBuilderList() {
        return getPromptTemplatesFieldBuilder().getBuilderList();
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate,
              com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.PromptTemplate
                  .Builder,
              com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                  .PromptTemplateOrBuilder>
          getPromptTemplatesFieldBuilder() {
        if (promptTemplatesBuilder_ == null) {
          promptTemplatesBuilder_ =
              new com.google.protobuf.RepeatedFieldBuilderV3<
                  com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                      .PromptTemplate,
                  com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                      .PromptTemplate.Builder,
                  com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                      .PromptTemplateOrBuilder>(
                  promptTemplates_,
                  ((bitField0_ & 0x00000002) != 0),
                  getParentForChildren(),
                  isClean());
          promptTemplates_ = null;
        }
        return promptTemplatesBuilder_;
      }

      @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.GenerativeSettings.FallbackSettings)
    }

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

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

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

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

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

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

  public interface KnowledgeConnectorSettingsOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Name of the company, organization or other entity that the agent
     * represents. Used for knowledge connector LLM prompt and for knowledge
     * search.
     * </pre>
     *
     * <code>string business = 1;</code>
     *
     * @return The business.
     */
    java.lang.String getBusiness();
    /**
     *
     *
     * <pre>
     * Name of the company, organization or other entity that the agent
     * represents. Used for knowledge connector LLM prompt and for knowledge
     * search.
     * </pre>
     *
     * <code>string business = 1;</code>
     *
     * @return The bytes for business.
     */
    com.google.protobuf.ByteString getBusinessBytes();

    /**
     *
     *
     * <pre>
     * Name of the virtual agent. Used for LLM prompt. Can be left empty.
     * </pre>
     *
     * <code>string agent = 2;</code>
     *
     * @return The agent.
     */
    java.lang.String getAgent();
    /**
     *
     *
     * <pre>
     * Name of the virtual agent. Used for LLM prompt. Can be left empty.
     * </pre>
     *
     * <code>string agent = 2;</code>
     *
     * @return The bytes for agent.
     */
    com.google.protobuf.ByteString getAgentBytes();

    /**
     *
     *
     * <pre>
     * Identity of the agent, e.g. "virtual agent", "AI assistant".
     * </pre>
     *
     * <code>string agent_identity = 3;</code>
     *
     * @return The agentIdentity.
     */
    java.lang.String getAgentIdentity();
    /**
     *
     *
     * <pre>
     * Identity of the agent, e.g. "virtual agent", "AI assistant".
     * </pre>
     *
     * <code>string agent_identity = 3;</code>
     *
     * @return The bytes for agentIdentity.
     */
    com.google.protobuf.ByteString getAgentIdentityBytes();

    /**
     *
     *
     * <pre>
     * Company description, used for LLM prompt, e.g. "a family company selling
     * freshly roasted coffee beans".
     * </pre>
     *
     * <code>string business_description = 4;</code>
     *
     * @return The businessDescription.
     */
    java.lang.String getBusinessDescription();
    /**
     *
     *
     * <pre>
     * Company description, used for LLM prompt, e.g. "a family company selling
     * freshly roasted coffee beans".
     * </pre>
     *
     * <code>string business_description = 4;</code>
     *
     * @return The bytes for businessDescription.
     */
    com.google.protobuf.ByteString getBusinessDescriptionBytes();

    /**
     *
     *
     * <pre>
     * Agent scope, e.g. "Example company website", "internal Example
     * company website for employees", "manual of car owner".
     * </pre>
     *
     * <code>string agent_scope = 5;</code>
     *
     * @return The agentScope.
     */
    java.lang.String getAgentScope();
    /**
     *
     *
     * <pre>
     * Agent scope, e.g. "Example company website", "internal Example
     * company website for employees", "manual of car owner".
     * </pre>
     *
     * <code>string agent_scope = 5;</code>
     *
     * @return The bytes for agentScope.
     */
    com.google.protobuf.ByteString getAgentScopeBytes();
  }
  /**
   *
   *
   * <pre>
   * Settings for knowledge connector. These parameters are used for LLM prompt
   * like "You are &lt;agent&gt;. You are a helpful and verbose &lt;agent_identity&gt; at
   * &lt;business&gt;, &lt;business_description&gt;. Your task is to help humans on
   * &lt;agent_scope&gt;".
   * </pre>
   *
   * Protobuf type {@code
   * google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings}
   */
  public static final class KnowledgeConnectorSettings
      extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings)
      KnowledgeConnectorSettingsOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use KnowledgeConnectorSettings.newBuilder() to construct.
    private KnowledgeConnectorSettings(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private KnowledgeConnectorSettings() {
      business_ = "";
      agent_ = "";
      agentIdentity_ = "";
      businessDescription_ = "";
      agentScope_ = "";
    }

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

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto
          .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto
          .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.class,
              com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
                  .Builder.class);
    }

    public static final int BUSINESS_FIELD_NUMBER = 1;

    @SuppressWarnings("serial")
    private volatile java.lang.Object business_ = "";
    /**
     *
     *
     * <pre>
     * Name of the company, organization or other entity that the agent
     * represents. Used for knowledge connector LLM prompt and for knowledge
     * search.
     * </pre>
     *
     * <code>string business = 1;</code>
     *
     * @return The business.
     */
    @java.lang.Override
    public java.lang.String getBusiness() {
      java.lang.Object ref = business_;
      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();
        business_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Name of the company, organization or other entity that the agent
     * represents. Used for knowledge connector LLM prompt and for knowledge
     * search.
     * </pre>
     *
     * <code>string business = 1;</code>
     *
     * @return The bytes for business.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getBusinessBytes() {
      java.lang.Object ref = business_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        business_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int AGENT_FIELD_NUMBER = 2;

    @SuppressWarnings("serial")
    private volatile java.lang.Object agent_ = "";
    /**
     *
     *
     * <pre>
     * Name of the virtual agent. Used for LLM prompt. Can be left empty.
     * </pre>
     *
     * <code>string agent = 2;</code>
     *
     * @return The agent.
     */
    @java.lang.Override
    public java.lang.String getAgent() {
      java.lang.Object ref = agent_;
      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();
        agent_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Name of the virtual agent. Used for LLM prompt. Can be left empty.
     * </pre>
     *
     * <code>string agent = 2;</code>
     *
     * @return The bytes for agent.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getAgentBytes() {
      java.lang.Object ref = agent_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        agent_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int AGENT_IDENTITY_FIELD_NUMBER = 3;

    @SuppressWarnings("serial")
    private volatile java.lang.Object agentIdentity_ = "";
    /**
     *
     *
     * <pre>
     * Identity of the agent, e.g. "virtual agent", "AI assistant".
     * </pre>
     *
     * <code>string agent_identity = 3;</code>
     *
     * @return The agentIdentity.
     */
    @java.lang.Override
    public java.lang.String getAgentIdentity() {
      java.lang.Object ref = agentIdentity_;
      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();
        agentIdentity_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Identity of the agent, e.g. "virtual agent", "AI assistant".
     * </pre>
     *
     * <code>string agent_identity = 3;</code>
     *
     * @return The bytes for agentIdentity.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getAgentIdentityBytes() {
      java.lang.Object ref = agentIdentity_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        agentIdentity_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int BUSINESS_DESCRIPTION_FIELD_NUMBER = 4;

    @SuppressWarnings("serial")
    private volatile java.lang.Object businessDescription_ = "";
    /**
     *
     *
     * <pre>
     * Company description, used for LLM prompt, e.g. "a family company selling
     * freshly roasted coffee beans".
     * </pre>
     *
     * <code>string business_description = 4;</code>
     *
     * @return The businessDescription.
     */
    @java.lang.Override
    public java.lang.String getBusinessDescription() {
      java.lang.Object ref = businessDescription_;
      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();
        businessDescription_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Company description, used for LLM prompt, e.g. "a family company selling
     * freshly roasted coffee beans".
     * </pre>
     *
     * <code>string business_description = 4;</code>
     *
     * @return The bytes for businessDescription.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getBusinessDescriptionBytes() {
      java.lang.Object ref = businessDescription_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        businessDescription_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int AGENT_SCOPE_FIELD_NUMBER = 5;

    @SuppressWarnings("serial")
    private volatile java.lang.Object agentScope_ = "";
    /**
     *
     *
     * <pre>
     * Agent scope, e.g. "Example company website", "internal Example
     * company website for employees", "manual of car owner".
     * </pre>
     *
     * <code>string agent_scope = 5;</code>
     *
     * @return The agentScope.
     */
    @java.lang.Override
    public java.lang.String getAgentScope() {
      java.lang.Object ref = agentScope_;
      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();
        agentScope_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Agent scope, e.g. "Example company website", "internal Example
     * company website for employees", "manual of car owner".
     * </pre>
     *
     * <code>string agent_scope = 5;</code>
     *
     * @return The bytes for agentScope.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getAgentScopeBytes() {
      java.lang.Object ref = agentScope_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        agentScope_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(business_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, business_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, agent_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentIdentity_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, agentIdentity_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessDescription_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, businessDescription_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentScope_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, agentScope_);
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(business_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, business_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agent_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, agent_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentIdentity_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, agentIdentity_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessDescription_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, businessDescription_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(agentScope_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, agentScope_);
      }
      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.GenerativeSettings.KnowledgeConnectorSettings)) {
        return super.equals(obj);
      }
      com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings other =
          (com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings) obj;

      if (!getBusiness().equals(other.getBusiness())) return false;
      if (!getAgent().equals(other.getAgent())) return false;
      if (!getAgentIdentity().equals(other.getAgentIdentity())) return false;
      if (!getBusinessDescription().equals(other.getBusinessDescription())) return false;
      if (!getAgentScope().equals(other.getAgentScope())) return false;
      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + BUSINESS_FIELD_NUMBER;
      hash = (53 * hash) + getBusiness().hashCode();
      hash = (37 * hash) + AGENT_FIELD_NUMBER;
      hash = (53 * hash) + getAgent().hashCode();
      hash = (37 * hash) + AGENT_IDENTITY_FIELD_NUMBER;
      hash = (53 * hash) + getAgentIdentity().hashCode();
      hash = (37 * hash) + BUSINESS_DESCRIPTION_FIELD_NUMBER;
      hash = (53 * hash) + getBusinessDescription().hashCode();
      hash = (37 * hash) + AGENT_SCOPE_FIELD_NUMBER;
      hash = (53 * hash) + getAgentScope().hashCode();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

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

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

    public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
        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.GenerativeSettings.KnowledgeConnectorSettings
        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.GenerativeSettings.KnowledgeConnectorSettings
        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.GenerativeSettings.KnowledgeConnectorSettings
        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.GenerativeSettings.KnowledgeConnectorSettings
        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.GenerativeSettings.KnowledgeConnectorSettings
        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.GenerativeSettings.KnowledgeConnectorSettings
        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.GenerativeSettings.KnowledgeConnectorSettings 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;
    }
    /**
     *
     *
     * <pre>
     * Settings for knowledge connector. These parameters are used for LLM prompt
     * like "You are &lt;agent&gt;. You are a helpful and verbose &lt;agent_identity&gt; at
     * &lt;business&gt;, &lt;business_description&gt;. Your task is to help humans on
     * &lt;agent_scope&gt;".
     * </pre>
     *
     * Protobuf type {@code
     * google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings)
        com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettingsOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto
            .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto
            .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_KnowledgeConnectorSettings_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
                    .class,
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
                    .Builder.class);
      }

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

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        business_ = "";
        agent_ = "";
        agentIdentity_ = "";
        businessDescription_ = "";
        agentScope_ = "";
        return this;
      }

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

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

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

      @java.lang.Override
      public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
          buildPartial() {
        com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings result =
            new com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings(
                this);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        onBuilt();
        return result;
      }

      private void buildPartial0(
          com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.business_ = business_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.agent_ = agent_;
        }
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.agentIdentity_ = agentIdentity_;
        }
        if (((from_bitField0_ & 0x00000008) != 0)) {
          result.businessDescription_ = businessDescription_;
        }
        if (((from_bitField0_ & 0x00000010) != 0)) {
          result.agentScope_ = agentScope_;
        }
      }

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

      public Builder mergeFrom(
          com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings other) {
        if (other
            == com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
                .getDefaultInstance()) return this;
        if (!other.getBusiness().isEmpty()) {
          business_ = other.business_;
          bitField0_ |= 0x00000001;
          onChanged();
        }
        if (!other.getAgent().isEmpty()) {
          agent_ = other.agent_;
          bitField0_ |= 0x00000002;
          onChanged();
        }
        if (!other.getAgentIdentity().isEmpty()) {
          agentIdentity_ = other.agentIdentity_;
          bitField0_ |= 0x00000004;
          onChanged();
        }
        if (!other.getBusinessDescription().isEmpty()) {
          businessDescription_ = other.businessDescription_;
          bitField0_ |= 0x00000008;
          onChanged();
        }
        if (!other.getAgentScope().isEmpty()) {
          agentScope_ = other.agentScope_;
          bitField0_ |= 0x00000010;
          onChanged();
        }
        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:
                {
                  business_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 10
              case 18:
                {
                  agent_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000002;
                  break;
                } // case 18
              case 26:
                {
                  agentIdentity_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000004;
                  break;
                } // case 26
              case 34:
                {
                  businessDescription_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000008;
                  break;
                } // case 34
              case 42:
                {
                  agentScope_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000010;
                  break;
                } // case 42
              default:
                {
                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                    done = true; // was an endgroup tag
                  }
                  break;
                } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }

      private int bitField0_;

      private java.lang.Object business_ = "";
      /**
       *
       *
       * <pre>
       * Name of the company, organization or other entity that the agent
       * represents. Used for knowledge connector LLM prompt and for knowledge
       * search.
       * </pre>
       *
       * <code>string business = 1;</code>
       *
       * @return The business.
       */
      public java.lang.String getBusiness() {
        java.lang.Object ref = business_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          business_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Name of the company, organization or other entity that the agent
       * represents. Used for knowledge connector LLM prompt and for knowledge
       * search.
       * </pre>
       *
       * <code>string business = 1;</code>
       *
       * @return The bytes for business.
       */
      public com.google.protobuf.ByteString getBusinessBytes() {
        java.lang.Object ref = business_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          business_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Name of the company, organization or other entity that the agent
       * represents. Used for knowledge connector LLM prompt and for knowledge
       * search.
       * </pre>
       *
       * <code>string business = 1;</code>
       *
       * @param value The business to set.
       * @return This builder for chaining.
       */
      public Builder setBusiness(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        business_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Name of the company, organization or other entity that the agent
       * represents. Used for knowledge connector LLM prompt and for knowledge
       * search.
       * </pre>
       *
       * <code>string business = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearBusiness() {
        business_ = getDefaultInstance().getBusiness();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Name of the company, organization or other entity that the agent
       * represents. Used for knowledge connector LLM prompt and for knowledge
       * search.
       * </pre>
       *
       * <code>string business = 1;</code>
       *
       * @param value The bytes for business to set.
       * @return This builder for chaining.
       */
      public Builder setBusinessBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        business_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      private java.lang.Object agent_ = "";
      /**
       *
       *
       * <pre>
       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
       * </pre>
       *
       * <code>string agent = 2;</code>
       *
       * @return The agent.
       */
      public java.lang.String getAgent() {
        java.lang.Object ref = agent_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          agent_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
       * </pre>
       *
       * <code>string agent = 2;</code>
       *
       * @return The bytes for agent.
       */
      public com.google.protobuf.ByteString getAgentBytes() {
        java.lang.Object ref = agent_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          agent_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
       * </pre>
       *
       * <code>string agent = 2;</code>
       *
       * @param value The agent to set.
       * @return This builder for chaining.
       */
      public Builder setAgent(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        agent_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
       * </pre>
       *
       * <code>string agent = 2;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearAgent() {
        agent_ = getDefaultInstance().getAgent();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Name of the virtual agent. Used for LLM prompt. Can be left empty.
       * </pre>
       *
       * <code>string agent = 2;</code>
       *
       * @param value The bytes for agent to set.
       * @return This builder for chaining.
       */
      public Builder setAgentBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        agent_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }

      private java.lang.Object agentIdentity_ = "";
      /**
       *
       *
       * <pre>
       * Identity of the agent, e.g. "virtual agent", "AI assistant".
       * </pre>
       *
       * <code>string agent_identity = 3;</code>
       *
       * @return The agentIdentity.
       */
      public java.lang.String getAgentIdentity() {
        java.lang.Object ref = agentIdentity_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          agentIdentity_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Identity of the agent, e.g. "virtual agent", "AI assistant".
       * </pre>
       *
       * <code>string agent_identity = 3;</code>
       *
       * @return The bytes for agentIdentity.
       */
      public com.google.protobuf.ByteString getAgentIdentityBytes() {
        java.lang.Object ref = agentIdentity_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          agentIdentity_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Identity of the agent, e.g. "virtual agent", "AI assistant".
       * </pre>
       *
       * <code>string agent_identity = 3;</code>
       *
       * @param value The agentIdentity to set.
       * @return This builder for chaining.
       */
      public Builder setAgentIdentity(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        agentIdentity_ = value;
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Identity of the agent, e.g. "virtual agent", "AI assistant".
       * </pre>
       *
       * <code>string agent_identity = 3;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearAgentIdentity() {
        agentIdentity_ = getDefaultInstance().getAgentIdentity();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Identity of the agent, e.g. "virtual agent", "AI assistant".
       * </pre>
       *
       * <code>string agent_identity = 3;</code>
       *
       * @param value The bytes for agentIdentity to set.
       * @return This builder for chaining.
       */
      public Builder setAgentIdentityBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        agentIdentity_ = value;
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }

      private java.lang.Object businessDescription_ = "";
      /**
       *
       *
       * <pre>
       * Company description, used for LLM prompt, e.g. "a family company selling
       * freshly roasted coffee beans".
       * </pre>
       *
       * <code>string business_description = 4;</code>
       *
       * @return The businessDescription.
       */
      public java.lang.String getBusinessDescription() {
        java.lang.Object ref = businessDescription_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          businessDescription_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Company description, used for LLM prompt, e.g. "a family company selling
       * freshly roasted coffee beans".
       * </pre>
       *
       * <code>string business_description = 4;</code>
       *
       * @return The bytes for businessDescription.
       */
      public com.google.protobuf.ByteString getBusinessDescriptionBytes() {
        java.lang.Object ref = businessDescription_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          businessDescription_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Company description, used for LLM prompt, e.g. "a family company selling
       * freshly roasted coffee beans".
       * </pre>
       *
       * <code>string business_description = 4;</code>
       *
       * @param value The businessDescription to set.
       * @return This builder for chaining.
       */
      public Builder setBusinessDescription(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        businessDescription_ = value;
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Company description, used for LLM prompt, e.g. "a family company selling
       * freshly roasted coffee beans".
       * </pre>
       *
       * <code>string business_description = 4;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearBusinessDescription() {
        businessDescription_ = getDefaultInstance().getBusinessDescription();
        bitField0_ = (bitField0_ & ~0x00000008);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Company description, used for LLM prompt, e.g. "a family company selling
       * freshly roasted coffee beans".
       * </pre>
       *
       * <code>string business_description = 4;</code>
       *
       * @param value The bytes for businessDescription to set.
       * @return This builder for chaining.
       */
      public Builder setBusinessDescriptionBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        businessDescription_ = value;
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }

      private java.lang.Object agentScope_ = "";
      /**
       *
       *
       * <pre>
       * Agent scope, e.g. "Example company website", "internal Example
       * company website for employees", "manual of car owner".
       * </pre>
       *
       * <code>string agent_scope = 5;</code>
       *
       * @return The agentScope.
       */
      public java.lang.String getAgentScope() {
        java.lang.Object ref = agentScope_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          agentScope_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Agent scope, e.g. "Example company website", "internal Example
       * company website for employees", "manual of car owner".
       * </pre>
       *
       * <code>string agent_scope = 5;</code>
       *
       * @return The bytes for agentScope.
       */
      public com.google.protobuf.ByteString getAgentScopeBytes() {
        java.lang.Object ref = agentScope_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          agentScope_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Agent scope, e.g. "Example company website", "internal Example
       * company website for employees", "manual of car owner".
       * </pre>
       *
       * <code>string agent_scope = 5;</code>
       *
       * @param value The agentScope to set.
       * @return This builder for chaining.
       */
      public Builder setAgentScope(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        agentScope_ = value;
        bitField0_ |= 0x00000010;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Agent scope, e.g. "Example company website", "internal Example
       * company website for employees", "manual of car owner".
       * </pre>
       *
       * <code>string agent_scope = 5;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearAgentScope() {
        agentScope_ = getDefaultInstance().getAgentScope();
        bitField0_ = (bitField0_ & ~0x00000010);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Agent scope, e.g. "Example company website", "internal Example
       * company website for employees", "manual of car owner".
       * </pre>
       *
       * <code>string agent_scope = 5;</code>
       *
       * @param value The bytes for agentScope to set.
       * @return This builder for chaining.
       */
      public Builder setAgentScopeBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        agentScope_ = value;
        bitField0_ |= 0x00000010;
        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.GenerativeSettings.KnowledgeConnectorSettings)
    }

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

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

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

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

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

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

  public static final int NAME_FIELD_NUMBER = 5;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
   * ID&gt;/generativeSettings`.
   * </pre>
   *
   * <code>string name = 5;</code>
   *
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    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();
      name_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
   * ID&gt;/generativeSettings`.
   * </pre>
   *
   * <code>string name = 5;</code>
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FALLBACK_SETTINGS_FIELD_NUMBER = 1;
  private com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallbackSettings_;
  /**
   *
   *
   * <pre>
   * Settings for Generative Fallback.
   * </pre>
   *
   * <code>.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1;
   * </code>
   *
   * @return Whether the fallbackSettings field is set.
   */
  @java.lang.Override
  public boolean hasFallbackSettings() {
    return fallbackSettings_ != null;
  }
  /**
   *
   *
   * <pre>
   * Settings for Generative Fallback.
   * </pre>
   *
   * <code>.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1;
   * </code>
   *
   * @return The fallbackSettings.
   */
  @java.lang.Override
  public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
      getFallbackSettings() {
    return fallbackSettings_ == null
        ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.getDefaultInstance()
        : fallbackSettings_;
  }
  /**
   *
   *
   * <pre>
   * Settings for Generative Fallback.
   * </pre>
   *
   * <code>.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsOrBuilder
      getFallbackSettingsOrBuilder() {
    return fallbackSettings_ == null
        ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.getDefaultInstance()
        : fallbackSettings_;
  }

  public static final int GENERATIVE_SAFETY_SETTINGS_FIELD_NUMBER = 3;
  private com.google.cloud.dialogflow.cx.v3.SafetySettings generativeSafetySettings_;
  /**
   *
   *
   * <pre>
   * Settings for Generative Safety.
   * </pre>
   *
   * <code>.google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3;</code>
   *
   * @return Whether the generativeSafetySettings field is set.
   */
  @java.lang.Override
  public boolean hasGenerativeSafetySettings() {
    return generativeSafetySettings_ != null;
  }
  /**
   *
   *
   * <pre>
   * Settings for Generative Safety.
   * </pre>
   *
   * <code>.google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3;</code>
   *
   * @return The generativeSafetySettings.
   */
  @java.lang.Override
  public com.google.cloud.dialogflow.cx.v3.SafetySettings getGenerativeSafetySettings() {
    return generativeSafetySettings_ == null
        ? com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance()
        : generativeSafetySettings_;
  }
  /**
   *
   *
   * <pre>
   * Settings for Generative Safety.
   * </pre>
   *
   * <code>.google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3;</code>
   */
  @java.lang.Override
  public com.google.cloud.dialogflow.cx.v3.SafetySettingsOrBuilder
      getGenerativeSafetySettingsOrBuilder() {
    return generativeSafetySettings_ == null
        ? com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance()
        : generativeSafetySettings_;
  }

  public static final int KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER = 7;
  private com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
      knowledgeConnectorSettings_;
  /**
   *
   *
   * <pre>
   * Settings for knowledge connector.
   * </pre>
   *
   * <code>
   * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
   * </code>
   *
   * @return Whether the knowledgeConnectorSettings field is set.
   */
  @java.lang.Override
  public boolean hasKnowledgeConnectorSettings() {
    return knowledgeConnectorSettings_ != null;
  }
  /**
   *
   *
   * <pre>
   * Settings for knowledge connector.
   * </pre>
   *
   * <code>
   * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
   * </code>
   *
   * @return The knowledgeConnectorSettings.
   */
  @java.lang.Override
  public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
      getKnowledgeConnectorSettings() {
    return knowledgeConnectorSettings_ == null
        ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
            .getDefaultInstance()
        : knowledgeConnectorSettings_;
  }
  /**
   *
   *
   * <pre>
   * Settings for knowledge connector.
   * </pre>
   *
   * <code>
   * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettingsOrBuilder
      getKnowledgeConnectorSettingsOrBuilder() {
    return knowledgeConnectorSettings_ == null
        ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
            .getDefaultInstance()
        : knowledgeConnectorSettings_;
  }

  public static final int LANGUAGE_CODE_FIELD_NUMBER = 4;

  @SuppressWarnings("serial")
  private volatile java.lang.Object languageCode_ = "";
  /**
   *
   *
   * <pre>
   * Language for this settings.
   * </pre>
   *
   * <code>string language_code = 4;</code>
   *
   * @return The languageCode.
   */
  @java.lang.Override
  public java.lang.String getLanguageCode() {
    java.lang.Object ref = languageCode_;
    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();
      languageCode_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Language for this settings.
   * </pre>
   *
   * <code>string language_code = 4;</code>
   *
   * @return The bytes for languageCode.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getLanguageCodeBytes() {
    java.lang.Object ref = languageCode_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      languageCode_ = 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 (fallbackSettings_ != null) {
      output.writeMessage(1, getFallbackSettings());
    }
    if (generativeSafetySettings_ != null) {
      output.writeMessage(3, getGenerativeSafetySettings());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, languageCode_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_);
    }
    if (knowledgeConnectorSettings_ != null) {
      output.writeMessage(7, getKnowledgeConnectorSettings());
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (fallbackSettings_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFallbackSettings());
    }
    if (generativeSafetySettings_ != null) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              3, getGenerativeSafetySettings());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, languageCode_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_);
    }
    if (knowledgeConnectorSettings_ != null) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              7, getKnowledgeConnectorSettings());
    }
    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.GenerativeSettings)) {
      return super.equals(obj);
    }
    com.google.cloud.dialogflow.cx.v3.GenerativeSettings other =
        (com.google.cloud.dialogflow.cx.v3.GenerativeSettings) obj;

    if (!getName().equals(other.getName())) return false;
    if (hasFallbackSettings() != other.hasFallbackSettings()) return false;
    if (hasFallbackSettings()) {
      if (!getFallbackSettings().equals(other.getFallbackSettings())) return false;
    }
    if (hasGenerativeSafetySettings() != other.hasGenerativeSafetySettings()) return false;
    if (hasGenerativeSafetySettings()) {
      if (!getGenerativeSafetySettings().equals(other.getGenerativeSafetySettings())) return false;
    }
    if (hasKnowledgeConnectorSettings() != other.hasKnowledgeConnectorSettings()) return false;
    if (hasKnowledgeConnectorSettings()) {
      if (!getKnowledgeConnectorSettings().equals(other.getKnowledgeConnectorSettings()))
        return false;
    }
    if (!getLanguageCode().equals(other.getLanguageCode())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    if (hasFallbackSettings()) {
      hash = (37 * hash) + FALLBACK_SETTINGS_FIELD_NUMBER;
      hash = (53 * hash) + getFallbackSettings().hashCode();
    }
    if (hasGenerativeSafetySettings()) {
      hash = (37 * hash) + GENERATIVE_SAFETY_SETTINGS_FIELD_NUMBER;
      hash = (53 * hash) + getGenerativeSafetySettings().hashCode();
    }
    if (hasKnowledgeConnectorSettings()) {
      hash = (37 * hash) + KNOWLEDGE_CONNECTOR_SETTINGS_FIELD_NUMBER;
      hash = (53 * hash) + getKnowledgeConnectorSettings().hashCode();
    }
    hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
    hash = (53 * hash) + getLanguageCode().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

  public static com.google.cloud.dialogflow.cx.v3.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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.GenerativeSettings 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;
  }
  /**
   *
   *
   * <pre>
   * Settings for Generative AI.
   * </pre>
   *
   * Protobuf type {@code google.cloud.dialogflow.cx.v3.GenerativeSettings}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.GenerativeSettings)
      com.google.cloud.dialogflow.cx.v3.GenerativeSettingsOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.dialogflow.cx.v3.GenerativeSettingsProto
          .internal_static_google_cloud_dialogflow_cx_v3_GenerativeSettings_descriptor;
    }

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

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

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      name_ = "";
      fallbackSettings_ = null;
      if (fallbackSettingsBuilder_ != null) {
        fallbackSettingsBuilder_.dispose();
        fallbackSettingsBuilder_ = null;
      }
      generativeSafetySettings_ = null;
      if (generativeSafetySettingsBuilder_ != null) {
        generativeSafetySettingsBuilder_.dispose();
        generativeSafetySettingsBuilder_ = null;
      }
      knowledgeConnectorSettings_ = null;
      if (knowledgeConnectorSettingsBuilder_ != null) {
        knowledgeConnectorSettingsBuilder_.dispose();
        knowledgeConnectorSettingsBuilder_ = null;
      }
      languageCode_ = "";
      return this;
    }

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

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

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

    @java.lang.Override
    public com.google.cloud.dialogflow.cx.v3.GenerativeSettings buildPartial() {
      com.google.cloud.dialogflow.cx.v3.GenerativeSettings result =
          new com.google.cloud.dialogflow.cx.v3.GenerativeSettings(this);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartial0(com.google.cloud.dialogflow.cx.v3.GenerativeSettings result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.fallbackSettings_ =
            fallbackSettingsBuilder_ == null ? fallbackSettings_ : fallbackSettingsBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.generativeSafetySettings_ =
            generativeSafetySettingsBuilder_ == null
                ? generativeSafetySettings_
                : generativeSafetySettingsBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.knowledgeConnectorSettings_ =
            knowledgeConnectorSettingsBuilder_ == null
                ? knowledgeConnectorSettings_
                : knowledgeConnectorSettingsBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.languageCode_ = languageCode_;
      }
    }

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

    public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.GenerativeSettings other) {
      if (other == com.google.cloud.dialogflow.cx.v3.GenerativeSettings.getDefaultInstance())
        return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (other.hasFallbackSettings()) {
        mergeFallbackSettings(other.getFallbackSettings());
      }
      if (other.hasGenerativeSafetySettings()) {
        mergeGenerativeSafetySettings(other.getGenerativeSafetySettings());
      }
      if (other.hasKnowledgeConnectorSettings()) {
        mergeKnowledgeConnectorSettings(other.getKnowledgeConnectorSettings());
      }
      if (!other.getLanguageCode().isEmpty()) {
        languageCode_ = other.languageCode_;
        bitField0_ |= 0x00000010;
        onChanged();
      }
      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(
                    getFallbackSettingsFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000002;
                break;
              } // case 10
            case 26:
              {
                input.readMessage(
                    getGenerativeSafetySettingsFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            case 34:
              {
                languageCode_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000010;
                break;
              } // case 34
            case 42:
              {
                name_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 42
            case 58:
              {
                input.readMessage(
                    getKnowledgeConnectorSettingsFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 58
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.lang.Object name_ = "";
    /**
     *
     *
     * <pre>
     * Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
     * ID&gt;/generativeSettings`.
     * </pre>
     *
     * <code>string name = 5;</code>
     *
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
     * ID&gt;/generativeSettings`.
     * </pre>
     *
     * <code>string name = 5;</code>
     *
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
     * ID&gt;/generativeSettings`.
     * </pre>
     *
     * <code>string name = 5;</code>
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
     * ID&gt;/generativeSettings`.
     * </pre>
     *
     * <code>string name = 5;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Format: `projects/&lt;Project ID&gt;/locations/&lt;Location ID&gt;/agents/&lt;Agent
     * ID&gt;/generativeSettings`.
     * </pre>
     *
     * <code>string name = 5;</code>
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallbackSettings_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings,
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.Builder,
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsOrBuilder>
        fallbackSettingsBuilder_;
    /**
     *
     *
     * <pre>
     * Settings for Generative Fallback.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1;
     * </code>
     *
     * @return Whether the fallbackSettings field is set.
     */
    public boolean hasFallbackSettings() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Fallback.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1;
     * </code>
     *
     * @return The fallbackSettings.
     */
    public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
        getFallbackSettings() {
      if (fallbackSettingsBuilder_ == null) {
        return fallbackSettings_ == null
            ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                .getDefaultInstance()
            : fallbackSettings_;
      } else {
        return fallbackSettingsBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Fallback.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1;
     * </code>
     */
    public Builder setFallbackSettings(
        com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings value) {
      if (fallbackSettingsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        fallbackSettings_ = value;
      } else {
        fallbackSettingsBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Fallback.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1;
     * </code>
     */
    public Builder setFallbackSettings(
        com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.Builder
            builderForValue) {
      if (fallbackSettingsBuilder_ == null) {
        fallbackSettings_ = builderForValue.build();
      } else {
        fallbackSettingsBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Fallback.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1;
     * </code>
     */
    public Builder mergeFallbackSettings(
        com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings value) {
      if (fallbackSettingsBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)
            && fallbackSettings_ != null
            && fallbackSettings_
                != com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                    .getDefaultInstance()) {
          getFallbackSettingsBuilder().mergeFrom(value);
        } else {
          fallbackSettings_ = value;
        }
      } else {
        fallbackSettingsBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Fallback.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1;
     * </code>
     */
    public Builder clearFallbackSettings() {
      bitField0_ = (bitField0_ & ~0x00000002);
      fallbackSettings_ = null;
      if (fallbackSettingsBuilder_ != null) {
        fallbackSettingsBuilder_.dispose();
        fallbackSettingsBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Fallback.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1;
     * </code>
     */
    public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.Builder
        getFallbackSettingsBuilder() {
      bitField0_ |= 0x00000002;
      onChanged();
      return getFallbackSettingsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Fallback.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1;
     * </code>
     */
    public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsOrBuilder
        getFallbackSettingsOrBuilder() {
      if (fallbackSettingsBuilder_ != null) {
        return fallbackSettingsBuilder_.getMessageOrBuilder();
      } else {
        return fallbackSettings_ == null
            ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings
                .getDefaultInstance()
            : fallbackSettings_;
      }
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Fallback.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings fallback_settings = 1;
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings,
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.Builder,
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsOrBuilder>
        getFallbackSettingsFieldBuilder() {
      if (fallbackSettingsBuilder_ == null) {
        fallbackSettingsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings,
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettings.Builder,
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.FallbackSettingsOrBuilder>(
                getFallbackSettings(), getParentForChildren(), isClean());
        fallbackSettings_ = null;
      }
      return fallbackSettingsBuilder_;
    }

    private com.google.cloud.dialogflow.cx.v3.SafetySettings generativeSafetySettings_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dialogflow.cx.v3.SafetySettings,
            com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder,
            com.google.cloud.dialogflow.cx.v3.SafetySettingsOrBuilder>
        generativeSafetySettingsBuilder_;
    /**
     *
     *
     * <pre>
     * Settings for Generative Safety.
     * </pre>
     *
     * <code>.google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3;</code>
     *
     * @return Whether the generativeSafetySettings field is set.
     */
    public boolean hasGenerativeSafetySettings() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Safety.
     * </pre>
     *
     * <code>.google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3;</code>
     *
     * @return The generativeSafetySettings.
     */
    public com.google.cloud.dialogflow.cx.v3.SafetySettings getGenerativeSafetySettings() {
      if (generativeSafetySettingsBuilder_ == null) {
        return generativeSafetySettings_ == null
            ? com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance()
            : generativeSafetySettings_;
      } else {
        return generativeSafetySettingsBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Safety.
     * </pre>
     *
     * <code>.google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3;</code>
     */
    public Builder setGenerativeSafetySettings(
        com.google.cloud.dialogflow.cx.v3.SafetySettings value) {
      if (generativeSafetySettingsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        generativeSafetySettings_ = value;
      } else {
        generativeSafetySettingsBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Safety.
     * </pre>
     *
     * <code>.google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3;</code>
     */
    public Builder setGenerativeSafetySettings(
        com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder builderForValue) {
      if (generativeSafetySettingsBuilder_ == null) {
        generativeSafetySettings_ = builderForValue.build();
      } else {
        generativeSafetySettingsBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Safety.
     * </pre>
     *
     * <code>.google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3;</code>
     */
    public Builder mergeGenerativeSafetySettings(
        com.google.cloud.dialogflow.cx.v3.SafetySettings value) {
      if (generativeSafetySettingsBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)
            && generativeSafetySettings_ != null
            && generativeSafetySettings_
                != com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance()) {
          getGenerativeSafetySettingsBuilder().mergeFrom(value);
        } else {
          generativeSafetySettings_ = value;
        }
      } else {
        generativeSafetySettingsBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Safety.
     * </pre>
     *
     * <code>.google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3;</code>
     */
    public Builder clearGenerativeSafetySettings() {
      bitField0_ = (bitField0_ & ~0x00000004);
      generativeSafetySettings_ = null;
      if (generativeSafetySettingsBuilder_ != null) {
        generativeSafetySettingsBuilder_.dispose();
        generativeSafetySettingsBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Safety.
     * </pre>
     *
     * <code>.google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3;</code>
     */
    public com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder
        getGenerativeSafetySettingsBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return getGenerativeSafetySettingsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Safety.
     * </pre>
     *
     * <code>.google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3;</code>
     */
    public com.google.cloud.dialogflow.cx.v3.SafetySettingsOrBuilder
        getGenerativeSafetySettingsOrBuilder() {
      if (generativeSafetySettingsBuilder_ != null) {
        return generativeSafetySettingsBuilder_.getMessageOrBuilder();
      } else {
        return generativeSafetySettings_ == null
            ? com.google.cloud.dialogflow.cx.v3.SafetySettings.getDefaultInstance()
            : generativeSafetySettings_;
      }
    }
    /**
     *
     *
     * <pre>
     * Settings for Generative Safety.
     * </pre>
     *
     * <code>.google.cloud.dialogflow.cx.v3.SafetySettings generative_safety_settings = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dialogflow.cx.v3.SafetySettings,
            com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder,
            com.google.cloud.dialogflow.cx.v3.SafetySettingsOrBuilder>
        getGenerativeSafetySettingsFieldBuilder() {
      if (generativeSafetySettingsBuilder_ == null) {
        generativeSafetySettingsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.dialogflow.cx.v3.SafetySettings,
                com.google.cloud.dialogflow.cx.v3.SafetySettings.Builder,
                com.google.cloud.dialogflow.cx.v3.SafetySettingsOrBuilder>(
                getGenerativeSafetySettings(), getParentForChildren(), isClean());
        generativeSafetySettings_ = null;
      }
      return generativeSafetySettingsBuilder_;
    }

    private com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
        knowledgeConnectorSettings_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings,
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.Builder,
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings
                .KnowledgeConnectorSettingsOrBuilder>
        knowledgeConnectorSettingsBuilder_;
    /**
     *
     *
     * <pre>
     * Settings for knowledge connector.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
     * </code>
     *
     * @return Whether the knowledgeConnectorSettings field is set.
     */
    public boolean hasKnowledgeConnectorSettings() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * Settings for knowledge connector.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
     * </code>
     *
     * @return The knowledgeConnectorSettings.
     */
    public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
        getKnowledgeConnectorSettings() {
      if (knowledgeConnectorSettingsBuilder_ == null) {
        return knowledgeConnectorSettings_ == null
            ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
                .getDefaultInstance()
            : knowledgeConnectorSettings_;
      } else {
        return knowledgeConnectorSettingsBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Settings for knowledge connector.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
     * </code>
     */
    public Builder setKnowledgeConnectorSettings(
        com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings value) {
      if (knowledgeConnectorSettingsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        knowledgeConnectorSettings_ = value;
      } else {
        knowledgeConnectorSettingsBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for knowledge connector.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
     * </code>
     */
    public Builder setKnowledgeConnectorSettings(
        com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.Builder
            builderForValue) {
      if (knowledgeConnectorSettingsBuilder_ == null) {
        knowledgeConnectorSettings_ = builderForValue.build();
      } else {
        knowledgeConnectorSettingsBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for knowledge connector.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
     * </code>
     */
    public Builder mergeKnowledgeConnectorSettings(
        com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings value) {
      if (knowledgeConnectorSettingsBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)
            && knowledgeConnectorSettings_ != null
            && knowledgeConnectorSettings_
                != com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
                    .getDefaultInstance()) {
          getKnowledgeConnectorSettingsBuilder().mergeFrom(value);
        } else {
          knowledgeConnectorSettings_ = value;
        }
      } else {
        knowledgeConnectorSettingsBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for knowledge connector.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
     * </code>
     */
    public Builder clearKnowledgeConnectorSettings() {
      bitField0_ = (bitField0_ & ~0x00000008);
      knowledgeConnectorSettings_ = null;
      if (knowledgeConnectorSettingsBuilder_ != null) {
        knowledgeConnectorSettingsBuilder_.dispose();
        knowledgeConnectorSettingsBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for knowledge connector.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
     * </code>
     */
    public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.Builder
        getKnowledgeConnectorSettingsBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getKnowledgeConnectorSettingsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Settings for knowledge connector.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
     * </code>
     */
    public com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettingsOrBuilder
        getKnowledgeConnectorSettingsOrBuilder() {
      if (knowledgeConnectorSettingsBuilder_ != null) {
        return knowledgeConnectorSettingsBuilder_.getMessageOrBuilder();
      } else {
        return knowledgeConnectorSettings_ == null
            ? com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
                .getDefaultInstance()
            : knowledgeConnectorSettings_;
      }
    }
    /**
     *
     *
     * <pre>
     * Settings for knowledge connector.
     * </pre>
     *
     * <code>
     * .google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings knowledge_connector_settings = 7;
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings,
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings.Builder,
            com.google.cloud.dialogflow.cx.v3.GenerativeSettings
                .KnowledgeConnectorSettingsOrBuilder>
        getKnowledgeConnectorSettingsFieldBuilder() {
      if (knowledgeConnectorSettingsBuilder_ == null) {
        knowledgeConnectorSettingsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings,
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings.KnowledgeConnectorSettings
                    .Builder,
                com.google.cloud.dialogflow.cx.v3.GenerativeSettings
                    .KnowledgeConnectorSettingsOrBuilder>(
                getKnowledgeConnectorSettings(), getParentForChildren(), isClean());
        knowledgeConnectorSettings_ = null;
      }
      return knowledgeConnectorSettingsBuilder_;
    }

    private java.lang.Object languageCode_ = "";
    /**
     *
     *
     * <pre>
     * Language for this settings.
     * </pre>
     *
     * <code>string language_code = 4;</code>
     *
     * @return The languageCode.
     */
    public java.lang.String getLanguageCode() {
      java.lang.Object ref = languageCode_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        languageCode_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Language for this settings.
     * </pre>
     *
     * <code>string language_code = 4;</code>
     *
     * @return The bytes for languageCode.
     */
    public com.google.protobuf.ByteString getLanguageCodeBytes() {
      java.lang.Object ref = languageCode_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        languageCode_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Language for this settings.
     * </pre>
     *
     * <code>string language_code = 4;</code>
     *
     * @param value The languageCode to set.
     * @return This builder for chaining.
     */
    public Builder setLanguageCode(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      languageCode_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Language for this settings.
     * </pre>
     *
     * <code>string language_code = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearLanguageCode() {
      languageCode_ = getDefaultInstance().getLanguageCode();
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Language for this settings.
     * </pre>
     *
     * <code>string language_code = 4;</code>
     *
     * @param value The bytes for languageCode to set.
     * @return This builder for chaining.
     */
    public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      languageCode_ = value;
      bitField0_ |= 0x00000010;
      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.GenerativeSettings)
  }

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

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

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

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

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

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