Class Feature

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable, FeatureOrBuilder

    public final class Feature
    extends com.google.protobuf.GeneratedMessageV3
    implements FeatureOrBuilder
     Describes schema-level information about a specific feature.
     NextID: 31
     
    Protobuf type tensorflow.metadata.v0.Feature
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • 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
      • hasName

        public boolean hasName()
         The name of the feature.
         
        optional string name = 1;
        Specified by:
        hasName in interface FeatureOrBuilder
        Returns:
        Whether the name field is set.
      • getName

        public String getName()
         The name of the feature.
         
        optional string name = 1;
        Specified by:
        getName in interface FeatureOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The name of the feature.
         
        optional string name = 1;
        Specified by:
        getNameBytes in interface FeatureOrBuilder
        Returns:
        The bytes for name.
      • hasDeprecated

        @Deprecated
        public boolean hasDeprecated()
        Deprecated.
         This field is no longer supported. Instead, use:
         lifecycle_stage: DEPRECATED
         TODO(b/111450258): remove this.
         
        optional bool deprecated = 2 [deprecated = true];
        Specified by:
        hasDeprecated in interface FeatureOrBuilder
        Returns:
        Whether the deprecated field is set.
      • getDeprecated

        @Deprecated
        public boolean getDeprecated()
        Deprecated.
         This field is no longer supported. Instead, use:
         lifecycle_stage: DEPRECATED
         TODO(b/111450258): remove this.
         
        optional bool deprecated = 2 [deprecated = true];
        Specified by:
        getDeprecated in interface FeatureOrBuilder
        Returns:
        The deprecated.
      • hasPresence

        public boolean hasPresence()
         Constraints on the presence of this feature in the examples.
         
        optional .tensorflow.metadata.v0.FeaturePresence presence = 14;
        Specified by:
        hasPresence in interface FeatureOrBuilder
        Returns:
        Whether the presence field is set.
      • getPresence

        public FeaturePresence getPresence()
         Constraints on the presence of this feature in the examples.
         
        optional .tensorflow.metadata.v0.FeaturePresence presence = 14;
        Specified by:
        getPresence in interface FeatureOrBuilder
        Returns:
        The presence.
      • hasGroupPresence

        public boolean hasGroupPresence()
         Only used in the context of a "group" context, e.g., inside a sequence.
         
        optional .tensorflow.metadata.v0.FeaturePresenceWithinGroup group_presence = 17;
        Specified by:
        hasGroupPresence in interface FeatureOrBuilder
        Returns:
        Whether the groupPresence field is set.
      • getGroupPresence

        public FeaturePresenceWithinGroup getGroupPresence()
         Only used in the context of a "group" context, e.g., inside a sequence.
         
        optional .tensorflow.metadata.v0.FeaturePresenceWithinGroup group_presence = 17;
        Specified by:
        getGroupPresence in interface FeatureOrBuilder
        Returns:
        The groupPresence.
      • hasShape

        public boolean hasShape()
         The feature has a fixed shape corresponding to a multi-dimensional
         tensor.
         
        optional .tensorflow.metadata.v0.FixedShape shape = 23;
        Specified by:
        hasShape in interface FeatureOrBuilder
        Returns:
        Whether the shape field is set.
      • getShape

        public FixedShape getShape()
         The feature has a fixed shape corresponding to a multi-dimensional
         tensor.
         
        optional .tensorflow.metadata.v0.FixedShape shape = 23;
        Specified by:
        getShape in interface FeatureOrBuilder
        Returns:
        The shape.
      • getShapeOrBuilder

        public FixedShapeOrBuilder getShapeOrBuilder()
         The feature has a fixed shape corresponding to a multi-dimensional
         tensor.
         
        optional .tensorflow.metadata.v0.FixedShape shape = 23;
        Specified by:
        getShapeOrBuilder in interface FeatureOrBuilder
      • hasValueCount

        public boolean hasValueCount()
         The feature doesn't have a well defined shape. All we know are limits on
         the minimum and maximum number of values.
         
        optional .tensorflow.metadata.v0.ValueCount value_count = 5;
        Specified by:
        hasValueCount in interface FeatureOrBuilder
        Returns:
        Whether the valueCount field is set.
      • getValueCount

        public ValueCount getValueCount()
         The feature doesn't have a well defined shape. All we know are limits on
         the minimum and maximum number of values.
         
        optional .tensorflow.metadata.v0.ValueCount value_count = 5;
        Specified by:
        getValueCount in interface FeatureOrBuilder
        Returns:
        The valueCount.
      • getValueCountOrBuilder

        public ValueCountOrBuilder getValueCountOrBuilder()
         The feature doesn't have a well defined shape. All we know are limits on
         the minimum and maximum number of values.
         
        optional .tensorflow.metadata.v0.ValueCount value_count = 5;
        Specified by:
        getValueCountOrBuilder in interface FeatureOrBuilder
      • hasType

        public boolean hasType()
         Physical type of the feature's values.
         Note that you can have:
         type: BYTES
         int_domain: {
           min: 0
           max: 3
         }
         This would be a field that is syntactically BYTES (i.e. strings), but
         semantically an int, i.e. it would be "0", "1", "2", or "3".
         
        optional .tensorflow.metadata.v0.FeatureType type = 6;
        Specified by:
        hasType in interface FeatureOrBuilder
        Returns:
        Whether the type field is set.
      • getType

        public FeatureType getType()
         Physical type of the feature's values.
         Note that you can have:
         type: BYTES
         int_domain: {
           min: 0
           max: 3
         }
         This would be a field that is syntactically BYTES (i.e. strings), but
         semantically an int, i.e. it would be "0", "1", "2", or "3".
         
        optional .tensorflow.metadata.v0.FeatureType type = 6;
        Specified by:
        getType in interface FeatureOrBuilder
        Returns:
        The type.
      • hasDomain

        public boolean hasDomain()
         Reference to a domain defined at the schema level.
         
        optional string domain = 7;
        Specified by:
        hasDomain in interface FeatureOrBuilder
        Returns:
        Whether the domain field is set.
      • getDomain

        public String getDomain()
         Reference to a domain defined at the schema level.
         
        optional string domain = 7;
        Specified by:
        getDomain in interface FeatureOrBuilder
        Returns:
        The domain.
      • getDomainBytes

        public com.google.protobuf.ByteString getDomainBytes()
         Reference to a domain defined at the schema level.
         
        optional string domain = 7;
        Specified by:
        getDomainBytes in interface FeatureOrBuilder
        Returns:
        The bytes for domain.
      • hasIntDomain

        public boolean hasIntDomain()
         Inline definitions of domains.
         
        optional .tensorflow.metadata.v0.IntDomain int_domain = 9;
        Specified by:
        hasIntDomain in interface FeatureOrBuilder
        Returns:
        Whether the intDomain field is set.
      • getIntDomain

        public IntDomain getIntDomain()
         Inline definitions of domains.
         
        optional .tensorflow.metadata.v0.IntDomain int_domain = 9;
        Specified by:
        getIntDomain in interface FeatureOrBuilder
        Returns:
        The intDomain.
      • hasFloatDomain

        public boolean hasFloatDomain()
        optional .tensorflow.metadata.v0.FloatDomain float_domain = 10;
        Specified by:
        hasFloatDomain in interface FeatureOrBuilder
        Returns:
        Whether the floatDomain field is set.
      • getFloatDomain

        public FloatDomain getFloatDomain()
        optional .tensorflow.metadata.v0.FloatDomain float_domain = 10;
        Specified by:
        getFloatDomain in interface FeatureOrBuilder
        Returns:
        The floatDomain.
      • hasStringDomain

        public boolean hasStringDomain()
        optional .tensorflow.metadata.v0.StringDomain string_domain = 11;
        Specified by:
        hasStringDomain in interface FeatureOrBuilder
        Returns:
        Whether the stringDomain field is set.
      • hasBoolDomain

        public boolean hasBoolDomain()
        optional .tensorflow.metadata.v0.BoolDomain bool_domain = 13;
        Specified by:
        hasBoolDomain in interface FeatureOrBuilder
        Returns:
        Whether the boolDomain field is set.
      • getBoolDomain

        public BoolDomain getBoolDomain()
        optional .tensorflow.metadata.v0.BoolDomain bool_domain = 13;
        Specified by:
        getBoolDomain in interface FeatureOrBuilder
        Returns:
        The boolDomain.
      • hasStructDomain

        public boolean hasStructDomain()
        optional .tensorflow.metadata.v0.StructDomain struct_domain = 29;
        Specified by:
        hasStructDomain in interface FeatureOrBuilder
        Returns:
        Whether the structDomain field is set.
      • hasNaturalLanguageDomain

        public boolean hasNaturalLanguageDomain()
         Supported semantic domains.
         
        optional .tensorflow.metadata.v0.NaturalLanguageDomain natural_language_domain = 24;
        Specified by:
        hasNaturalLanguageDomain in interface FeatureOrBuilder
        Returns:
        Whether the naturalLanguageDomain field is set.
      • hasImageDomain

        public boolean hasImageDomain()
        optional .tensorflow.metadata.v0.ImageDomain image_domain = 25;
        Specified by:
        hasImageDomain in interface FeatureOrBuilder
        Returns:
        Whether the imageDomain field is set.
      • getImageDomain

        public ImageDomain getImageDomain()
        optional .tensorflow.metadata.v0.ImageDomain image_domain = 25;
        Specified by:
        getImageDomain in interface FeatureOrBuilder
        Returns:
        The imageDomain.
      • hasMidDomain

        public boolean hasMidDomain()
        optional .tensorflow.metadata.v0.MIDDomain mid_domain = 26;
        Specified by:
        hasMidDomain in interface FeatureOrBuilder
        Returns:
        Whether the midDomain field is set.
      • getMidDomain

        public MIDDomain getMidDomain()
        optional .tensorflow.metadata.v0.MIDDomain mid_domain = 26;
        Specified by:
        getMidDomain in interface FeatureOrBuilder
        Returns:
        The midDomain.
      • hasUrlDomain

        public boolean hasUrlDomain()
        optional .tensorflow.metadata.v0.URLDomain url_domain = 27;
        Specified by:
        hasUrlDomain in interface FeatureOrBuilder
        Returns:
        Whether the urlDomain field is set.
      • getUrlDomain

        public URLDomain getUrlDomain()
        optional .tensorflow.metadata.v0.URLDomain url_domain = 27;
        Specified by:
        getUrlDomain in interface FeatureOrBuilder
        Returns:
        The urlDomain.
      • hasTimeDomain

        public boolean hasTimeDomain()
        optional .tensorflow.metadata.v0.TimeDomain time_domain = 28;
        Specified by:
        hasTimeDomain in interface FeatureOrBuilder
        Returns:
        Whether the timeDomain field is set.
      • getTimeDomain

        public TimeDomain getTimeDomain()
        optional .tensorflow.metadata.v0.TimeDomain time_domain = 28;
        Specified by:
        getTimeDomain in interface FeatureOrBuilder
        Returns:
        The timeDomain.
      • hasTimeOfDayDomain

        public boolean hasTimeOfDayDomain()
        optional .tensorflow.metadata.v0.TimeOfDayDomain time_of_day_domain = 30;
        Specified by:
        hasTimeOfDayDomain in interface FeatureOrBuilder
        Returns:
        Whether the timeOfDayDomain field is set.
      • hasDistributionConstraints

        public boolean hasDistributionConstraints()
         Constraints on the distribution of the feature values.
         Currently only supported for StringDomains.
         TODO(b/69473628): Extend functionality to other domain types.
         
        optional .tensorflow.metadata.v0.DistributionConstraints distribution_constraints = 15;
        Specified by:
        hasDistributionConstraints in interface FeatureOrBuilder
        Returns:
        Whether the distributionConstraints field is set.
      • getDistributionConstraints

        public DistributionConstraints getDistributionConstraints()
         Constraints on the distribution of the feature values.
         Currently only supported for StringDomains.
         TODO(b/69473628): Extend functionality to other domain types.
         
        optional .tensorflow.metadata.v0.DistributionConstraints distribution_constraints = 15;
        Specified by:
        getDistributionConstraints in interface FeatureOrBuilder
        Returns:
        The distributionConstraints.
      • getDistributionConstraintsOrBuilder

        public DistributionConstraintsOrBuilder getDistributionConstraintsOrBuilder()
         Constraints on the distribution of the feature values.
         Currently only supported for StringDomains.
         TODO(b/69473628): Extend functionality to other domain types.
         
        optional .tensorflow.metadata.v0.DistributionConstraints distribution_constraints = 15;
        Specified by:
        getDistributionConstraintsOrBuilder in interface FeatureOrBuilder
      • hasAnnotation

        public boolean hasAnnotation()
         Additional information about the feature for documentation purpose.
         
        optional .tensorflow.metadata.v0.Annotation annotation = 16;
        Specified by:
        hasAnnotation in interface FeatureOrBuilder
        Returns:
        Whether the annotation field is set.
      • getAnnotation

        public Annotation getAnnotation()
         Additional information about the feature for documentation purpose.
         
        optional .tensorflow.metadata.v0.Annotation annotation = 16;
        Specified by:
        getAnnotation in interface FeatureOrBuilder
        Returns:
        The annotation.
      • hasSkewComparator

        public boolean hasSkewComparator()
         Tests comparing the distribution to the associated serving data.
         
        optional .tensorflow.metadata.v0.FeatureComparator skew_comparator = 18;
        Specified by:
        hasSkewComparator in interface FeatureOrBuilder
        Returns:
        Whether the skewComparator field is set.
      • getSkewComparator

        public FeatureComparator getSkewComparator()
         Tests comparing the distribution to the associated serving data.
         
        optional .tensorflow.metadata.v0.FeatureComparator skew_comparator = 18;
        Specified by:
        getSkewComparator in interface FeatureOrBuilder
        Returns:
        The skewComparator.
      • hasDriftComparator

        public boolean hasDriftComparator()
         Tests comparing the distribution between two consecutive spans (e.g. days).
         
        optional .tensorflow.metadata.v0.FeatureComparator drift_comparator = 21;
        Specified by:
        hasDriftComparator in interface FeatureOrBuilder
        Returns:
        Whether the driftComparator field is set.
      • getDriftComparator

        public FeatureComparator getDriftComparator()
         Tests comparing the distribution between two consecutive spans (e.g. days).
         
        optional .tensorflow.metadata.v0.FeatureComparator drift_comparator = 21;
        Specified by:
        getDriftComparator in interface FeatureOrBuilder
        Returns:
        The driftComparator.
      • getInEnvironmentList

        public com.google.protobuf.ProtocolStringList getInEnvironmentList()
         List of environments this feature is present in.
         Should be disjoint from not_in_environment.
         This feature is in environment "foo" if:
         ("foo" is in in_environment or default_environments) AND
         "foo" is not in not_in_environment.
         See Schema::default_environments.
         
        repeated string in_environment = 20;
        Specified by:
        getInEnvironmentList in interface FeatureOrBuilder
        Returns:
        A list containing the inEnvironment.
      • getInEnvironmentCount

        public int getInEnvironmentCount()
         List of environments this feature is present in.
         Should be disjoint from not_in_environment.
         This feature is in environment "foo" if:
         ("foo" is in in_environment or default_environments) AND
         "foo" is not in not_in_environment.
         See Schema::default_environments.
         
        repeated string in_environment = 20;
        Specified by:
        getInEnvironmentCount in interface FeatureOrBuilder
        Returns:
        The count of inEnvironment.
      • getInEnvironment

        public String getInEnvironment​(int index)
         List of environments this feature is present in.
         Should be disjoint from not_in_environment.
         This feature is in environment "foo" if:
         ("foo" is in in_environment or default_environments) AND
         "foo" is not in not_in_environment.
         See Schema::default_environments.
         
        repeated string in_environment = 20;
        Specified by:
        getInEnvironment in interface FeatureOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The inEnvironment at the given index.
      • getInEnvironmentBytes

        public com.google.protobuf.ByteString getInEnvironmentBytes​(int index)
         List of environments this feature is present in.
         Should be disjoint from not_in_environment.
         This feature is in environment "foo" if:
         ("foo" is in in_environment or default_environments) AND
         "foo" is not in not_in_environment.
         See Schema::default_environments.
         
        repeated string in_environment = 20;
        Specified by:
        getInEnvironmentBytes in interface FeatureOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the inEnvironment at the given index.
      • getNotInEnvironmentList

        public com.google.protobuf.ProtocolStringList getNotInEnvironmentList()
         List of environments this feature is not present in.
         Should be disjoint from of in_environment.
         See Schema::default_environments and in_environment.
         
        repeated string not_in_environment = 19;
        Specified by:
        getNotInEnvironmentList in interface FeatureOrBuilder
        Returns:
        A list containing the notInEnvironment.
      • getNotInEnvironmentCount

        public int getNotInEnvironmentCount()
         List of environments this feature is not present in.
         Should be disjoint from of in_environment.
         See Schema::default_environments and in_environment.
         
        repeated string not_in_environment = 19;
        Specified by:
        getNotInEnvironmentCount in interface FeatureOrBuilder
        Returns:
        The count of notInEnvironment.
      • getNotInEnvironment

        public String getNotInEnvironment​(int index)
         List of environments this feature is not present in.
         Should be disjoint from of in_environment.
         See Schema::default_environments and in_environment.
         
        repeated string not_in_environment = 19;
        Specified by:
        getNotInEnvironment in interface FeatureOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The notInEnvironment at the given index.
      • getNotInEnvironmentBytes

        public com.google.protobuf.ByteString getNotInEnvironmentBytes​(int index)
         List of environments this feature is not present in.
         Should be disjoint from of in_environment.
         See Schema::default_environments and in_environment.
         
        repeated string not_in_environment = 19;
        Specified by:
        getNotInEnvironmentBytes in interface FeatureOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the notInEnvironment at the given index.
      • hasLifecycleStage

        public boolean hasLifecycleStage()
         The lifecycle stage of a feature. It can also apply to its descendants.
         i.e., if a struct is DEPRECATED, its children are implicitly deprecated.
         
        optional .tensorflow.metadata.v0.LifecycleStage lifecycle_stage = 22;
        Specified by:
        hasLifecycleStage in interface FeatureOrBuilder
        Returns:
        Whether the lifecycleStage field is set.
      • getLifecycleStage

        public LifecycleStage getLifecycleStage()
         The lifecycle stage of a feature. It can also apply to its descendants.
         i.e., if a struct is DEPRECATED, its children are implicitly deprecated.
         
        optional .tensorflow.metadata.v0.LifecycleStage lifecycle_stage = 22;
        Specified by:
        getLifecycleStage in interface FeatureOrBuilder
        Returns:
        The lifecycleStage.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Feature parseFrom​(ByteBuffer data)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Feature parseFrom​(ByteBuffer data,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Feature parseFrom​(com.google.protobuf.ByteString data)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Feature parseFrom​(com.google.protobuf.ByteString data,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Feature parseFrom​(byte[] data)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Feature parseFrom​(byte[] data,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Feature parseFrom​(com.google.protobuf.CodedInputStream input,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws IOException
        Throws:
        IOException
      • newBuilderForType

        public Feature.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Feature.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Feature.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Feature getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Feature> parser()
      • getParserForType

        public com.google.protobuf.Parser<Feature> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public Feature getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder