Class 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.GeneratedMessageV3.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.v1beta3.DocumentSchema.EntityType
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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
      • setRepeatedField

        public DocumentSchema.EntityType.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                                  int index,
                                                                  Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DocumentSchema.EntityType.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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
      • 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.v1beta3.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.v1beta3.DocumentSchema.EntityType.EnumValues enum_values = 14;
        Specified by:
        getEnumValues in interface DocumentSchema.EntityTypeOrBuilder
        Returns:
        The enumValues.
      • setEnumValues

        public DocumentSchema.EntityType.Builder setEnumValues​(DocumentSchema.EntityType.EnumValues value)
         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.v1beta3.DocumentSchema.EntityType.EnumValues enum_values = 14;
      • setEnumValues

        public DocumentSchema.EntityType.Builder setEnumValues​(DocumentSchema.EntityType.EnumValues.Builder builderForValue)
         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.v1beta3.DocumentSchema.EntityType.EnumValues enum_values = 14;
      • mergeEnumValues

        public DocumentSchema.EntityType.Builder mergeEnumValues​(DocumentSchema.EntityType.EnumValues value)
         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.v1beta3.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.v1beta3.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.v1beta3.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.v1beta3.DocumentSchema.EntityType.EnumValues enum_values = 14;
        Specified by:
        getEnumValuesOrBuilder in interface DocumentSchema.EntityTypeOrBuilder
      • 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

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

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

        public DocumentSchema.EntityType.Builder clearProperties()
         Description the nested structure, or composition of an entity.
         
        repeated .google.cloud.documentai.v1beta3.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.v1beta3.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.v1beta3.DocumentSchema.EntityType.Property properties = 6;
      • addPropertiesBuilder

        public DocumentSchema.EntityType.Property.Builder addPropertiesBuilder()
         Description the nested structure, or composition of an entity.
         
        repeated .google.cloud.documentai.v1beta3.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.v1beta3.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.v1beta3.DocumentSchema.EntityType.Property properties = 6;
      • hasEntityTypeMetadata

        public boolean hasEntityTypeMetadata()
         Metadata for the entity type.
         
        .google.cloud.documentai.v1beta3.EntityTypeMetadata entity_type_metadata = 11;
        Specified by:
        hasEntityTypeMetadata in interface DocumentSchema.EntityTypeOrBuilder
        Returns:
        Whether the entityTypeMetadata field is set.
      • clearEntityTypeMetadata

        public DocumentSchema.EntityType.Builder clearEntityTypeMetadata()
         Metadata for the entity type.
         
        .google.cloud.documentai.v1beta3.EntityTypeMetadata entity_type_metadata = 11;
      • getEntityTypeMetadataBuilder

        public EntityTypeMetadata.Builder getEntityTypeMetadataBuilder()
         Metadata for the entity type.
         
        .google.cloud.documentai.v1beta3.EntityTypeMetadata entity_type_metadata = 11;
      • setUnknownFields

        public final DocumentSchema.EntityType.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DocumentSchema.EntityType.Builder>
      • mergeUnknownFields

        public final DocumentSchema.EntityType.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DocumentSchema.EntityType.Builder>