Class GroundedGenerationContent.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<GroundedGenerationContent.Builder>
com.google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Builder
All Implemented Interfaces:
GroundedGenerationContentOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
GroundedGenerationContent

public static final class GroundedGenerationContent.Builder extends com.google.protobuf.GeneratedMessage.Builder<GroundedGenerationContent.Builder> implements GroundedGenerationContentOrBuilder
 Base structured datatype containing multi-part content of a message.
 
Protobuf type google.cloud.discoveryengine.v1beta.GroundedGenerationContent
  • 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<GroundedGenerationContent.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<GroundedGenerationContent.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<GroundedGenerationContent.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public GroundedGenerationContent.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<GroundedGenerationContent.Builder>
      Throws:
      IOException
    • getRole

      public String getRole()
       Producer of the content. Must be either `user` or `model`.
      
       Intended to be used for multi-turn conversations. Otherwise, it can be left
       unset.
       
      string role = 1;
      Specified by:
      getRole in interface GroundedGenerationContentOrBuilder
      Returns:
      The role.
    • getRoleBytes

      public com.google.protobuf.ByteString getRoleBytes()
       Producer of the content. Must be either `user` or `model`.
      
       Intended to be used for multi-turn conversations. Otherwise, it can be left
       unset.
       
      string role = 1;
      Specified by:
      getRoleBytes in interface GroundedGenerationContentOrBuilder
      Returns:
      The bytes for role.
    • setRole

      public GroundedGenerationContent.Builder setRole(String value)
       Producer of the content. Must be either `user` or `model`.
      
       Intended to be used for multi-turn conversations. Otherwise, it can be left
       unset.
       
      string role = 1;
      Parameters:
      value - The role to set.
      Returns:
      This builder for chaining.
    • clearRole

       Producer of the content. Must be either `user` or `model`.
      
       Intended to be used for multi-turn conversations. Otherwise, it can be left
       unset.
       
      string role = 1;
      Returns:
      This builder for chaining.
    • setRoleBytes

      public GroundedGenerationContent.Builder setRoleBytes(com.google.protobuf.ByteString value)
       Producer of the content. Must be either `user` or `model`.
      
       Intended to be used for multi-turn conversations. Otherwise, it can be left
       unset.
       
      string role = 1;
      Parameters:
      value - The bytes for role to set.
      Returns:
      This builder for chaining.
    • getPartsList

      public List<GroundedGenerationContent.Part> getPartsList()
       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
      Specified by:
      getPartsList in interface GroundedGenerationContentOrBuilder
    • getPartsCount

      public int getPartsCount()
       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
      Specified by:
      getPartsCount in interface GroundedGenerationContentOrBuilder
    • getParts

      public GroundedGenerationContent.Part getParts(int index)
       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
      Specified by:
      getParts in interface GroundedGenerationContentOrBuilder
    • setParts

       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
    • setParts

      public GroundedGenerationContent.Builder setParts(int index, GroundedGenerationContent.Part.Builder builderForValue)
       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
    • addParts

       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
    • addParts

       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
    • addParts

       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
    • addParts

      public GroundedGenerationContent.Builder addParts(int index, GroundedGenerationContent.Part.Builder builderForValue)
       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
    • addAllParts

       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
    • clearParts

      public GroundedGenerationContent.Builder clearParts()
       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
    • removeParts

      public GroundedGenerationContent.Builder removeParts(int index)
       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
    • getPartsBuilder

      public GroundedGenerationContent.Part.Builder getPartsBuilder(int index)
       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
    • getPartsOrBuilder

      public GroundedGenerationContent.PartOrBuilder getPartsOrBuilder(int index)
       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
      Specified by:
      getPartsOrBuilder in interface GroundedGenerationContentOrBuilder
    • getPartsOrBuilderList

      public List<? extends GroundedGenerationContent.PartOrBuilder> getPartsOrBuilderList()
       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
      Specified by:
      getPartsOrBuilderList in interface GroundedGenerationContentOrBuilder
    • addPartsBuilder

      public GroundedGenerationContent.Part.Builder addPartsBuilder()
       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
    • addPartsBuilder

      public GroundedGenerationContent.Part.Builder addPartsBuilder(int index)
       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;
    • getPartsBuilderList

      public List<GroundedGenerationContent.Part.Builder> getPartsBuilderList()
       Ordered `Parts` that constitute a single message.
       
      repeated .google.cloud.discoveryengine.v1beta.GroundedGenerationContent.Part parts = 2;