Class GenerativeQuestionConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<GenerativeQuestionConfig.Builder>
com.google.cloud.retail.v2alpha.GenerativeQuestionConfig.Builder
All Implemented Interfaces:
GenerativeQuestionConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
GenerativeQuestionConfig

public static final class GenerativeQuestionConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<GenerativeQuestionConfig.Builder> implements GenerativeQuestionConfigOrBuilder
 Configuration for a single generated question.
 
Protobuf type google.cloud.retail.v2alpha.GenerativeQuestionConfig
  • 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<GenerativeQuestionConfig.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<GenerativeQuestionConfig.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<GenerativeQuestionConfig.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public GenerativeQuestionConfig.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<GenerativeQuestionConfig.Builder>
      Throws:
      IOException
    • getCatalog

      public String getCatalog()
       Required. Resource name of the catalog.
       Format: projects/{project}/locations/{location}/catalogs/{catalog}
       
      string catalog = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getCatalog in interface GenerativeQuestionConfigOrBuilder
      Returns:
      The catalog.
    • getCatalogBytes

      public com.google.protobuf.ByteString getCatalogBytes()
       Required. Resource name of the catalog.
       Format: projects/{project}/locations/{location}/catalogs/{catalog}
       
      string catalog = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getCatalogBytes in interface GenerativeQuestionConfigOrBuilder
      Returns:
      The bytes for catalog.
    • setCatalog

      public GenerativeQuestionConfig.Builder setCatalog(String value)
       Required. Resource name of the catalog.
       Format: projects/{project}/locations/{location}/catalogs/{catalog}
       
      string catalog = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The catalog to set.
      Returns:
      This builder for chaining.
    • clearCatalog

      public GenerativeQuestionConfig.Builder clearCatalog()
       Required. Resource name of the catalog.
       Format: projects/{project}/locations/{location}/catalogs/{catalog}
       
      string catalog = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setCatalogBytes

      public GenerativeQuestionConfig.Builder setCatalogBytes(com.google.protobuf.ByteString value)
       Required. Resource name of the catalog.
       Format: projects/{project}/locations/{location}/catalogs/{catalog}
       
      string catalog = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for catalog to set.
      Returns:
      This builder for chaining.
    • getFacet

      public String getFacet()
       Required. The facet to which the question is associated.
       
      string facet = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getFacet in interface GenerativeQuestionConfigOrBuilder
      Returns:
      The facet.
    • getFacetBytes

      public com.google.protobuf.ByteString getFacetBytes()
       Required. The facet to which the question is associated.
       
      string facet = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getFacetBytes in interface GenerativeQuestionConfigOrBuilder
      Returns:
      The bytes for facet.
    • setFacet

      public GenerativeQuestionConfig.Builder setFacet(String value)
       Required. The facet to which the question is associated.
       
      string facet = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The facet to set.
      Returns:
      This builder for chaining.
    • clearFacet

      public GenerativeQuestionConfig.Builder clearFacet()
       Required. The facet to which the question is associated.
       
      string facet = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setFacetBytes

      public GenerativeQuestionConfig.Builder setFacetBytes(com.google.protobuf.ByteString value)
       Required. The facet to which the question is associated.
       
      string facet = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for facet to set.
      Returns:
      This builder for chaining.
    • getGeneratedQuestion

      public String getGeneratedQuestion()
       Output only. The LLM generated question.
       
      string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getGeneratedQuestion in interface GenerativeQuestionConfigOrBuilder
      Returns:
      The generatedQuestion.
    • getGeneratedQuestionBytes

      public com.google.protobuf.ByteString getGeneratedQuestionBytes()
       Output only. The LLM generated question.
       
      string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getGeneratedQuestionBytes in interface GenerativeQuestionConfigOrBuilder
      Returns:
      The bytes for generatedQuestion.
    • setGeneratedQuestion

      public GenerativeQuestionConfig.Builder setGeneratedQuestion(String value)
       Output only. The LLM generated question.
       
      string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The generatedQuestion to set.
      Returns:
      This builder for chaining.
    • clearGeneratedQuestion

      public GenerativeQuestionConfig.Builder clearGeneratedQuestion()
       Output only. The LLM generated question.
       
      string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setGeneratedQuestionBytes

      public GenerativeQuestionConfig.Builder setGeneratedQuestionBytes(com.google.protobuf.ByteString value)
       Output only. The LLM generated question.
       
      string generated_question = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for generatedQuestion to set.
      Returns:
      This builder for chaining.
    • getFinalQuestion

      public String getFinalQuestion()
       Optional. The question that will be used at serving time.
       Question can have a max length of 300 bytes.
       When not populated, generated_question should be used.
       
      string final_question = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getFinalQuestion in interface GenerativeQuestionConfigOrBuilder
      Returns:
      The finalQuestion.
    • getFinalQuestionBytes

      public com.google.protobuf.ByteString getFinalQuestionBytes()
       Optional. The question that will be used at serving time.
       Question can have a max length of 300 bytes.
       When not populated, generated_question should be used.
       
      string final_question = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getFinalQuestionBytes in interface GenerativeQuestionConfigOrBuilder
      Returns:
      The bytes for finalQuestion.
    • setFinalQuestion

      public GenerativeQuestionConfig.Builder setFinalQuestion(String value)
       Optional. The question that will be used at serving time.
       Question can have a max length of 300 bytes.
       When not populated, generated_question should be used.
       
      string final_question = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The finalQuestion to set.
      Returns:
      This builder for chaining.
    • clearFinalQuestion

      public GenerativeQuestionConfig.Builder clearFinalQuestion()
       Optional. The question that will be used at serving time.
       Question can have a max length of 300 bytes.
       When not populated, generated_question should be used.
       
      string final_question = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setFinalQuestionBytes

      public GenerativeQuestionConfig.Builder setFinalQuestionBytes(com.google.protobuf.ByteString value)
       Optional. The question that will be used at serving time.
       Question can have a max length of 300 bytes.
       When not populated, generated_question should be used.
       
      string final_question = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for finalQuestion to set.
      Returns:
      This builder for chaining.
    • getExampleValuesList

      public com.google.protobuf.ProtocolStringList getExampleValuesList()
       Output only. Values that can be used to answer the question.
       
      repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getExampleValuesList in interface GenerativeQuestionConfigOrBuilder
      Returns:
      A list containing the exampleValues.
    • getExampleValuesCount

      public int getExampleValuesCount()
       Output only. Values that can be used to answer the question.
       
      repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getExampleValuesCount in interface GenerativeQuestionConfigOrBuilder
      Returns:
      The count of exampleValues.
    • getExampleValues

      public String getExampleValues(int index)
       Output only. Values that can be used to answer the question.
       
      repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getExampleValues in interface GenerativeQuestionConfigOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The exampleValues at the given index.
    • getExampleValuesBytes

      public com.google.protobuf.ByteString getExampleValuesBytes(int index)
       Output only. Values that can be used to answer the question.
       
      repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getExampleValuesBytes in interface GenerativeQuestionConfigOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the exampleValues at the given index.
    • setExampleValues

      public GenerativeQuestionConfig.Builder setExampleValues(int index, String value)
       Output only. Values that can be used to answer the question.
       
      repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      index - The index to set the value at.
      value - The exampleValues to set.
      Returns:
      This builder for chaining.
    • addExampleValues

      public GenerativeQuestionConfig.Builder addExampleValues(String value)
       Output only. Values that can be used to answer the question.
       
      repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The exampleValues to add.
      Returns:
      This builder for chaining.
    • addAllExampleValues

      public GenerativeQuestionConfig.Builder addAllExampleValues(Iterable<String> values)
       Output only. Values that can be used to answer the question.
       
      repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      values - The exampleValues to add.
      Returns:
      This builder for chaining.
    • clearExampleValues

      public GenerativeQuestionConfig.Builder clearExampleValues()
       Output only. Values that can be used to answer the question.
       
      repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • addExampleValuesBytes

      public GenerativeQuestionConfig.Builder addExampleValuesBytes(com.google.protobuf.ByteString value)
       Output only. Values that can be used to answer the question.
       
      repeated string example_values = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes of the exampleValues to add.
      Returns:
      This builder for chaining.
    • getFrequency

      public float getFrequency()
       Output only. The ratio of how often a question was asked.
       
      float frequency = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getFrequency in interface GenerativeQuestionConfigOrBuilder
      Returns:
      The frequency.
    • setFrequency

      public GenerativeQuestionConfig.Builder setFrequency(float value)
       Output only. The ratio of how often a question was asked.
       
      float frequency = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The frequency to set.
      Returns:
      This builder for chaining.
    • clearFrequency

      public GenerativeQuestionConfig.Builder clearFrequency()
       Output only. The ratio of how often a question was asked.
       
      float frequency = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getAllowedInConversation

      public boolean getAllowedInConversation()
       Optional. Whether the question is asked at serving time.
       
      bool allowed_in_conversation = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAllowedInConversation in interface GenerativeQuestionConfigOrBuilder
      Returns:
      The allowedInConversation.
    • setAllowedInConversation

      public GenerativeQuestionConfig.Builder setAllowedInConversation(boolean value)
       Optional. Whether the question is asked at serving time.
       
      bool allowed_in_conversation = 7 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The allowedInConversation to set.
      Returns:
      This builder for chaining.
    • clearAllowedInConversation

      public GenerativeQuestionConfig.Builder clearAllowedInConversation()
       Optional. Whether the question is asked at serving time.
       
      bool allowed_in_conversation = 7 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.