Class Schema

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

    public final class Schema
    extends com.google.protobuf.GeneratedMessageV3
    implements SchemaOrBuilder
     Message to represent schema information.
     NextID: 14
     
    Protobuf type tensorflow.metadata.v0.Schema
    See Also:
    Serialized Form
    • Field Detail

      • SPARSE_FEATURE_FIELD_NUMBER

        public static final int SPARSE_FEATURE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • WEIGHTED_FEATURE_FIELD_NUMBER

        public static final int WEIGHTED_FEATURE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • STRING_DOMAIN_FIELD_NUMBER

        public static final int STRING_DOMAIN_FIELD_NUMBER
        See Also:
        Constant Field Values
      • FLOAT_DOMAIN_FIELD_NUMBER

        public static final int FLOAT_DOMAIN_FIELD_NUMBER
        See Also:
        Constant Field Values
      • INT_DOMAIN_FIELD_NUMBER

        public static final int INT_DOMAIN_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DEFAULT_ENVIRONMENT_FIELD_NUMBER

        public static final int DEFAULT_ENVIRONMENT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ANNOTATION_FIELD_NUMBER

        public static final int ANNOTATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DATASET_CONSTRAINTS_FIELD_NUMBER

        public static final int DATASET_CONSTRAINTS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TENSOR_REPRESENTATION_GROUP_FIELD_NUMBER

        public static final int TENSOR_REPRESENTATION_GROUP_FIELD_NUMBER
        See Also:
        Constant Field Values
      • PARSER

        @Deprecated
        public static final com.google.protobuf.Parser<Schema> PARSER
        Deprecated.
    • 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()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getFeatureList

        public List<Feature> getFeatureList()
         Features described in this schema.
         
        repeated .tensorflow.metadata.v0.Feature feature = 1;
        Specified by:
        getFeatureList in interface SchemaOrBuilder
      • getFeatureCount

        public int getFeatureCount()
         Features described in this schema.
         
        repeated .tensorflow.metadata.v0.Feature feature = 1;
        Specified by:
        getFeatureCount in interface SchemaOrBuilder
      • getFeature

        public Feature getFeature​(int index)
         Features described in this schema.
         
        repeated .tensorflow.metadata.v0.Feature feature = 1;
        Specified by:
        getFeature in interface SchemaOrBuilder
      • getSparseFeatureCount

        public int getSparseFeatureCount()
         Sparse features described in this schema.
         
        repeated .tensorflow.metadata.v0.SparseFeature sparse_feature = 6;
        Specified by:
        getSparseFeatureCount in interface SchemaOrBuilder
      • getSparseFeature

        public SparseFeature getSparseFeature​(int index)
         Sparse features described in this schema.
         
        repeated .tensorflow.metadata.v0.SparseFeature sparse_feature = 6;
        Specified by:
        getSparseFeature in interface SchemaOrBuilder
      • getWeightedFeatureCount

        public int getWeightedFeatureCount()
         Weighted features described in this schema.
         
        repeated .tensorflow.metadata.v0.WeightedFeature weighted_feature = 12;
        Specified by:
        getWeightedFeatureCount in interface SchemaOrBuilder
      • getWeightedFeature

        public WeightedFeature getWeightedFeature​(int index)
         Weighted features described in this schema.
         
        repeated .tensorflow.metadata.v0.WeightedFeature weighted_feature = 12;
        Specified by:
        getWeightedFeature in interface SchemaOrBuilder
      • getStringDomainList

        public List<StringDomain> getStringDomainList()
         declared as top-level features in <feature>.
         String domains referenced in the features.
         
        repeated .tensorflow.metadata.v0.StringDomain string_domain = 4;
        Specified by:
        getStringDomainList in interface SchemaOrBuilder
      • getStringDomainCount

        public int getStringDomainCount()
         declared as top-level features in <feature>.
         String domains referenced in the features.
         
        repeated .tensorflow.metadata.v0.StringDomain string_domain = 4;
        Specified by:
        getStringDomainCount in interface SchemaOrBuilder
      • getStringDomain

        public StringDomain getStringDomain​(int index)
         declared as top-level features in <feature>.
         String domains referenced in the features.
         
        repeated .tensorflow.metadata.v0.StringDomain string_domain = 4;
        Specified by:
        getStringDomain in interface SchemaOrBuilder
      • getStringDomainOrBuilder

        public StringDomainOrBuilder getStringDomainOrBuilder​(int index)
         declared as top-level features in <feature>.
         String domains referenced in the features.
         
        repeated .tensorflow.metadata.v0.StringDomain string_domain = 4;
        Specified by:
        getStringDomainOrBuilder in interface SchemaOrBuilder
      • getFloatDomainList

        public List<FloatDomain> getFloatDomainList()
         top level float domains that can be reused by features
         
        repeated .tensorflow.metadata.v0.FloatDomain float_domain = 9;
        Specified by:
        getFloatDomainList in interface SchemaOrBuilder
      • getFloatDomainCount

        public int getFloatDomainCount()
         top level float domains that can be reused by features
         
        repeated .tensorflow.metadata.v0.FloatDomain float_domain = 9;
        Specified by:
        getFloatDomainCount in interface SchemaOrBuilder
      • getFloatDomain

        public FloatDomain getFloatDomain​(int index)
         top level float domains that can be reused by features
         
        repeated .tensorflow.metadata.v0.FloatDomain float_domain = 9;
        Specified by:
        getFloatDomain in interface SchemaOrBuilder
      • getIntDomainList

        public List<IntDomain> getIntDomainList()
         top level int domains that can be reused by features
         
        repeated .tensorflow.metadata.v0.IntDomain int_domain = 10;
        Specified by:
        getIntDomainList in interface SchemaOrBuilder
      • getIntDomainCount

        public int getIntDomainCount()
         top level int domains that can be reused by features
         
        repeated .tensorflow.metadata.v0.IntDomain int_domain = 10;
        Specified by:
        getIntDomainCount in interface SchemaOrBuilder
      • getIntDomain

        public IntDomain getIntDomain​(int index)
         top level int domains that can be reused by features
         
        repeated .tensorflow.metadata.v0.IntDomain int_domain = 10;
        Specified by:
        getIntDomain in interface SchemaOrBuilder
      • getDefaultEnvironmentList

        public com.google.protobuf.ProtocolStringList getDefaultEnvironmentList()
         Default environments for each feature.
         An environment represents both a type of location (e.g. a server or phone)
         and a time (e.g. right before model X is run). In the standard scenario,
         99% of the features should be in the default environments TRAINING,
         SERVING, and the LABEL (or labels) AND WEIGHT is only available at TRAINING
         (not at serving).
         Other possible variations:
         1. There may be TRAINING_MOBILE, SERVING_MOBILE, TRAINING_SERVICE,
            and SERVING_SERVICE.
         2. If one is ensembling three models, where the predictions of the first
            three models are available for the ensemble model, there may be
            TRAINING, SERVING_INITIAL, SERVING_ENSEMBLE.
         See FeatureProto::not_in_environment and FeatureProto::in_environment.
         
        repeated string default_environment = 5;
        Specified by:
        getDefaultEnvironmentList in interface SchemaOrBuilder
        Returns:
        A list containing the defaultEnvironment.
      • getDefaultEnvironmentCount

        public int getDefaultEnvironmentCount()
         Default environments for each feature.
         An environment represents both a type of location (e.g. a server or phone)
         and a time (e.g. right before model X is run). In the standard scenario,
         99% of the features should be in the default environments TRAINING,
         SERVING, and the LABEL (or labels) AND WEIGHT is only available at TRAINING
         (not at serving).
         Other possible variations:
         1. There may be TRAINING_MOBILE, SERVING_MOBILE, TRAINING_SERVICE,
            and SERVING_SERVICE.
         2. If one is ensembling three models, where the predictions of the first
            three models are available for the ensemble model, there may be
            TRAINING, SERVING_INITIAL, SERVING_ENSEMBLE.
         See FeatureProto::not_in_environment and FeatureProto::in_environment.
         
        repeated string default_environment = 5;
        Specified by:
        getDefaultEnvironmentCount in interface SchemaOrBuilder
        Returns:
        The count of defaultEnvironment.
      • getDefaultEnvironment

        public String getDefaultEnvironment​(int index)
         Default environments for each feature.
         An environment represents both a type of location (e.g. a server or phone)
         and a time (e.g. right before model X is run). In the standard scenario,
         99% of the features should be in the default environments TRAINING,
         SERVING, and the LABEL (or labels) AND WEIGHT is only available at TRAINING
         (not at serving).
         Other possible variations:
         1. There may be TRAINING_MOBILE, SERVING_MOBILE, TRAINING_SERVICE,
            and SERVING_SERVICE.
         2. If one is ensembling three models, where the predictions of the first
            three models are available for the ensemble model, there may be
            TRAINING, SERVING_INITIAL, SERVING_ENSEMBLE.
         See FeatureProto::not_in_environment and FeatureProto::in_environment.
         
        repeated string default_environment = 5;
        Specified by:
        getDefaultEnvironment in interface SchemaOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The defaultEnvironment at the given index.
      • getDefaultEnvironmentBytes

        public com.google.protobuf.ByteString getDefaultEnvironmentBytes​(int index)
         Default environments for each feature.
         An environment represents both a type of location (e.g. a server or phone)
         and a time (e.g. right before model X is run). In the standard scenario,
         99% of the features should be in the default environments TRAINING,
         SERVING, and the LABEL (or labels) AND WEIGHT is only available at TRAINING
         (not at serving).
         Other possible variations:
         1. There may be TRAINING_MOBILE, SERVING_MOBILE, TRAINING_SERVICE,
            and SERVING_SERVICE.
         2. If one is ensembling three models, where the predictions of the first
            three models are available for the ensemble model, there may be
            TRAINING, SERVING_INITIAL, SERVING_ENSEMBLE.
         See FeatureProto::not_in_environment and FeatureProto::in_environment.
         
        repeated string default_environment = 5;
        Specified by:
        getDefaultEnvironmentBytes in interface SchemaOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the defaultEnvironment at the given index.
      • hasAnnotation

        public boolean hasAnnotation()
         Additional information about the schema as a whole. Features may also
         be annotated individually.
         
        optional .tensorflow.metadata.v0.Annotation annotation = 8;
        Specified by:
        hasAnnotation in interface SchemaOrBuilder
        Returns:
        Whether the annotation field is set.
      • getAnnotation

        public Annotation getAnnotation()
         Additional information about the schema as a whole. Features may also
         be annotated individually.
         
        optional .tensorflow.metadata.v0.Annotation annotation = 8;
        Specified by:
        getAnnotation in interface SchemaOrBuilder
        Returns:
        The annotation.
      • getAnnotationOrBuilder

        public AnnotationOrBuilder getAnnotationOrBuilder()
         Additional information about the schema as a whole. Features may also
         be annotated individually.
         
        optional .tensorflow.metadata.v0.Annotation annotation = 8;
        Specified by:
        getAnnotationOrBuilder in interface SchemaOrBuilder
      • hasDatasetConstraints

        public boolean hasDatasetConstraints()
         Dataset-level constraints. This is currently used for specifying
         information about changes in num_examples.
         
        optional .tensorflow.metadata.v0.DatasetConstraints dataset_constraints = 11;
        Specified by:
        hasDatasetConstraints in interface SchemaOrBuilder
        Returns:
        Whether the datasetConstraints field is set.
      • getDatasetConstraints

        public DatasetConstraints getDatasetConstraints()
         Dataset-level constraints. This is currently used for specifying
         information about changes in num_examples.
         
        optional .tensorflow.metadata.v0.DatasetConstraints dataset_constraints = 11;
        Specified by:
        getDatasetConstraints in interface SchemaOrBuilder
        Returns:
        The datasetConstraints.
      • getDatasetConstraintsOrBuilder

        public DatasetConstraintsOrBuilder getDatasetConstraintsOrBuilder()
         Dataset-level constraints. This is currently used for specifying
         information about changes in num_examples.
         
        optional .tensorflow.metadata.v0.DatasetConstraints dataset_constraints = 11;
        Specified by:
        getDatasetConstraintsOrBuilder in interface SchemaOrBuilder
      • getTensorRepresentationGroupCount

        public int getTensorRepresentationGroupCount()
        Description copied from interface: SchemaOrBuilder
         TensorRepresentation groups. The keys are the names of the groups.
         Key "" (empty string) denotes the "default" group, which is what should
         be used when a group name is not provided.
         See the documentation at TensorRepresentationGroup for more info.
         Under development. DO NOT USE.
         
        map<string, .tensorflow.metadata.v0.TensorRepresentationGroup> tensor_representation_group = 13;
        Specified by:
        getTensorRepresentationGroupCount in interface SchemaOrBuilder
      • containsTensorRepresentationGroup

        public boolean containsTensorRepresentationGroup​(String key)
         TensorRepresentation groups. The keys are the names of the groups.
         Key "" (empty string) denotes the "default" group, which is what should
         be used when a group name is not provided.
         See the documentation at TensorRepresentationGroup for more info.
         Under development. DO NOT USE.
         
        map<string, .tensorflow.metadata.v0.TensorRepresentationGroup> tensor_representation_group = 13;
        Specified by:
        containsTensorRepresentationGroup in interface SchemaOrBuilder
      • getTensorRepresentationGroupMap

        public Map<String,​TensorRepresentationGroup> getTensorRepresentationGroupMap()
         TensorRepresentation groups. The keys are the names of the groups.
         Key "" (empty string) denotes the "default" group, which is what should
         be used when a group name is not provided.
         See the documentation at TensorRepresentationGroup for more info.
         Under development. DO NOT USE.
         
        map<string, .tensorflow.metadata.v0.TensorRepresentationGroup> tensor_representation_group = 13;
        Specified by:
        getTensorRepresentationGroupMap in interface SchemaOrBuilder
      • getTensorRepresentationGroupOrDefault

        public TensorRepresentationGroup getTensorRepresentationGroupOrDefault​(String key,
                                                                               TensorRepresentationGroup defaultValue)
         TensorRepresentation groups. The keys are the names of the groups.
         Key "" (empty string) denotes the "default" group, which is what should
         be used when a group name is not provided.
         See the documentation at TensorRepresentationGroup for more info.
         Under development. DO NOT USE.
         
        map<string, .tensorflow.metadata.v0.TensorRepresentationGroup> tensor_representation_group = 13;
        Specified by:
        getTensorRepresentationGroupOrDefault in interface SchemaOrBuilder
      • getTensorRepresentationGroupOrThrow

        public TensorRepresentationGroup getTensorRepresentationGroupOrThrow​(String key)
         TensorRepresentation groups. The keys are the names of the groups.
         Key "" (empty string) denotes the "default" group, which is what should
         be used when a group name is not provided.
         See the documentation at TensorRepresentationGroup for more info.
         Under development. DO NOT USE.
         
        map<string, .tensorflow.metadata.v0.TensorRepresentationGroup> tensor_representation_group = 13;
        Specified by:
        getTensorRepresentationGroupOrThrow in interface SchemaOrBuilder
      • 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 Schema parseFrom​(ByteBuffer data)
                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

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

        public static Schema getDefaultInstance()
      • parser

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

        public com.google.protobuf.Parser<Schema> 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 Schema getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder