Class Control.SynonymsAction.Builder

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

public static final class Control.SynonymsAction.Builder extends com.google.protobuf.GeneratedMessage.Builder<Control.SynonymsAction.Builder> implements Control.SynonymsActionOrBuilder
 Creates a set of terms that will act as synonyms of one another.

 Example: "happy" will also be considered as "glad", "glad" will also be
 considered as "happy".
 
Protobuf type google.cloud.discoveryengine.v1beta.Control.SynonymsAction
  • 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<Control.SynonymsAction.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<Control.SynonymsAction.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<Control.SynonymsAction.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public Control.SynonymsAction.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<Control.SynonymsAction.Builder>
      Throws:
      IOException
    • getSynonymsList

      public com.google.protobuf.ProtocolStringList getSynonymsList()
       Defines a set of synonyms.
       Can specify up to 100 synonyms.
       Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
       thrown.
       
      repeated string synonyms = 1;
      Specified by:
      getSynonymsList in interface Control.SynonymsActionOrBuilder
      Returns:
      A list containing the synonyms.
    • getSynonymsCount

      public int getSynonymsCount()
       Defines a set of synonyms.
       Can specify up to 100 synonyms.
       Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
       thrown.
       
      repeated string synonyms = 1;
      Specified by:
      getSynonymsCount in interface Control.SynonymsActionOrBuilder
      Returns:
      The count of synonyms.
    • getSynonyms

      public String getSynonyms(int index)
       Defines a set of synonyms.
       Can specify up to 100 synonyms.
       Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
       thrown.
       
      repeated string synonyms = 1;
      Specified by:
      getSynonyms in interface Control.SynonymsActionOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The synonyms at the given index.
    • getSynonymsBytes

      public com.google.protobuf.ByteString getSynonymsBytes(int index)
       Defines a set of synonyms.
       Can specify up to 100 synonyms.
       Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
       thrown.
       
      repeated string synonyms = 1;
      Specified by:
      getSynonymsBytes in interface Control.SynonymsActionOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the synonyms at the given index.
    • setSynonyms

      public Control.SynonymsAction.Builder setSynonyms(int index, String value)
       Defines a set of synonyms.
       Can specify up to 100 synonyms.
       Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
       thrown.
       
      repeated string synonyms = 1;
      Parameters:
      index - The index to set the value at.
      value - The synonyms to set.
      Returns:
      This builder for chaining.
    • addSynonyms

      public Control.SynonymsAction.Builder addSynonyms(String value)
       Defines a set of synonyms.
       Can specify up to 100 synonyms.
       Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
       thrown.
       
      repeated string synonyms = 1;
      Parameters:
      value - The synonyms to add.
      Returns:
      This builder for chaining.
    • addAllSynonyms

      public Control.SynonymsAction.Builder addAllSynonyms(Iterable<String> values)
       Defines a set of synonyms.
       Can specify up to 100 synonyms.
       Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
       thrown.
       
      repeated string synonyms = 1;
      Parameters:
      values - The synonyms to add.
      Returns:
      This builder for chaining.
    • clearSynonyms

      public Control.SynonymsAction.Builder clearSynonyms()
       Defines a set of synonyms.
       Can specify up to 100 synonyms.
       Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
       thrown.
       
      repeated string synonyms = 1;
      Returns:
      This builder for chaining.
    • addSynonymsBytes

      public Control.SynonymsAction.Builder addSynonymsBytes(com.google.protobuf.ByteString value)
       Defines a set of synonyms.
       Can specify up to 100 synonyms.
       Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is
       thrown.
       
      repeated string synonyms = 1;
      Parameters:
      value - The bytes of the synonyms to add.
      Returns:
      This builder for chaining.