Class FaqAnswer.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<FaqAnswer.Builder>
com.google.cloud.dialogflow.v2.FaqAnswer.Builder
All Implemented Interfaces:
FaqAnswerOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
FaqAnswer

public static final class FaqAnswer.Builder extends com.google.protobuf.GeneratedMessage.Builder<FaqAnswer.Builder> implements FaqAnswerOrBuilder
 Represents answer from "frequently asked questions".
 
Protobuf type google.cloud.dialogflow.v2.FaqAnswer
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    The piece of text from the `source` knowledge base document.
    The name of answer record, in the format of "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>"
    The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).
     
    The corresponding FAQ question.
    Indicates which Knowledge Document this answer was extracted from.
    boolean
    A map that contains metadata about the answer and the document from which it originates.
    The piece of text from the `source` knowledge base document.
    com.google.protobuf.ByteString
    The piece of text from the `source` knowledge base document.
    The name of answer record, in the format of "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>"
    com.google.protobuf.ByteString
    The name of answer record, in the format of "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>"
    float
    The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    Deprecated.
    int
    A map that contains metadata about the answer and the document from which it originates.
    A map that contains metadata about the answer and the document from which it originates.
    getMetadataOrDefault(String key, String defaultValue)
    A map that contains metadata about the answer and the document from which it originates.
    A map that contains metadata about the answer and the document from which it originates.
    Deprecated.
    The corresponding FAQ question.
    com.google.protobuf.ByteString
    The corresponding FAQ question.
    Indicates which Knowledge Document this answer was extracted from.
    com.google.protobuf.ByteString
    Indicates which Knowledge Document this answer was extracted from.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    protected com.google.protobuf.MapFieldReflectionAccessor
     
    protected com.google.protobuf.MapFieldReflectionAccessor
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    A map that contains metadata about the answer and the document from which it originates.
    putMetadata(String key, String value)
    A map that contains metadata about the answer and the document from which it originates.
    A map that contains metadata about the answer and the document from which it originates.
    The piece of text from the `source` knowledge base document.
    setAnswerBytes(com.google.protobuf.ByteString value)
    The piece of text from the `source` knowledge base document.
    The name of answer record, in the format of "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>"
    setAnswerRecordBytes(com.google.protobuf.ByteString value)
    The name of answer record, in the format of "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record ID>"
    setConfidence(float value)
    The system's confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).
    The corresponding FAQ question.
    setQuestionBytes(com.google.protobuf.ByteString value)
    The corresponding FAQ question.
    Indicates which Knowledge Document this answer was extracted from.
    setSourceBytes(com.google.protobuf.ByteString value)
    Indicates which Knowledge Document this answer was extracted from.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<FaqAnswer.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<FaqAnswer.Builder>
    • internalGetFieldAccessorTable

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

      public FaqAnswer.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<FaqAnswer.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<FaqAnswer.Builder>
    • getDefaultInstanceForType

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

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

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

      public FaqAnswer.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<FaqAnswer.Builder>
    • mergeFrom

      public FaqAnswer.Builder mergeFrom(FaqAnswer other)
    • isInitialized

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

      public FaqAnswer.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<FaqAnswer.Builder>
      Throws:
      IOException
    • getAnswer

      public String getAnswer()
       The piece of text from the `source` knowledge base document.
       
      string answer = 1;
      Specified by:
      getAnswer in interface FaqAnswerOrBuilder
      Returns:
      The answer.
    • getAnswerBytes

      public com.google.protobuf.ByteString getAnswerBytes()
       The piece of text from the `source` knowledge base document.
       
      string answer = 1;
      Specified by:
      getAnswerBytes in interface FaqAnswerOrBuilder
      Returns:
      The bytes for answer.
    • setAnswer

      public FaqAnswer.Builder setAnswer(String value)
       The piece of text from the `source` knowledge base document.
       
      string answer = 1;
      Parameters:
      value - The answer to set.
      Returns:
      This builder for chaining.
    • clearAnswer

      public FaqAnswer.Builder clearAnswer()
       The piece of text from the `source` knowledge base document.
       
      string answer = 1;
      Returns:
      This builder for chaining.
    • setAnswerBytes

      public FaqAnswer.Builder setAnswerBytes(com.google.protobuf.ByteString value)
       The piece of text from the `source` knowledge base document.
       
      string answer = 1;
      Parameters:
      value - The bytes for answer to set.
      Returns:
      This builder for chaining.
    • getConfidence

      public float getConfidence()
       The system's confidence score that this Knowledge answer is a good match
       for this conversational query, range from 0.0 (completely uncertain)
       to 1.0 (completely certain).
       
      float confidence = 2;
      Specified by:
      getConfidence in interface FaqAnswerOrBuilder
      Returns:
      The confidence.
    • setConfidence

      public FaqAnswer.Builder setConfidence(float value)
       The system's confidence score that this Knowledge answer is a good match
       for this conversational query, range from 0.0 (completely uncertain)
       to 1.0 (completely certain).
       
      float confidence = 2;
      Parameters:
      value - The confidence to set.
      Returns:
      This builder for chaining.
    • clearConfidence

      public FaqAnswer.Builder clearConfidence()
       The system's confidence score that this Knowledge answer is a good match
       for this conversational query, range from 0.0 (completely uncertain)
       to 1.0 (completely certain).
       
      float confidence = 2;
      Returns:
      This builder for chaining.
    • getQuestion

      public String getQuestion()
       The corresponding FAQ question.
       
      string question = 3;
      Specified by:
      getQuestion in interface FaqAnswerOrBuilder
      Returns:
      The question.
    • getQuestionBytes

      public com.google.protobuf.ByteString getQuestionBytes()
       The corresponding FAQ question.
       
      string question = 3;
      Specified by:
      getQuestionBytes in interface FaqAnswerOrBuilder
      Returns:
      The bytes for question.
    • setQuestion

      public FaqAnswer.Builder setQuestion(String value)
       The corresponding FAQ question.
       
      string question = 3;
      Parameters:
      value - The question to set.
      Returns:
      This builder for chaining.
    • clearQuestion

      public FaqAnswer.Builder clearQuestion()
       The corresponding FAQ question.
       
      string question = 3;
      Returns:
      This builder for chaining.
    • setQuestionBytes

      public FaqAnswer.Builder setQuestionBytes(com.google.protobuf.ByteString value)
       The corresponding FAQ question.
       
      string question = 3;
      Parameters:
      value - The bytes for question to set.
      Returns:
      This builder for chaining.
    • getSource

      public String getSource()
       Indicates which Knowledge Document this answer was extracted
       from.
       Format: `projects/<Project ID>/locations/<Location
       ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
       
      string source = 4;
      Specified by:
      getSource in interface FaqAnswerOrBuilder
      Returns:
      The source.
    • getSourceBytes

      public com.google.protobuf.ByteString getSourceBytes()
       Indicates which Knowledge Document this answer was extracted
       from.
       Format: `projects/<Project ID>/locations/<Location
       ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
       
      string source = 4;
      Specified by:
      getSourceBytes in interface FaqAnswerOrBuilder
      Returns:
      The bytes for source.
    • setSource

      public FaqAnswer.Builder setSource(String value)
       Indicates which Knowledge Document this answer was extracted
       from.
       Format: `projects/<Project ID>/locations/<Location
       ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
       
      string source = 4;
      Parameters:
      value - The source to set.
      Returns:
      This builder for chaining.
    • clearSource

      public FaqAnswer.Builder clearSource()
       Indicates which Knowledge Document this answer was extracted
       from.
       Format: `projects/<Project ID>/locations/<Location
       ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
       
      string source = 4;
      Returns:
      This builder for chaining.
    • setSourceBytes

      public FaqAnswer.Builder setSourceBytes(com.google.protobuf.ByteString value)
       Indicates which Knowledge Document this answer was extracted
       from.
       Format: `projects/<Project ID>/locations/<Location
       ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
       
      string source = 4;
      Parameters:
      value - The bytes for source to set.
      Returns:
      This builder for chaining.
    • getMetadataCount

      public int getMetadataCount()
      Description copied from interface: FaqAnswerOrBuilder
       A map that contains metadata about the answer and the
       document from which it originates.
       
      map<string, string> metadata = 5;
      Specified by:
      getMetadataCount in interface FaqAnswerOrBuilder
    • containsMetadata

      public boolean containsMetadata(String key)
       A map that contains metadata about the answer and the
       document from which it originates.
       
      map<string, string> metadata = 5;
      Specified by:
      containsMetadata in interface FaqAnswerOrBuilder
    • getMetadata

      @Deprecated public Map<String,String> getMetadata()
      Deprecated.
      Use getMetadataMap() instead.
      Specified by:
      getMetadata in interface FaqAnswerOrBuilder
    • getMetadataMap

      public Map<String,String> getMetadataMap()
       A map that contains metadata about the answer and the
       document from which it originates.
       
      map<string, string> metadata = 5;
      Specified by:
      getMetadataMap in interface FaqAnswerOrBuilder
    • getMetadataOrDefault

      public String getMetadataOrDefault(String key, String defaultValue)
       A map that contains metadata about the answer and the
       document from which it originates.
       
      map<string, string> metadata = 5;
      Specified by:
      getMetadataOrDefault in interface FaqAnswerOrBuilder
    • getMetadataOrThrow

      public String getMetadataOrThrow(String key)
       A map that contains metadata about the answer and the
       document from which it originates.
       
      map<string, string> metadata = 5;
      Specified by:
      getMetadataOrThrow in interface FaqAnswerOrBuilder
    • clearMetadata

      public FaqAnswer.Builder clearMetadata()
    • removeMetadata

      public FaqAnswer.Builder removeMetadata(String key)
       A map that contains metadata about the answer and the
       document from which it originates.
       
      map<string, string> metadata = 5;
    • getMutableMetadata

      @Deprecated public Map<String,String> getMutableMetadata()
      Deprecated.
      Use alternate mutation accessors instead.
    • putMetadata

      public FaqAnswer.Builder putMetadata(String key, String value)
       A map that contains metadata about the answer and the
       document from which it originates.
       
      map<string, string> metadata = 5;
    • putAllMetadata

      public FaqAnswer.Builder putAllMetadata(Map<String,String> values)
       A map that contains metadata about the answer and the
       document from which it originates.
       
      map<string, string> metadata = 5;
    • getAnswerRecord

      public String getAnswerRecord()
       The name of answer record, in the format of
       "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
       ID>"
       
      string answer_record = 6;
      Specified by:
      getAnswerRecord in interface FaqAnswerOrBuilder
      Returns:
      The answerRecord.
    • getAnswerRecordBytes

      public com.google.protobuf.ByteString getAnswerRecordBytes()
       The name of answer record, in the format of
       "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
       ID>"
       
      string answer_record = 6;
      Specified by:
      getAnswerRecordBytes in interface FaqAnswerOrBuilder
      Returns:
      The bytes for answerRecord.
    • setAnswerRecord

      public FaqAnswer.Builder setAnswerRecord(String value)
       The name of answer record, in the format of
       "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
       ID>"
       
      string answer_record = 6;
      Parameters:
      value - The answerRecord to set.
      Returns:
      This builder for chaining.
    • clearAnswerRecord

      public FaqAnswer.Builder clearAnswerRecord()
       The name of answer record, in the format of
       "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
       ID>"
       
      string answer_record = 6;
      Returns:
      This builder for chaining.
    • setAnswerRecordBytes

      public FaqAnswer.Builder setAnswerRecordBytes(com.google.protobuf.ByteString value)
       The name of answer record, in the format of
       "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
       ID>"
       
      string answer_record = 6;
      Parameters:
      value - The bytes for answerRecord to set.
      Returns:
      This builder for chaining.