All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ca.ibodrov.mica.api.model.Profile Maven / Gradle / Ivy

There is a newer version: 0.0.25
Show newest version
package ca.ibodrov.mica.api.model;

import ca.ibodrov.mica.schema.ObjectSchemaNode;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.OffsetDateTime;
import java.util.Optional;

public record Profile(Optional id,
        @NotEmpty String name,
        Optional createdAt,
        @NotNull ObjectSchemaNode schema) {

    public static String KIND = "MicaProfile/v1";

    public static Profile of(String name, ObjectSchemaNode schema) {
        return new Profile(Optional.empty(), name, Optional.empty(), schema);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy