Class QaAnswer.AnswerValue.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<QaAnswer.AnswerValue.Builder>
com.google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue.Builder
All Implemented Interfaces:
QaAnswer.AnswerValueOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
QaAnswer.AnswerValue

public static final class QaAnswer.AnswerValue.Builder extends com.google.protobuf.GeneratedMessage.Builder<QaAnswer.AnswerValue.Builder> implements QaAnswer.AnswerValueOrBuilder
 Message for holding the value of a
 [QaAnswer][google.cloud.contactcenterinsights.v1.QaAnswer].
 [QaQuestion.AnswerChoice][google.cloud.contactcenterinsights.v1.QaQuestion.AnswerChoice]
 defines the possible answer values for a question.
 
Protobuf type google.cloud.contactcenterinsights.v1.QaAnswer.AnswerValue
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<QaAnswer.AnswerValue.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<QaAnswer.AnswerValue.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<QaAnswer.AnswerValue.Builder>
    • getDefaultInstanceForType

      public QaAnswer.AnswerValue getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public QaAnswer.AnswerValue build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public QaAnswer.AnswerValue buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public QaAnswer.AnswerValue.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<QaAnswer.AnswerValue.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<QaAnswer.AnswerValue.Builder>
    • mergeFrom

      public QaAnswer.AnswerValue.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<QaAnswer.AnswerValue.Builder>
      Throws:
      IOException
    • getValueCase

      public QaAnswer.AnswerValue.ValueCase getValueCase()
      Specified by:
      getValueCase in interface QaAnswer.AnswerValueOrBuilder
    • clearValue

      public QaAnswer.AnswerValue.Builder clearValue()
    • hasStrValue

      public boolean hasStrValue()
       String value.
       
      string str_value = 2;
      Specified by:
      hasStrValue in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      Whether the strValue field is set.
    • getStrValue

      public String getStrValue()
       String value.
       
      string str_value = 2;
      Specified by:
      getStrValue in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      The strValue.
    • getStrValueBytes

      public com.google.protobuf.ByteString getStrValueBytes()
       String value.
       
      string str_value = 2;
      Specified by:
      getStrValueBytes in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      The bytes for strValue.
    • setStrValue

      public QaAnswer.AnswerValue.Builder setStrValue(String value)
       String value.
       
      string str_value = 2;
      Parameters:
      value - The strValue to set.
      Returns:
      This builder for chaining.
    • clearStrValue

      public QaAnswer.AnswerValue.Builder clearStrValue()
       String value.
       
      string str_value = 2;
      Returns:
      This builder for chaining.
    • setStrValueBytes

      public QaAnswer.AnswerValue.Builder setStrValueBytes(com.google.protobuf.ByteString value)
       String value.
       
      string str_value = 2;
      Parameters:
      value - The bytes for strValue to set.
      Returns:
      This builder for chaining.
    • hasNumValue

      public boolean hasNumValue()
       Numerical value.
       
      double num_value = 3;
      Specified by:
      hasNumValue in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      Whether the numValue field is set.
    • getNumValue

      public double getNumValue()
       Numerical value.
       
      double num_value = 3;
      Specified by:
      getNumValue in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      The numValue.
    • setNumValue

      public QaAnswer.AnswerValue.Builder setNumValue(double value)
       Numerical value.
       
      double num_value = 3;
      Parameters:
      value - The numValue to set.
      Returns:
      This builder for chaining.
    • clearNumValue

      public QaAnswer.AnswerValue.Builder clearNumValue()
       Numerical value.
       
      double num_value = 3;
      Returns:
      This builder for chaining.
    • hasBoolValue

      public boolean hasBoolValue()
       Boolean value.
       
      bool bool_value = 4;
      Specified by:
      hasBoolValue in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      Whether the boolValue field is set.
    • getBoolValue

      public boolean getBoolValue()
       Boolean value.
       
      bool bool_value = 4;
      Specified by:
      getBoolValue in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      The boolValue.
    • setBoolValue

      public QaAnswer.AnswerValue.Builder setBoolValue(boolean value)
       Boolean value.
       
      bool bool_value = 4;
      Parameters:
      value - The boolValue to set.
      Returns:
      This builder for chaining.
    • clearBoolValue

      public QaAnswer.AnswerValue.Builder clearBoolValue()
       Boolean value.
       
      bool bool_value = 4;
      Returns:
      This builder for chaining.
    • hasNaValue

      public boolean hasNaValue()
       A value of "Not Applicable (N/A)". Should only ever be `true`.
       
      bool na_value = 5;
      Specified by:
      hasNaValue in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      Whether the naValue field is set.
    • getNaValue

      public boolean getNaValue()
       A value of "Not Applicable (N/A)". Should only ever be `true`.
       
      bool na_value = 5;
      Specified by:
      getNaValue in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      The naValue.
    • setNaValue

      public QaAnswer.AnswerValue.Builder setNaValue(boolean value)
       A value of "Not Applicable (N/A)". Should only ever be `true`.
       
      bool na_value = 5;
      Parameters:
      value - The naValue to set.
      Returns:
      This builder for chaining.
    • clearNaValue

      public QaAnswer.AnswerValue.Builder clearNaValue()
       A value of "Not Applicable (N/A)". Should only ever be `true`.
       
      bool na_value = 5;
      Returns:
      This builder for chaining.
    • getKey

      public String getKey()
       A short string used as an identifier. Matches the value used in
       QaQuestion.AnswerChoice.key.
       
      string key = 1;
      Specified by:
      getKey in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      The key.
    • getKeyBytes

      public com.google.protobuf.ByteString getKeyBytes()
       A short string used as an identifier. Matches the value used in
       QaQuestion.AnswerChoice.key.
       
      string key = 1;
      Specified by:
      getKeyBytes in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      The bytes for key.
    • setKey

      public QaAnswer.AnswerValue.Builder setKey(String value)
       A short string used as an identifier. Matches the value used in
       QaQuestion.AnswerChoice.key.
       
      string key = 1;
      Parameters:
      value - The key to set.
      Returns:
      This builder for chaining.
    • clearKey

      public QaAnswer.AnswerValue.Builder clearKey()
       A short string used as an identifier. Matches the value used in
       QaQuestion.AnswerChoice.key.
       
      string key = 1;
      Returns:
      This builder for chaining.
    • setKeyBytes

      public QaAnswer.AnswerValue.Builder setKeyBytes(com.google.protobuf.ByteString value)
       A short string used as an identifier. Matches the value used in
       QaQuestion.AnswerChoice.key.
       
      string key = 1;
      Parameters:
      value - The bytes for key to set.
      Returns:
      This builder for chaining.
    • hasScore

      public boolean hasScore()
       Output only. Numerical score of the answer.
       
      optional double score = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasScore in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      Whether the score field is set.
    • getScore

      public double getScore()
       Output only. Numerical score of the answer.
       
      optional double score = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getScore in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      The score.
    • setScore

      public QaAnswer.AnswerValue.Builder setScore(double value)
       Output only. Numerical score of the answer.
       
      optional double score = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The score to set.
      Returns:
      This builder for chaining.
    • clearScore

      public QaAnswer.AnswerValue.Builder clearScore()
       Output only. Numerical score of the answer.
       
      optional double score = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasPotentialScore

      public boolean hasPotentialScore()
       Output only. The maximum potential score of the question.
       
      optional double potential_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasPotentialScore in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      Whether the potentialScore field is set.
    • getPotentialScore

      public double getPotentialScore()
       Output only. The maximum potential score of the question.
       
      optional double potential_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getPotentialScore in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      The potentialScore.
    • setPotentialScore

      public QaAnswer.AnswerValue.Builder setPotentialScore(double value)
       Output only. The maximum potential score of the question.
       
      optional double potential_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The potentialScore to set.
      Returns:
      This builder for chaining.
    • clearPotentialScore

      public QaAnswer.AnswerValue.Builder clearPotentialScore()
       Output only. The maximum potential score of the question.
       
      optional double potential_score = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasNormalizedScore

      public boolean hasNormalizedScore()
       Output only. Normalized score of the questions. Calculated as score /
       potential_score.
       
      optional double normalized_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasNormalizedScore in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      Whether the normalizedScore field is set.
    • getNormalizedScore

      public double getNormalizedScore()
       Output only. Normalized score of the questions. Calculated as score /
       potential_score.
       
      optional double normalized_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getNormalizedScore in interface QaAnswer.AnswerValueOrBuilder
      Returns:
      The normalizedScore.
    • setNormalizedScore

      public QaAnswer.AnswerValue.Builder setNormalizedScore(double value)
       Output only. Normalized score of the questions. Calculated as score /
       potential_score.
       
      optional double normalized_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The normalizedScore to set.
      Returns:
      This builder for chaining.
    • clearNormalizedScore

      public QaAnswer.AnswerValue.Builder clearNormalizedScore()
       Output only. Normalized score of the questions. Calculated as score /
       potential_score.
       
      optional double normalized_score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.