Class DocumentSchema.EntityType.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<DocumentSchema.EntityType.Builder>
com.google.cloud.documentai.v1.DocumentSchema.EntityType.Builder
All Implemented Interfaces:
DocumentSchema.EntityTypeOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
DocumentSchema.EntityType

public static final class DocumentSchema.EntityType.Builder extends com.google.protobuf.GeneratedMessage.Builder<DocumentSchema.EntityType.Builder> implements DocumentSchema.EntityTypeOrBuilder
 EntityType is the wrapper of a label of the corresponding model with
 detailed attributes and limitations for entity-based processors. Multiple
 types can also compose a dependency tree to represent nested types.
 
Protobuf type google.cloud.documentai.v1.DocumentSchema.EntityType
  • 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<DocumentSchema.EntityType.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<DocumentSchema.EntityType.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<DocumentSchema.EntityType.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public DocumentSchema.EntityType.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<DocumentSchema.EntityType.Builder>
      Throws:
      IOException
    • getValueSourceCase

      public DocumentSchema.EntityType.ValueSourceCase getValueSourceCase()
      Specified by:
      getValueSourceCase in interface DocumentSchema.EntityTypeOrBuilder
    • clearValueSource

      public DocumentSchema.EntityType.Builder clearValueSource()
    • hasEnumValues

      public boolean hasEnumValues()
       If specified, lists all the possible values for this entity.  This
       should not be more than a handful of values.  If the number of values
       is >10 or could change frequently use the `EntityType.value_ontology`
       field and specify a list of all possible values in a value ontology
       file.
       
      .google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14;
      Specified by:
      hasEnumValues in interface DocumentSchema.EntityTypeOrBuilder
      Returns:
      Whether the enumValues field is set.
    • getEnumValues

      public DocumentSchema.EntityType.EnumValues getEnumValues()
       If specified, lists all the possible values for this entity.  This
       should not be more than a handful of values.  If the number of values
       is >10 or could change frequently use the `EntityType.value_ontology`
       field and specify a list of all possible values in a value ontology
       file.
       
      .google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14;
      Specified by:
      getEnumValues in interface DocumentSchema.EntityTypeOrBuilder
      Returns:
      The enumValues.
    • setEnumValues

       If specified, lists all the possible values for this entity.  This
       should not be more than a handful of values.  If the number of values
       is >10 or could change frequently use the `EntityType.value_ontology`
       field and specify a list of all possible values in a value ontology
       file.
       
      .google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14;
    • setEnumValues

       If specified, lists all the possible values for this entity.  This
       should not be more than a handful of values.  If the number of values
       is >10 or could change frequently use the `EntityType.value_ontology`
       field and specify a list of all possible values in a value ontology
       file.
       
      .google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14;
    • mergeEnumValues

       If specified, lists all the possible values for this entity.  This
       should not be more than a handful of values.  If the number of values
       is >10 or could change frequently use the `EntityType.value_ontology`
       field and specify a list of all possible values in a value ontology
       file.
       
      .google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14;
    • clearEnumValues

      public DocumentSchema.EntityType.Builder clearEnumValues()
       If specified, lists all the possible values for this entity.  This
       should not be more than a handful of values.  If the number of values
       is >10 or could change frequently use the `EntityType.value_ontology`
       field and specify a list of all possible values in a value ontology
       file.
       
      .google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14;
    • getEnumValuesBuilder

      public DocumentSchema.EntityType.EnumValues.Builder getEnumValuesBuilder()
       If specified, lists all the possible values for this entity.  This
       should not be more than a handful of values.  If the number of values
       is >10 or could change frequently use the `EntityType.value_ontology`
       field and specify a list of all possible values in a value ontology
       file.
       
      .google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14;
    • getEnumValuesOrBuilder

      public DocumentSchema.EntityType.EnumValuesOrBuilder getEnumValuesOrBuilder()
       If specified, lists all the possible values for this entity.  This
       should not be more than a handful of values.  If the number of values
       is >10 or could change frequently use the `EntityType.value_ontology`
       field and specify a list of all possible values in a value ontology
       file.
       
      .google.cloud.documentai.v1.DocumentSchema.EntityType.EnumValues enum_values = 14;
      Specified by:
      getEnumValuesOrBuilder in interface DocumentSchema.EntityTypeOrBuilder
    • getDisplayName

      public String getDisplayName()
       User defined name for the type.
       
      string display_name = 13;
      Specified by:
      getDisplayName in interface DocumentSchema.EntityTypeOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       User defined name for the type.
       
      string display_name = 13;
      Specified by:
      getDisplayNameBytes in interface DocumentSchema.EntityTypeOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public DocumentSchema.EntityType.Builder setDisplayName(String value)
       User defined name for the type.
       
      string display_name = 13;
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public DocumentSchema.EntityType.Builder clearDisplayName()
       User defined name for the type.
       
      string display_name = 13;
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public DocumentSchema.EntityType.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       User defined name for the type.
       
      string display_name = 13;
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getName

      public String getName()
       Name of the type. It must be unique within the schema file and
       cannot be a "Common Type".  The following naming conventions are used:
      
       - Use `snake_casing`.
       - Name matching is case-sensitive.
       - Maximum 64 characters.
       - Must start with a letter.
       - Allowed characters: ASCII letters `[a-z0-9_-]`.  (For backward
       compatibility internal infrastructure and tooling can handle any ascii
       character.)
       - The `/` is sometimes used to denote a property of a type.  For example
       `line_item/amount`.  This convention is deprecated, but will still be
       honored for backward compatibility.
       
      string name = 1;
      Specified by:
      getName in interface DocumentSchema.EntityTypeOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Name of the type. It must be unique within the schema file and
       cannot be a "Common Type".  The following naming conventions are used:
      
       - Use `snake_casing`.
       - Name matching is case-sensitive.
       - Maximum 64 characters.
       - Must start with a letter.
       - Allowed characters: ASCII letters `[a-z0-9_-]`.  (For backward
       compatibility internal infrastructure and tooling can handle any ascii
       character.)
       - The `/` is sometimes used to denote a property of a type.  For example
       `line_item/amount`.  This convention is deprecated, but will still be
       honored for backward compatibility.
       
      string name = 1;
      Specified by:
      getNameBytes in interface DocumentSchema.EntityTypeOrBuilder
      Returns:
      The bytes for name.
    • setName

      public DocumentSchema.EntityType.Builder setName(String value)
       Name of the type. It must be unique within the schema file and
       cannot be a "Common Type".  The following naming conventions are used:
      
       - Use `snake_casing`.
       - Name matching is case-sensitive.
       - Maximum 64 characters.
       - Must start with a letter.
       - Allowed characters: ASCII letters `[a-z0-9_-]`.  (For backward
       compatibility internal infrastructure and tooling can handle any ascii
       character.)
       - The `/` is sometimes used to denote a property of a type.  For example
       `line_item/amount`.  This convention is deprecated, but will still be
       honored for backward compatibility.
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

       Name of the type. It must be unique within the schema file and
       cannot be a "Common Type".  The following naming conventions are used:
      
       - Use `snake_casing`.
       - Name matching is case-sensitive.
       - Maximum 64 characters.
       - Must start with a letter.
       - Allowed characters: ASCII letters `[a-z0-9_-]`.  (For backward
       compatibility internal infrastructure and tooling can handle any ascii
       character.)
       - The `/` is sometimes used to denote a property of a type.  For example
       `line_item/amount`.  This convention is deprecated, but will still be
       honored for backward compatibility.
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public DocumentSchema.EntityType.Builder setNameBytes(com.google.protobuf.ByteString value)
       Name of the type. It must be unique within the schema file and
       cannot be a "Common Type".  The following naming conventions are used:
      
       - Use `snake_casing`.
       - Name matching is case-sensitive.
       - Maximum 64 characters.
       - Must start with a letter.
       - Allowed characters: ASCII letters `[a-z0-9_-]`.  (For backward
       compatibility internal infrastructure and tooling can handle any ascii
       character.)
       - The `/` is sometimes used to denote a property of a type.  For example
       `line_item/amount`.  This convention is deprecated, but will still be
       honored for backward compatibility.
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getBaseTypesList

      public com.google.protobuf.ProtocolStringList getBaseTypesList()
       The entity type that this type is derived from.  For now, one and only
       one should be set.
       
      repeated string base_types = 2;
      Specified by:
      getBaseTypesList in interface DocumentSchema.EntityTypeOrBuilder
      Returns:
      A list containing the baseTypes.
    • getBaseTypesCount

      public int getBaseTypesCount()
       The entity type that this type is derived from.  For now, one and only
       one should be set.
       
      repeated string base_types = 2;
      Specified by:
      getBaseTypesCount in interface DocumentSchema.EntityTypeOrBuilder
      Returns:
      The count of baseTypes.
    • getBaseTypes

      public String getBaseTypes(int index)
       The entity type that this type is derived from.  For now, one and only
       one should be set.
       
      repeated string base_types = 2;
      Specified by:
      getBaseTypes in interface DocumentSchema.EntityTypeOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The baseTypes at the given index.
    • getBaseTypesBytes

      public com.google.protobuf.ByteString getBaseTypesBytes(int index)
       The entity type that this type is derived from.  For now, one and only
       one should be set.
       
      repeated string base_types = 2;
      Specified by:
      getBaseTypesBytes in interface DocumentSchema.EntityTypeOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the baseTypes at the given index.
    • setBaseTypes

      public DocumentSchema.EntityType.Builder setBaseTypes(int index, String value)
       The entity type that this type is derived from.  For now, one and only
       one should be set.
       
      repeated string base_types = 2;
      Parameters:
      index - The index to set the value at.
      value - The baseTypes to set.
      Returns:
      This builder for chaining.
    • addBaseTypes

      public DocumentSchema.EntityType.Builder addBaseTypes(String value)
       The entity type that this type is derived from.  For now, one and only
       one should be set.
       
      repeated string base_types = 2;
      Parameters:
      value - The baseTypes to add.
      Returns:
      This builder for chaining.
    • addAllBaseTypes

      public DocumentSchema.EntityType.Builder addAllBaseTypes(Iterable<String> values)
       The entity type that this type is derived from.  For now, one and only
       one should be set.
       
      repeated string base_types = 2;
      Parameters:
      values - The baseTypes to add.
      Returns:
      This builder for chaining.
    • clearBaseTypes

      public DocumentSchema.EntityType.Builder clearBaseTypes()
       The entity type that this type is derived from.  For now, one and only
       one should be set.
       
      repeated string base_types = 2;
      Returns:
      This builder for chaining.
    • addBaseTypesBytes

      public DocumentSchema.EntityType.Builder addBaseTypesBytes(com.google.protobuf.ByteString value)
       The entity type that this type is derived from.  For now, one and only
       one should be set.
       
      repeated string base_types = 2;
      Parameters:
      value - The bytes of the baseTypes to add.
      Returns:
      This builder for chaining.
    • getPropertiesList

      public List<DocumentSchema.EntityType.Property> getPropertiesList()
       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
      Specified by:
      getPropertiesList in interface DocumentSchema.EntityTypeOrBuilder
    • getPropertiesCount

      public int getPropertiesCount()
       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
      Specified by:
      getPropertiesCount in interface DocumentSchema.EntityTypeOrBuilder
    • getProperties

      public DocumentSchema.EntityType.Property getProperties(int index)
       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
      Specified by:
      getProperties in interface DocumentSchema.EntityTypeOrBuilder
    • setProperties

       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
    • setProperties

      public DocumentSchema.EntityType.Builder setProperties(int index, DocumentSchema.EntityType.Property.Builder builderForValue)
       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
    • addProperties

       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
    • addProperties

       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
    • addProperties

       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
    • addProperties

      public DocumentSchema.EntityType.Builder addProperties(int index, DocumentSchema.EntityType.Property.Builder builderForValue)
       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
    • addAllProperties

       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
    • clearProperties

      public DocumentSchema.EntityType.Builder clearProperties()
       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
    • removeProperties

      public DocumentSchema.EntityType.Builder removeProperties(int index)
       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
    • getPropertiesBuilder

      public DocumentSchema.EntityType.Property.Builder getPropertiesBuilder(int index)
       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
    • getPropertiesOrBuilder

      public DocumentSchema.EntityType.PropertyOrBuilder getPropertiesOrBuilder(int index)
       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
      Specified by:
      getPropertiesOrBuilder in interface DocumentSchema.EntityTypeOrBuilder
    • getPropertiesOrBuilderList

      public List<? extends DocumentSchema.EntityType.PropertyOrBuilder> getPropertiesOrBuilderList()
       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
      Specified by:
      getPropertiesOrBuilderList in interface DocumentSchema.EntityTypeOrBuilder
    • addPropertiesBuilder

      public DocumentSchema.EntityType.Property.Builder addPropertiesBuilder()
       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
    • addPropertiesBuilder

      public DocumentSchema.EntityType.Property.Builder addPropertiesBuilder(int index)
       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;
    • getPropertiesBuilderList

      public List<DocumentSchema.EntityType.Property.Builder> getPropertiesBuilderList()
       Description the nested structure, or composition of an entity.
       
      repeated .google.cloud.documentai.v1.DocumentSchema.EntityType.Property properties = 6;