class SchemaLabel extends SchemaElement
        implements Indexable, Propertiable {

    private final Set<Id> properties;
    private final Set<Id> nullableKeys;
    private final Set<Id> indexLabels;
    private boolean enableLabelIndex;
    private long ttl;
    private Id ttlStartTime;

    public SchemaLabel(final HugeGraph graph, Id id, String name) {
        super(graph, id, name);
        this.properties = new HashSet<>();
        this.nullableKeys = new HashSet<>();
        this.indexLabels = new HashSet<>();
        this.enableLabelIndex = true;
        this.ttl = 0L;
        this.ttlStartTime = NONE_ID;
    }

    @Override
    public Set<Id> properties() {
        return Collections.unmodifiableSet(this.properties);
    }

    public void properties(Set<Id> properties) {
        this.properties.addAll(properties);
    }

    public SchemaLabel properties(Id... ids) {
        this.properties.addAll(Arrays.asList(ids));
        return this;
    }

    public void property(Id id) {
        this.properties.add(id);
    }

    public Set<Id> nullableKeys() {
        return Collections.unmodifiableSet(this.nullableKeys);
    }

    public void nullableKey(Id id) {
        this.nullableKeys.add(id);
    }

    public void nullableKeys(Id... ids) {
        this.nullableKeys.addAll(Arrays.asList(ids));
    }

    public void nullableKeys(Set<Id> nullableKeys) {
        this.nullableKeys.addAll(nullableKeys);
    }

    @Override
    public Set<Id> indexLabels() {
        return Collections.unmodifiableSet(this.indexLabels);
    }

    public void addIndexLabel(Id id) {
        this.indexLabels.add(id);
    }

    public void addIndexLabels(Id... ids) {
        this.indexLabels.addAll(Arrays.asList(ids));
    }

    public boolean existsIndexLabel() {
        return !this.indexLabels().isEmpty();
    }

    public void removeIndexLabel(Id id) {
        this.indexLabels.remove(id);
    }

    public boolean enableLabelIndex() {
        return this.enableLabelIndex;
    }

    public void enableLabelIndex(boolean enable) {
        this.enableLabelIndex = enable;
    }

    public boolean undefined() {
        return this.name() == UNDEF;
    }

    public void ttl(long ttl) {
        assert ttl >= 0L;
        this.ttl = ttl;
    }

    public long ttl() {
        assert this.ttl >= 0L;
        return this.ttl;
    }

    public void ttlStartTime(Id id) {
        this.ttlStartTime = id;
    }

    public Id ttlStartTime() {
        return this.ttlStartTime;
    }

    public String ttlStartTimeName() {
        return NONE_ID.equals(this.ttlStartTime) ? null :
               this.graph.propertyKey(this.ttlStartTime).name();
    }

    public boolean hasSameContent(SchemaLabel other) {
        return super.hasSameContent(other) && this.ttl == other.ttl &&
               this.enableLabelIndex == other.enableLabelIndex &&
               Objects.equal(this.graph.mapPkId2Name(this.properties),
                             other.graph.mapPkId2Name(other.properties)) &&
               Objects.equal(this.graph.mapPkId2Name(this.nullableKeys),
                             other.graph.mapPkId2Name(other.nullableKeys)) &&
               Objects.equal(this.graph.mapIlId2Name(this.indexLabels),
                             other.graph.mapIlId2Name(other.indexLabels)) &&
               Objects.equal(this.ttlStartTimeName(), other.ttlStartTimeName());
    }

    public static Id getLabelId(HugeGraph graph, HugeType type, Object label) {<FILL_FUNCTION_BODY>}

    public static Id getVertexLabelId(HugeGraph graph, Object label) {
        return SchemaLabel.getLabelId(graph, HugeType.VERTEX, label);
    }

    public static Id getEdgeLabelId(HugeGraph graph, Object label) {
        return SchemaLabel.getLabelId(graph, HugeType.EDGE, label);
    }
}

        E.checkNotNull(graph, "graph");
        E.checkNotNull(type, "type");
        E.checkNotNull(label, "label");
        if (label instanceof Number) {
            return IdGenerator.of(((Number) label).longValue());
        } else if (label instanceof String) {
            if (type.isVertex()) {
                return graph.vertexLabel((String) label).id();
            } else if (type.isEdge()) {
                return graph.edgeLabel((String) label).id();
            } else {
                throw new HugeException(
                        "Not support query from '%s' with label '%s'",
                        type, label);
            }
        } else {
            throw new HugeException(
                    "The label type must be number or string, but got '%s'",
                    label.getClass());
        }
    
<methods>public void <init>(org.apache.hugegraph.HugeGraph, org.apache.hugegraph.backend.id.Id, java.lang.String) ,public org.apache.hugegraph.schema.SchemaElement copy() ,public boolean equals(java.lang.Object) ,public org.apache.hugegraph.HugeGraph graph() ,public boolean hasSameContent(org.apache.hugegraph.schema.SchemaElement) ,public int hashCode() ,public boolean hidden() ,public org.apache.hugegraph.backend.id.Id id() ,public long longId() ,public java.lang.String name() ,public boolean primitive() ,public void removeUserdata(java.lang.String) ,public void removeUserdata(org.apache.hugegraph.schema.Userdata) ,public static int schemaId(org.apache.hugegraph.backend.id.Id) ,public org.apache.hugegraph.type.define.SchemaStatus status() ,public void status(org.apache.hugegraph.type.define.SchemaStatus) ,public boolean system() ,public java.lang.String toString() ,public Map<java.lang.String,java.lang.Object> userdata() ,public void userdata(java.lang.String, java.lang.Object) ,public void userdata(org.apache.hugegraph.schema.Userdata) <variables>protected static final int ELN_IL_ID,protected static final int EL_IL_ID,protected static final int ILN_IL_ID,public static final int MAX_PRIMITIVE_SYS_ID,public static final int NEXT_PRIMITIVE_SYS_ID,public static final org.apache.hugegraph.backend.id.Id NONE_ID,protected static final int OLAP_VL_ID,protected static final int PKN_IL_ID,public static final java.lang.String UNDEF,protected static final int VLN_IL_ID,protected static final int VL_IL_ID,protected final non-sealed org.apache.hugegraph.HugeGraph graph,private final non-sealed org.apache.hugegraph.backend.id.Id id,private final non-sealed java.lang.String name,private org.apache.hugegraph.type.define.SchemaStatus status,private final non-sealed org.apache.hugegraph.schema.Userdata userdata