text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/contactcenterinsights/v1/resources.proto

package com.google.cloud.contactcenterinsights.v1;

/**
 *
 *
 *

 * The settings resource.
 *

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

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

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

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

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.contactcenterinsights.v1.ResourcesProto
        .internal_static_google_cloud_contactcenterinsights_v1_Settings_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(int number) {
    switch (number) {
      case 6:
        return internalGetPubsubNotificationSettings();
      default:
        throw new RuntimeException("Invalid map field number: " + number);
    }
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.contactcenterinsights.v1.ResourcesProto
        .internal_static_google_cloud_contactcenterinsights_v1_Settings_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.contactcenterinsights.v1.Settings.class,
            com.google.cloud.contactcenterinsights.v1.Settings.Builder.class);
  }

  public interface AnalysisConfigOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     *

     * Percentage of conversations created using Dialogflow runtime integration
     * to analyze automatically, between [0, 100].
     *

     *
     * double runtime_integration_analysis_percentage = 1;
     *
     * @return The runtimeIntegrationAnalysisPercentage.
     */
    double getRuntimeIntegrationAnalysisPercentage();
  }
  /**
   *
   *
   *

   * Default configuration when creating Analyses in Insights.
   *

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

    private AnalysisConfig() {}

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

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

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.contactcenterinsights.v1.ResourcesProto
          .internal_static_google_cloud_contactcenterinsights_v1_Settings_AnalysisConfig_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.contactcenterinsights.v1.ResourcesProto
          .internal_static_google_cloud_contactcenterinsights_v1_Settings_AnalysisConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.class,
              com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.Builder.class);
    }

    public static final int RUNTIME_INTEGRATION_ANALYSIS_PERCENTAGE_FIELD_NUMBER = 1;
    private double runtimeIntegrationAnalysisPercentage_;
    /**
     *
     *
     *

     * Percentage of conversations created using Dialogflow runtime integration
     * to analyze automatically, between [0, 100].
     *

     *
     * double runtime_integration_analysis_percentage = 1;
     *
     * @return The runtimeIntegrationAnalysisPercentage.
     */
    @java.lang.Override
    public double getRuntimeIntegrationAnalysisPercentage() {
      return runtimeIntegrationAnalysisPercentage_;
    }

    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 (java.lang.Double.doubleToRawLongBits(runtimeIntegrationAnalysisPercentage_) != 0) {
        output.writeDouble(1, runtimeIntegrationAnalysisPercentage_);
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (java.lang.Double.doubleToRawLongBits(runtimeIntegrationAnalysisPercentage_) != 0) {
        size +=
            com.google.protobuf.CodedOutputStream.computeDoubleSize(
                1, runtimeIntegrationAnalysisPercentage_);
      }
      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.contactcenterinsights.v1.Settings.AnalysisConfig)) {
        return super.equals(obj);
      }
      com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig other =
          (com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig) obj;

      if (java.lang.Double.doubleToLongBits(getRuntimeIntegrationAnalysisPercentage())
          != java.lang.Double.doubleToLongBits(other.getRuntimeIntegrationAnalysisPercentage()))
        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) + RUNTIME_INTEGRATION_ANALYSIS_PERCENTAGE_FIELD_NUMBER;
      hash =
          (53 * hash)
              + com.google.protobuf.Internal.hashLong(
                  java.lang.Double.doubleToLongBits(getRuntimeIntegrationAnalysisPercentage()));
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig 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.contactcenterinsights.v1.Settings.AnalysisConfig parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig 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.contactcenterinsights.v1.Settings.AnalysisConfig parseFrom(
        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

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

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

    public static com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig 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.contactcenterinsights.v1.Settings.AnalysisConfig 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;
    }
    /**
     *
     *
     *

     * Default configuration when creating Analyses in Insights.
     *

     *
     * Protobuf type {@code google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig)
        com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.contactcenterinsights.v1.ResourcesProto
            .internal_static_google_cloud_contactcenterinsights_v1_Settings_AnalysisConfig_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.contactcenterinsights.v1.ResourcesProto
            .internal_static_google_cloud_contactcenterinsights_v1_Settings_AnalysisConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.class,
                com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.Builder.class);
      }

      // Construct using
      // com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.newBuilder()
      private Builder() {}

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        runtimeIntegrationAnalysisPercentage_ = 0D;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.contactcenterinsights.v1.ResourcesProto
            .internal_static_google_cloud_contactcenterinsights_v1_Settings_AnalysisConfig_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig
          getDefaultInstanceForType() {
        return com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig
            .getDefaultInstance();
      }

      @java.lang.Override
      public com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig build() {
        com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig buildPartial() {
        com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig result =
            new com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig(this);
        result.runtimeIntegrationAnalysisPercentage_ = runtimeIntegrationAnalysisPercentage_;
        onBuilt();
        return result;
      }

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

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

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

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

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

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

      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig) {
          return mergeFrom(
              (com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig other) {
        if (other
            == com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig
                .getDefaultInstance()) return this;
        if (other.getRuntimeIntegrationAnalysisPercentage() != 0D) {
          setRuntimeIntegrationAnalysisPercentage(other.getRuntimeIntegrationAnalysisPercentage());
        }
        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 9:
                {
                  runtimeIntegrationAnalysisPercentage_ = input.readDouble();

                  break;
                } // case 9
              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 double runtimeIntegrationAnalysisPercentage_;
      /**
       *
       *
       *

       * Percentage of conversations created using Dialogflow runtime integration
       * to analyze automatically, between [0, 100].
       *

       *
       * double runtime_integration_analysis_percentage = 1;
       *
       * @return The runtimeIntegrationAnalysisPercentage.
       */
      @java.lang.Override
      public double getRuntimeIntegrationAnalysisPercentage() {
        return runtimeIntegrationAnalysisPercentage_;
      }
      /**
       *
       *
       *

       * Percentage of conversations created using Dialogflow runtime integration
       * to analyze automatically, between [0, 100].
       *

       *
       * double runtime_integration_analysis_percentage = 1;
       *
       * @param value The runtimeIntegrationAnalysisPercentage to set.
       * @return This builder for chaining.
       */
      public Builder setRuntimeIntegrationAnalysisPercentage(double value) {

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

       * Percentage of conversations created using Dialogflow runtime integration
       * to analyze automatically, between [0, 100].
       *

       *
       * double runtime_integration_analysis_percentage = 1;
       *
       * @return This builder for chaining.
       */
      public Builder clearRuntimeIntegrationAnalysisPercentage() {

        runtimeIntegrationAnalysisPercentage_ = 0D;
        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.contactcenterinsights.v1.Settings.AnalysisConfig)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig)
    private static final com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig
        DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig();
    }

    public static com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig
        getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig
        getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   *
   *
   *

   * Immutable. The resource name of the settings resource.
   * Format:
   * projects/{project}/locations/{location}/settings
   *

   *
   * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
   *
   * @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;
    }
  }
  /**
   *
   *
   *

   * Immutable. The resource name of the settings resource.
   * Format:
   * projects/{project}/locations/{location}/settings
   *

   *
   * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
   *
   * @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 CREATE_TIME_FIELD_NUMBER = 2;
  private com.google.protobuf.Timestamp createTime_;
  /**
   *
   *
   *

   * Output only. The time at which the settings was created.
   *

   *
   * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
   *
   *
   * @return Whether the createTime field is set.
   */
  @java.lang.Override
  public boolean hasCreateTime() {
    return createTime_ != null;
  }
  /**
   *
   *
   *

   * Output only. The time at which the settings was created.
   *

   *
   * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
   *
   *
   * @return The createTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getCreateTime() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }
  /**
   *
   *
   *

   * Output only. The time at which the settings was created.
   *

   *
   * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
   *
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
    return getCreateTime();
  }

  public static final int UPDATE_TIME_FIELD_NUMBER = 3;
  private com.google.protobuf.Timestamp updateTime_;
  /**
   *
   *
   *

   * Output only. The time at which the settings were last updated.
   *

   *
   * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
   *
   *
   * @return Whether the updateTime field is set.
   */
  @java.lang.Override
  public boolean hasUpdateTime() {
    return updateTime_ != null;
  }
  /**
   *
   *
   *

   * Output only. The time at which the settings were last updated.
   *

   *
   * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
   *
   *
   * @return The updateTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getUpdateTime() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }
  /**
   *
   *
   *

   * Output only. The time at which the settings were last updated.
   *

   *
   * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
   *
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
    return getUpdateTime();
  }

  public static final int LANGUAGE_CODE_FIELD_NUMBER = 4;
  private volatile java.lang.Object languageCode_;
  /**
   *
   *
   *

   * A language code to be applied to each transcript segment unless the segment
   * already specifies a language code. Language code defaults to "en-US" if it
   * is neither specified on the segment nor here.
   *

   *
   * string language_code = 4;
   *
   * @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;
    }
  }
  /**
   *
   *
   *

   * A language code to be applied to each transcript segment unless the segment
   * already specifies a language code. Language code defaults to "en-US" if it
   * is neither specified on the segment nor here.
   *

   *
   * string language_code = 4;
   *
   * @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;
    }
  }

  public static final int CONVERSATION_TTL_FIELD_NUMBER = 5;
  private com.google.protobuf.Duration conversationTtl_;
  /**
   *
   *
   *

   * The default TTL for newly-created conversations. If a conversation has a
   * specified expiration, that value will be used instead. Changing this
   * value will not change the expiration of existing conversations.
   * Conversations with no expire time persist until they are deleted.
   *

   *
   * .google.protobuf.Duration conversation_ttl = 5;
   *
   * @return Whether the conversationTtl field is set.
   */
  @java.lang.Override
  public boolean hasConversationTtl() {
    return conversationTtl_ != null;
  }
  /**
   *
   *
   *

   * The default TTL for newly-created conversations. If a conversation has a
   * specified expiration, that value will be used instead. Changing this
   * value will not change the expiration of existing conversations.
   * Conversations with no expire time persist until they are deleted.
   *

   *
   * .google.protobuf.Duration conversation_ttl = 5;
   *
   * @return The conversationTtl.
   */
  @java.lang.Override
  public com.google.protobuf.Duration getConversationTtl() {
    return conversationTtl_ == null
        ? com.google.protobuf.Duration.getDefaultInstance()
        : conversationTtl_;
  }
  /**
   *
   *
   *

   * The default TTL for newly-created conversations. If a conversation has a
   * specified expiration, that value will be used instead. Changing this
   * value will not change the expiration of existing conversations.
   * Conversations with no expire time persist until they are deleted.
   *

   *
   * .google.protobuf.Duration conversation_ttl = 5;
   */
  @java.lang.Override
  public com.google.protobuf.DurationOrBuilder getConversationTtlOrBuilder() {
    return getConversationTtl();
  }

  public static final int PUBSUB_NOTIFICATION_SETTINGS_FIELD_NUMBER = 6;

  private static final class PubsubNotificationSettingsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
        com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
            com.google.cloud.contactcenterinsights.v1.ResourcesProto
                .internal_static_google_cloud_contactcenterinsights_v1_Settings_PubsubNotificationSettingsEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  private com.google.protobuf.MapField<java.lang.String, java.lang.String>
      pubsubNotificationSettings_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String>
      internalGetPubsubNotificationSettings() {
    if (pubsubNotificationSettings_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          PubsubNotificationSettingsDefaultEntryHolder.defaultEntry);
    }
    return pubsubNotificationSettings_;
  }

  public int getPubsubNotificationSettingsCount() {
    return internalGetPubsubNotificationSettings().getMap().size();
  }
  /**
   *
   *
   *

   * A map that maps a notification trigger to a Pub/Sub topic. Each time a
   * specified trigger occurs, Insights will notify the corresponding Pub/Sub
   * topic.
   * Keys are notification triggers. Supported keys are:
   * * "all-triggers": Notify each time any of the supported triggers occurs.
   * * "create-analysis": Notify each time an analysis is created.
   * * "create-conversation": Notify each time a conversation is created.
   * * "export-insights-data": Notify each time an export is complete.
   * * "update-conversation": Notify each time a conversation is updated via
   * UpdateConversation.
   * Values are Pub/Sub topics. The format of each Pub/Sub topic is:
   * projects/{project}/topics/{topic}
   *

   *
   * map<string, string> pubsub_notification_settings = 6;
   */
  @java.lang.Override
  public boolean containsPubsubNotificationSettings(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetPubsubNotificationSettings().getMap().containsKey(key);
  }
  /** Use {@link #getPubsubNotificationSettingsMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getPubsubNotificationSettings() {
    return getPubsubNotificationSettingsMap();
  }
  /**
   *
   *
   *

   * A map that maps a notification trigger to a Pub/Sub topic. Each time a
   * specified trigger occurs, Insights will notify the corresponding Pub/Sub
   * topic.
   * Keys are notification triggers. Supported keys are:
   * * "all-triggers": Notify each time any of the supported triggers occurs.
   * * "create-analysis": Notify each time an analysis is created.
   * * "create-conversation": Notify each time a conversation is created.
   * * "export-insights-data": Notify each time an export is complete.
   * * "update-conversation": Notify each time a conversation is updated via
   * UpdateConversation.
   * Values are Pub/Sub topics. The format of each Pub/Sub topic is:
   * projects/{project}/topics/{topic}
   *

   *
   * map<string, string> pubsub_notification_settings = 6;
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getPubsubNotificationSettingsMap() {
    return internalGetPubsubNotificationSettings().getMap();
  }
  /**
   *
   *
   *

   * A map that maps a notification trigger to a Pub/Sub topic. Each time a
   * specified trigger occurs, Insights will notify the corresponding Pub/Sub
   * topic.
   * Keys are notification triggers. Supported keys are:
   * * "all-triggers": Notify each time any of the supported triggers occurs.
   * * "create-analysis": Notify each time an analysis is created.
   * * "create-conversation": Notify each time a conversation is created.
   * * "export-insights-data": Notify each time an export is complete.
   * * "update-conversation": Notify each time a conversation is updated via
   * UpdateConversation.
   * Values are Pub/Sub topics. The format of each Pub/Sub topic is:
   * projects/{project}/topics/{topic}
   *

   *
   * map<string, string> pubsub_notification_settings = 6;
   */
  @java.lang.Override
  public java.lang.String getPubsubNotificationSettingsOrDefault(
      java.lang.String key, java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetPubsubNotificationSettings().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   *

   * A map that maps a notification trigger to a Pub/Sub topic. Each time a
   * specified trigger occurs, Insights will notify the corresponding Pub/Sub
   * topic.
   * Keys are notification triggers. Supported keys are:
   * * "all-triggers": Notify each time any of the supported triggers occurs.
   * * "create-analysis": Notify each time an analysis is created.
   * * "create-conversation": Notify each time a conversation is created.
   * * "export-insights-data": Notify each time an export is complete.
   * * "update-conversation": Notify each time a conversation is updated via
   * UpdateConversation.
   * Values are Pub/Sub topics. The format of each Pub/Sub topic is:
   * projects/{project}/topics/{topic}
   *

   *
   * map<string, string> pubsub_notification_settings = 6;
   */
  @java.lang.Override
  public java.lang.String getPubsubNotificationSettingsOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetPubsubNotificationSettings().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int ANALYSIS_CONFIG_FIELD_NUMBER = 7;
  private com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysisConfig_;
  /**
   *
   *
   *

   * Default analysis settings.
   *

   *
   * .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;
   *
   *
   * @return Whether the analysisConfig field is set.
   */
  @java.lang.Override
  public boolean hasAnalysisConfig() {
    return analysisConfig_ != null;
  }
  /**
   *
   *
   *

   * Default analysis settings.
   *

   *
   * .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;
   *
   *
   * @return The analysisConfig.
   */
  @java.lang.Override
  public com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig getAnalysisConfig() {
    return analysisConfig_ == null
        ? com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.getDefaultInstance()
        : analysisConfig_;
  }
  /**
   *
   *
   *

   * Default analysis settings.
   *

   *
   * .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;
   *
   */
  @java.lang.Override
  public com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfigOrBuilder
      getAnalysisConfigOrBuilder() {
    return getAnalysisConfig();
  }

  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(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (createTime_ != null) {
      output.writeMessage(2, getCreateTime());
    }
    if (updateTime_ != null) {
      output.writeMessage(3, getUpdateTime());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, languageCode_);
    }
    if (conversationTtl_ != null) {
      output.writeMessage(5, getConversationTtl());
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output,
        internalGetPubsubNotificationSettings(),
        PubsubNotificationSettingsDefaultEntryHolder.defaultEntry,
        6);
    if (analysisConfig_ != null) {
      output.writeMessage(7, getAnalysisConfig());
    }
    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(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (createTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime());
    }
    if (updateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, languageCode_);
    }
    if (conversationTtl_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getConversationTtl());
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetPubsubNotificationSettings().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
          pubsubNotificationSettings__ =
              PubsubNotificationSettingsDefaultEntryHolder.defaultEntry
                  .newBuilderForType()
                  .setKey(entry.getKey())
                  .setValue(entry.getValue())
                  .build();
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(6, pubsubNotificationSettings__);
    }
    if (analysisConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAnalysisConfig());
    }
    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.contactcenterinsights.v1.Settings)) {
      return super.equals(obj);
    }
    com.google.cloud.contactcenterinsights.v1.Settings other =
        (com.google.cloud.contactcenterinsights.v1.Settings) obj;

    if (!getName().equals(other.getName())) return false;
    if (hasCreateTime() != other.hasCreateTime()) return false;
    if (hasCreateTime()) {
      if (!getCreateTime().equals(other.getCreateTime())) return false;
    }
    if (hasUpdateTime() != other.hasUpdateTime()) return false;
    if (hasUpdateTime()) {
      if (!getUpdateTime().equals(other.getUpdateTime())) return false;
    }
    if (!getLanguageCode().equals(other.getLanguageCode())) return false;
    if (hasConversationTtl() != other.hasConversationTtl()) return false;
    if (hasConversationTtl()) {
      if (!getConversationTtl().equals(other.getConversationTtl())) return false;
    }
    if (!internalGetPubsubNotificationSettings()
        .equals(other.internalGetPubsubNotificationSettings())) return false;
    if (hasAnalysisConfig() != other.hasAnalysisConfig()) return false;
    if (hasAnalysisConfig()) {
      if (!getAnalysisConfig().equals(other.getAnalysisConfig())) 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 (hasCreateTime()) {
      hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getCreateTime().hashCode();
    }
    if (hasUpdateTime()) {
      hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUpdateTime().hashCode();
    }
    hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
    hash = (53 * hash) + getLanguageCode().hashCode();
    if (hasConversationTtl()) {
      hash = (37 * hash) + CONVERSATION_TTL_FIELD_NUMBER;
      hash = (53 * hash) + getConversationTtl().hashCode();
    }
    if (!internalGetPubsubNotificationSettings().getMap().isEmpty()) {
      hash = (37 * hash) + PUBSUB_NOTIFICATION_SETTINGS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetPubsubNotificationSettings().hashCode();
    }
    if (hasAnalysisConfig()) {
      hash = (37 * hash) + ANALYSIS_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getAnalysisConfig().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.contactcenterinsights.v1.Settings parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.contactcenterinsights.v1.Settings 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.contactcenterinsights.v1.Settings parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

  public static com.google.cloud.contactcenterinsights.v1.Settings parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.contactcenterinsights.v1.Settings parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

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

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

  public static com.google.cloud.contactcenterinsights.v1.Settings 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.contactcenterinsights.v1.Settings prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

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

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   *

   * The settings resource.
   *

   *
   * Protobuf type {@code google.cloud.contactcenterinsights.v1.Settings}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.contactcenterinsights.v1.Settings)
      com.google.cloud.contactcenterinsights.v1.SettingsOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.contactcenterinsights.v1.ResourcesProto
          .internal_static_google_cloud_contactcenterinsights_v1_Settings_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(int number) {
      switch (number) {
        case 6:
          return internalGetPubsubNotificationSettings();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
      switch (number) {
        case 6:
          return internalGetMutablePubsubNotificationSettings();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.contactcenterinsights.v1.ResourcesProto
          .internal_static_google_cloud_contactcenterinsights_v1_Settings_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.contactcenterinsights.v1.Settings.class,
              com.google.cloud.contactcenterinsights.v1.Settings.Builder.class);
    }

    // Construct using com.google.cloud.contactcenterinsights.v1.Settings.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      name_ = "";

      if (createTimeBuilder_ == null) {
        createTime_ = null;
      } else {
        createTime_ = null;
        createTimeBuilder_ = null;
      }
      if (updateTimeBuilder_ == null) {
        updateTime_ = null;
      } else {
        updateTime_ = null;
        updateTimeBuilder_ = null;
      }
      languageCode_ = "";

      if (conversationTtlBuilder_ == null) {
        conversationTtl_ = null;
      } else {
        conversationTtl_ = null;
        conversationTtlBuilder_ = null;
      }
      internalGetMutablePubsubNotificationSettings().clear();
      if (analysisConfigBuilder_ == null) {
        analysisConfig_ = null;
      } else {
        analysisConfig_ = null;
        analysisConfigBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.contactcenterinsights.v1.ResourcesProto
          .internal_static_google_cloud_contactcenterinsights_v1_Settings_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.contactcenterinsights.v1.Settings getDefaultInstanceForType() {
      return com.google.cloud.contactcenterinsights.v1.Settings.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.contactcenterinsights.v1.Settings build() {
      com.google.cloud.contactcenterinsights.v1.Settings result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.contactcenterinsights.v1.Settings buildPartial() {
      com.google.cloud.contactcenterinsights.v1.Settings result =
          new com.google.cloud.contactcenterinsights.v1.Settings(this);
      int from_bitField0_ = bitField0_;
      result.name_ = name_;
      if (createTimeBuilder_ == null) {
        result.createTime_ = createTime_;
      } else {
        result.createTime_ = createTimeBuilder_.build();
      }
      if (updateTimeBuilder_ == null) {
        result.updateTime_ = updateTime_;
      } else {
        result.updateTime_ = updateTimeBuilder_.build();
      }
      result.languageCode_ = languageCode_;
      if (conversationTtlBuilder_ == null) {
        result.conversationTtl_ = conversationTtl_;
      } else {
        result.conversationTtl_ = conversationTtlBuilder_.build();
      }
      result.pubsubNotificationSettings_ = internalGetPubsubNotificationSettings();
      result.pubsubNotificationSettings_.makeImmutable();
      if (analysisConfigBuilder_ == null) {
        result.analysisConfig_ = analysisConfig_;
      } else {
        result.analysisConfig_ = analysisConfigBuilder_.build();
      }
      onBuilt();
      return result;
    }

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

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

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

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

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

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

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.contactcenterinsights.v1.Settings) {
        return mergeFrom((com.google.cloud.contactcenterinsights.v1.Settings) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.contactcenterinsights.v1.Settings other) {
      if (other == com.google.cloud.contactcenterinsights.v1.Settings.getDefaultInstance())
        return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (other.hasCreateTime()) {
        mergeCreateTime(other.getCreateTime());
      }
      if (other.hasUpdateTime()) {
        mergeUpdateTime(other.getUpdateTime());
      }
      if (!other.getLanguageCode().isEmpty()) {
        languageCode_ = other.languageCode_;
        onChanged();
      }
      if (other.hasConversationTtl()) {
        mergeConversationTtl(other.getConversationTtl());
      }
      internalGetMutablePubsubNotificationSettings()
          .mergeFrom(other.internalGetPubsubNotificationSettings());
      if (other.hasAnalysisConfig()) {
        mergeAnalysisConfig(other.getAnalysisConfig());
      }
      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:
              {
                name_ = input.readStringRequireUtf8();

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

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

                break;
              } // case 26
            case 34:
              {
                languageCode_ = input.readStringRequireUtf8();

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

                break;
              } // case 42
            case 50:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
                    pubsubNotificationSettings__ =
                        input.readMessage(
                            PubsubNotificationSettingsDefaultEntryHolder.defaultEntry
                                .getParserForType(),
                            extensionRegistry);
                internalGetMutablePubsubNotificationSettings()
                    .getMutableMap()
                    .put(
                        pubsubNotificationSettings__.getKey(),
                        pubsubNotificationSettings__.getValue());
                break;
              } // case 50
            case 58:
              {
                input.readMessage(getAnalysisConfigFieldBuilder().getBuilder(), extensionRegistry);

                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_ = "";
    /**
     *
     *
     *

     * Immutable. The resource name of the settings resource.
     * Format:
     * projects/{project}/locations/{location}/settings
     *

     *
     * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
     *
     * @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;
      }
    }
    /**
     *
     *
     *

     * Immutable. The resource name of the settings resource.
     * Format:
     * projects/{project}/locations/{location}/settings
     *

     *
     * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
     *
     * @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;
      }
    }
    /**
     *
     *
     *

     * Immutable. The resource name of the settings resource.
     * Format:
     * projects/{project}/locations/{location}/settings
     *

     *
     * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
     *
     * @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;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Immutable. The resource name of the settings resource.
     * Format:
     * projects/{project}/locations/{location}/settings
     *

     *
     * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {

      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Immutable. The resource name of the settings resource.
     * Format:
     * projects/{project}/locations/{location}/settings
     *

     *
     * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
     *
     * @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;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp createTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        createTimeBuilder_;
    /**
     *
     *
     *

     * Output only. The time at which the settings was created.
     *

     *
     *
     * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     *
     * @return Whether the createTime field is set.
     */
    public boolean hasCreateTime() {
      return createTimeBuilder_ != null || createTime_ != null;
    }
    /**
     *
     *
     *

     * Output only. The time at which the settings was created.
     *

     *
     *
     * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     *
     * @return The createTime.
     */
    public com.google.protobuf.Timestamp getCreateTime() {
      if (createTimeBuilder_ == null) {
        return createTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : createTime_;
      } else {
        return createTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     *

     * Output only. The time at which the settings was created.
     *

     *
     *
     * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        createTime_ = value;
        onChanged();
      } else {
        createTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * Output only. The time at which the settings was created.
     *

     *
     *
     * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (createTimeBuilder_ == null) {
        createTime_ = builderForValue.build();
        onChanged();
      } else {
        createTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     *

     * Output only. The time at which the settings was created.
     *

     *
     *
     * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     */
    public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (createTime_ != null) {
          createTime_ =
              com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial();
        } else {
          createTime_ = value;
        }
        onChanged();
      } else {
        createTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * Output only. The time at which the settings was created.
     *

     *
     *
     * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     */
    public Builder clearCreateTime() {
      if (createTimeBuilder_ == null) {
        createTime_ = null;
        onChanged();
      } else {
        createTime_ = null;
        createTimeBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     *

     * Output only. The time at which the settings was created.
     *

     *
     *
     * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     */
    public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {

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

     * Output only. The time at which the settings was created.
     *

     *
     *
     * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     */
    public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
      if (createTimeBuilder_ != null) {
        return createTimeBuilder_.getMessageOrBuilder();
      } else {
        return createTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : createTime_;
      }
    }
    /**
     *
     *
     *

     * Output only. The time at which the settings was created.
     *

     *
     *
     * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getCreateTimeFieldBuilder() {
      if (createTimeBuilder_ == null) {
        createTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getCreateTime(), getParentForChildren(), isClean());
        createTime_ = null;
      }
      return createTimeBuilder_;
    }

    private com.google.protobuf.Timestamp updateTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        updateTimeBuilder_;
    /**
     *
     *
     *

     * Output only. The time at which the settings were last updated.
     *

     *
     *
     * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     *
     * @return Whether the updateTime field is set.
     */
    public boolean hasUpdateTime() {
      return updateTimeBuilder_ != null || updateTime_ != null;
    }
    /**
     *
     *
     *

     * Output only. The time at which the settings were last updated.
     *

     *
     *
     * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     *
     * @return The updateTime.
     */
    public com.google.protobuf.Timestamp getUpdateTime() {
      if (updateTimeBuilder_ == null) {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      } else {
        return updateTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     *

     * Output only. The time at which the settings were last updated.
     *

     *
     *
     * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        updateTime_ = value;
        onChanged();
      } else {
        updateTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * Output only. The time at which the settings were last updated.
     *

     *
     *
     * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (updateTimeBuilder_ == null) {
        updateTime_ = builderForValue.build();
        onChanged();
      } else {
        updateTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     *

     * Output only. The time at which the settings were last updated.
     *

     *
     *
     * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     */
    public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (updateTime_ != null) {
          updateTime_ =
              com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial();
        } else {
          updateTime_ = value;
        }
        onChanged();
      } else {
        updateTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * Output only. The time at which the settings were last updated.
     *

     *
     *
     * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     */
    public Builder clearUpdateTime() {
      if (updateTimeBuilder_ == null) {
        updateTime_ = null;
        onChanged();
      } else {
        updateTime_ = null;
        updateTimeBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     *

     * Output only. The time at which the settings were last updated.
     *

     *
     *
     * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     */
    public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {

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

     * Output only. The time at which the settings were last updated.
     *

     *
     *
     * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     */
    public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
      if (updateTimeBuilder_ != null) {
        return updateTimeBuilder_.getMessageOrBuilder();
      } else {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      }
    }
    /**
     *
     *
     *

     * Output only. The time at which the settings were last updated.
     *

     *
     *
     * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     *
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getUpdateTimeFieldBuilder() {
      if (updateTimeBuilder_ == null) {
        updateTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getUpdateTime(), getParentForChildren(), isClean());
        updateTime_ = null;
      }
      return updateTimeBuilder_;
    }

    private java.lang.Object languageCode_ = "";
    /**
     *
     *
     *

     * A language code to be applied to each transcript segment unless the segment
     * already specifies a language code. Language code defaults to "en-US" if it
     * is neither specified on the segment nor here.
     *

     *
     * string language_code = 4;
     *
     * @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;
      }
    }
    /**
     *
     *
     *

     * A language code to be applied to each transcript segment unless the segment
     * already specifies a language code. Language code defaults to "en-US" if it
     * is neither specified on the segment nor here.
     *

     *
     * string language_code = 4;
     *
     * @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;
      }
    }
    /**
     *
     *
     *

     * A language code to be applied to each transcript segment unless the segment
     * already specifies a language code. Language code defaults to "en-US" if it
     * is neither specified on the segment nor here.
     *

     *
     * string language_code = 4;
     *
     * @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;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * A language code to be applied to each transcript segment unless the segment
     * already specifies a language code. Language code defaults to "en-US" if it
     * is neither specified on the segment nor here.
     *

     *
     * string language_code = 4;
     *
     * @return This builder for chaining.
     */
    public Builder clearLanguageCode() {

      languageCode_ = getDefaultInstance().getLanguageCode();
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * A language code to be applied to each transcript segment unless the segment
     * already specifies a language code. Language code defaults to "en-US" if it
     * is neither specified on the segment nor here.
     *

     *
     * string language_code = 4;
     *
     * @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;
      onChanged();
      return this;
    }

    private com.google.protobuf.Duration conversationTtl_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Duration,
            com.google.protobuf.Duration.Builder,
            com.google.protobuf.DurationOrBuilder>
        conversationTtlBuilder_;
    /**
     *
     *
     *

     * The default TTL for newly-created conversations. If a conversation has a
     * specified expiration, that value will be used instead. Changing this
     * value will not change the expiration of existing conversations.
     * Conversations with no expire time persist until they are deleted.
     *

     *
     * .google.protobuf.Duration conversation_ttl = 5;
     *
     * @return Whether the conversationTtl field is set.
     */
    public boolean hasConversationTtl() {
      return conversationTtlBuilder_ != null || conversationTtl_ != null;
    }
    /**
     *
     *
     *

     * The default TTL for newly-created conversations. If a conversation has a
     * specified expiration, that value will be used instead. Changing this
     * value will not change the expiration of existing conversations.
     * Conversations with no expire time persist until they are deleted.
     *

     *
     * .google.protobuf.Duration conversation_ttl = 5;
     *
     * @return The conversationTtl.
     */
    public com.google.protobuf.Duration getConversationTtl() {
      if (conversationTtlBuilder_ == null) {
        return conversationTtl_ == null
            ? com.google.protobuf.Duration.getDefaultInstance()
            : conversationTtl_;
      } else {
        return conversationTtlBuilder_.getMessage();
      }
    }
    /**
     *
     *
     *

     * The default TTL for newly-created conversations. If a conversation has a
     * specified expiration, that value will be used instead. Changing this
     * value will not change the expiration of existing conversations.
     * Conversations with no expire time persist until they are deleted.
     *

     *
     * .google.protobuf.Duration conversation_ttl = 5;
     */
    public Builder setConversationTtl(com.google.protobuf.Duration value) {
      if (conversationTtlBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        conversationTtl_ = value;
        onChanged();
      } else {
        conversationTtlBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * The default TTL for newly-created conversations. If a conversation has a
     * specified expiration, that value will be used instead. Changing this
     * value will not change the expiration of existing conversations.
     * Conversations with no expire time persist until they are deleted.
     *

     *
     * .google.protobuf.Duration conversation_ttl = 5;
     */
    public Builder setConversationTtl(com.google.protobuf.Duration.Builder builderForValue) {
      if (conversationTtlBuilder_ == null) {
        conversationTtl_ = builderForValue.build();
        onChanged();
      } else {
        conversationTtlBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     *

     * The default TTL for newly-created conversations. If a conversation has a
     * specified expiration, that value will be used instead. Changing this
     * value will not change the expiration of existing conversations.
     * Conversations with no expire time persist until they are deleted.
     *

     *
     * .google.protobuf.Duration conversation_ttl = 5;
     */
    public Builder mergeConversationTtl(com.google.protobuf.Duration value) {
      if (conversationTtlBuilder_ == null) {
        if (conversationTtl_ != null) {
          conversationTtl_ =
              com.google.protobuf.Duration.newBuilder(conversationTtl_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          conversationTtl_ = value;
        }
        onChanged();
      } else {
        conversationTtlBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * The default TTL for newly-created conversations. If a conversation has a
     * specified expiration, that value will be used instead. Changing this
     * value will not change the expiration of existing conversations.
     * Conversations with no expire time persist until they are deleted.
     *

     *
     * .google.protobuf.Duration conversation_ttl = 5;
     */
    public Builder clearConversationTtl() {
      if (conversationTtlBuilder_ == null) {
        conversationTtl_ = null;
        onChanged();
      } else {
        conversationTtl_ = null;
        conversationTtlBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     *

     * The default TTL for newly-created conversations. If a conversation has a
     * specified expiration, that value will be used instead. Changing this
     * value will not change the expiration of existing conversations.
     * Conversations with no expire time persist until they are deleted.
     *

     *
     * .google.protobuf.Duration conversation_ttl = 5;
     */
    public com.google.protobuf.Duration.Builder getConversationTtlBuilder() {

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

     * The default TTL for newly-created conversations. If a conversation has a
     * specified expiration, that value will be used instead. Changing this
     * value will not change the expiration of existing conversations.
     * Conversations with no expire time persist until they are deleted.
     *

     *
     * .google.protobuf.Duration conversation_ttl = 5;
     */
    public com.google.protobuf.DurationOrBuilder getConversationTtlOrBuilder() {
      if (conversationTtlBuilder_ != null) {
        return conversationTtlBuilder_.getMessageOrBuilder();
      } else {
        return conversationTtl_ == null
            ? com.google.protobuf.Duration.getDefaultInstance()
            : conversationTtl_;
      }
    }
    /**
     *
     *
     *

     * The default TTL for newly-created conversations. If a conversation has a
     * specified expiration, that value will be used instead. Changing this
     * value will not change the expiration of existing conversations.
     * Conversations with no expire time persist until they are deleted.
     *

     *
     * .google.protobuf.Duration conversation_ttl = 5;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Duration,
            com.google.protobuf.Duration.Builder,
            com.google.protobuf.DurationOrBuilder>
        getConversationTtlFieldBuilder() {
      if (conversationTtlBuilder_ == null) {
        conversationTtlBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Duration,
                com.google.protobuf.Duration.Builder,
                com.google.protobuf.DurationOrBuilder>(
                getConversationTtl(), getParentForChildren(), isClean());
        conversationTtl_ = null;
      }
      return conversationTtlBuilder_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        pubsubNotificationSettings_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetPubsubNotificationSettings() {
      if (pubsubNotificationSettings_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            PubsubNotificationSettingsDefaultEntryHolder.defaultEntry);
      }
      return pubsubNotificationSettings_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutablePubsubNotificationSettings() {
      onChanged();
      ;
      if (pubsubNotificationSettings_ == null) {
        pubsubNotificationSettings_ =
            com.google.protobuf.MapField.newMapField(
                PubsubNotificationSettingsDefaultEntryHolder.defaultEntry);
      }
      if (!pubsubNotificationSettings_.isMutable()) {
        pubsubNotificationSettings_ = pubsubNotificationSettings_.copy();
      }
      return pubsubNotificationSettings_;
    }

    public int getPubsubNotificationSettingsCount() {
      return internalGetPubsubNotificationSettings().getMap().size();
    }
    /**
     *
     *
     *

     * A map that maps a notification trigger to a Pub/Sub topic. Each time a
     * specified trigger occurs, Insights will notify the corresponding Pub/Sub
     * topic.
     * Keys are notification triggers. Supported keys are:
     * * "all-triggers": Notify each time any of the supported triggers occurs.
     * * "create-analysis": Notify each time an analysis is created.
     * * "create-conversation": Notify each time a conversation is created.
     * * "export-insights-data": Notify each time an export is complete.
     * * "update-conversation": Notify each time a conversation is updated via
     * UpdateConversation.
     * Values are Pub/Sub topics. The format of each Pub/Sub topic is:
     * projects/{project}/topics/{topic}
     *

     *
     * map<string, string> pubsub_notification_settings = 6;
     */
    @java.lang.Override
    public boolean containsPubsubNotificationSettings(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetPubsubNotificationSettings().getMap().containsKey(key);
    }
    /** Use {@link #getPubsubNotificationSettingsMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getPubsubNotificationSettings() {
      return getPubsubNotificationSettingsMap();
    }
    /**
     *
     *
     *

     * A map that maps a notification trigger to a Pub/Sub topic. Each time a
     * specified trigger occurs, Insights will notify the corresponding Pub/Sub
     * topic.
     * Keys are notification triggers. Supported keys are:
     * * "all-triggers": Notify each time any of the supported triggers occurs.
     * * "create-analysis": Notify each time an analysis is created.
     * * "create-conversation": Notify each time a conversation is created.
     * * "export-insights-data": Notify each time an export is complete.
     * * "update-conversation": Notify each time a conversation is updated via
     * UpdateConversation.
     * Values are Pub/Sub topics. The format of each Pub/Sub topic is:
     * projects/{project}/topics/{topic}
     *

     *
     * map<string, string> pubsub_notification_settings = 6;
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getPubsubNotificationSettingsMap() {
      return internalGetPubsubNotificationSettings().getMap();
    }
    /**
     *
     *
     *

     * A map that maps a notification trigger to a Pub/Sub topic. Each time a
     * specified trigger occurs, Insights will notify the corresponding Pub/Sub
     * topic.
     * Keys are notification triggers. Supported keys are:
     * * "all-triggers": Notify each time any of the supported triggers occurs.
     * * "create-analysis": Notify each time an analysis is created.
     * * "create-conversation": Notify each time a conversation is created.
     * * "export-insights-data": Notify each time an export is complete.
     * * "update-conversation": Notify each time a conversation is updated via
     * UpdateConversation.
     * Values are Pub/Sub topics. The format of each Pub/Sub topic is:
     * projects/{project}/topics/{topic}
     *

     *
     * map<string, string> pubsub_notification_settings = 6;
     */
    @java.lang.Override
    public java.lang.String getPubsubNotificationSettingsOrDefault(
        java.lang.String key, java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetPubsubNotificationSettings().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     *

     * A map that maps a notification trigger to a Pub/Sub topic. Each time a
     * specified trigger occurs, Insights will notify the corresponding Pub/Sub
     * topic.
     * Keys are notification triggers. Supported keys are:
     * * "all-triggers": Notify each time any of the supported triggers occurs.
     * * "create-analysis": Notify each time an analysis is created.
     * * "create-conversation": Notify each time a conversation is created.
     * * "export-insights-data": Notify each time an export is complete.
     * * "update-conversation": Notify each time a conversation is updated via
     * UpdateConversation.
     * Values are Pub/Sub topics. The format of each Pub/Sub topic is:
     * projects/{project}/topics/{topic}
     *

     *
     * map<string, string> pubsub_notification_settings = 6;
     */
    @java.lang.Override
    public java.lang.String getPubsubNotificationSettingsOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetPubsubNotificationSettings().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearPubsubNotificationSettings() {
      internalGetMutablePubsubNotificationSettings().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     *

     * A map that maps a notification trigger to a Pub/Sub topic. Each time a
     * specified trigger occurs, Insights will notify the corresponding Pub/Sub
     * topic.
     * Keys are notification triggers. Supported keys are:
     * * "all-triggers": Notify each time any of the supported triggers occurs.
     * * "create-analysis": Notify each time an analysis is created.
     * * "create-conversation": Notify each time a conversation is created.
     * * "export-insights-data": Notify each time an export is complete.
     * * "update-conversation": Notify each time a conversation is updated via
     * UpdateConversation.
     * Values are Pub/Sub topics. The format of each Pub/Sub topic is:
     * projects/{project}/topics/{topic}
     *

     *
     * map<string, string> pubsub_notification_settings = 6;
     */
    public Builder removePubsubNotificationSettings(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutablePubsubNotificationSettings().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String>
        getMutablePubsubNotificationSettings() {
      return internalGetMutablePubsubNotificationSettings().getMutableMap();
    }
    /**
     *
     *
     *

     * A map that maps a notification trigger to a Pub/Sub topic. Each time a
     * specified trigger occurs, Insights will notify the corresponding Pub/Sub
     * topic.
     * Keys are notification triggers. Supported keys are:
     * * "all-triggers": Notify each time any of the supported triggers occurs.
     * * "create-analysis": Notify each time an analysis is created.
     * * "create-conversation": Notify each time a conversation is created.
     * * "export-insights-data": Notify each time an export is complete.
     * * "update-conversation": Notify each time a conversation is updated via
     * UpdateConversation.
     * Values are Pub/Sub topics. The format of each Pub/Sub topic is:
     * projects/{project}/topics/{topic}
     *

     *
     * map<string, string> pubsub_notification_settings = 6;
     */
    public Builder putPubsubNotificationSettings(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }

      internalGetMutablePubsubNotificationSettings().getMutableMap().put(key, value);
      return this;
    }
    /**
     *
     *
     *

     * A map that maps a notification trigger to a Pub/Sub topic. Each time a
     * specified trigger occurs, Insights will notify the corresponding Pub/Sub
     * topic.
     * Keys are notification triggers. Supported keys are:
     * * "all-triggers": Notify each time any of the supported triggers occurs.
     * * "create-analysis": Notify each time an analysis is created.
     * * "create-conversation": Notify each time a conversation is created.
     * * "export-insights-data": Notify each time an export is complete.
     * * "update-conversation": Notify each time a conversation is updated via
     * UpdateConversation.
     * Values are Pub/Sub topics. The format of each Pub/Sub topic is:
     * projects/{project}/topics/{topic}
     *

     *
     * map<string, string> pubsub_notification_settings = 6;
     */
    public Builder putAllPubsubNotificationSettings(
        java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutablePubsubNotificationSettings().getMutableMap().putAll(values);
      return this;
    }

    private com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysisConfig_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig,
            com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.Builder,
            com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfigOrBuilder>
        analysisConfigBuilder_;
    /**
     *
     *
     *

     * Default analysis settings.
     *

     *
     * .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;
     *
     *
     * @return Whether the analysisConfig field is set.
     */
    public boolean hasAnalysisConfig() {
      return analysisConfigBuilder_ != null || analysisConfig_ != null;
    }
    /**
     *
     *
     *

     * Default analysis settings.
     *

     *
     * .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;
     *
     *
     * @return The analysisConfig.
     */
    public com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig getAnalysisConfig() {
      if (analysisConfigBuilder_ == null) {
        return analysisConfig_ == null
            ? com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.getDefaultInstance()
            : analysisConfig_;
      } else {
        return analysisConfigBuilder_.getMessage();
      }
    }
    /**
     *
     *
     *

     * Default analysis settings.
     *

     *
     * .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;
     *
     */
    public Builder setAnalysisConfig(
        com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig value) {
      if (analysisConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        analysisConfig_ = value;
        onChanged();
      } else {
        analysisConfigBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * Default analysis settings.
     *

     *
     * .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;
     *
     */
    public Builder setAnalysisConfig(
        com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.Builder builderForValue) {
      if (analysisConfigBuilder_ == null) {
        analysisConfig_ = builderForValue.build();
        onChanged();
      } else {
        analysisConfigBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     *

     * Default analysis settings.
     *

     *
     * .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;
     *
     */
    public Builder mergeAnalysisConfig(
        com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig value) {
      if (analysisConfigBuilder_ == null) {
        if (analysisConfig_ != null) {
          analysisConfig_ =
              com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.newBuilder(
                      analysisConfig_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          analysisConfig_ = value;
        }
        onChanged();
      } else {
        analysisConfigBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * Default analysis settings.
     *

     *
     * .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;
     *
     */
    public Builder clearAnalysisConfig() {
      if (analysisConfigBuilder_ == null) {
        analysisConfig_ = null;
        onChanged();
      } else {
        analysisConfig_ = null;
        analysisConfigBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     *

     * Default analysis settings.
     *

     *
     * .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;
     *
     */
    public com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.Builder
        getAnalysisConfigBuilder() {

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

     * Default analysis settings.
     *

     *
     * .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;
     *
     */
    public com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfigOrBuilder
        getAnalysisConfigOrBuilder() {
      if (analysisConfigBuilder_ != null) {
        return analysisConfigBuilder_.getMessageOrBuilder();
      } else {
        return analysisConfig_ == null
            ? com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.getDefaultInstance()
            : analysisConfig_;
      }
    }
    /**
     *
     *
     *

     * Default analysis settings.
     *

     *
     * .google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig analysis_config = 7;
     *
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig,
            com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.Builder,
            com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfigOrBuilder>
        getAnalysisConfigFieldBuilder() {
      if (analysisConfigBuilder_ == null) {
        analysisConfigBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig,
                com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.Builder,
                com.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfigOrBuilder>(
                getAnalysisConfig(), getParentForChildren(), isClean());
        analysisConfig_ = null;
      }
      return analysisConfigBuilder_;
    }

    @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.contactcenterinsights.v1.Settings)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.contactcenterinsights.v1.Settings)
  private static final com.google.cloud.contactcenterinsights.v1.Settings DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.contactcenterinsights.v1.Settings();
  }

  public static com.google.cloud.contactcenterinsights.v1.Settings getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

  @java.lang.Override
  public com.google.cloud.contactcenterinsights.v1.Settings getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}

redpajama_set_name: RedPajamaGithub