in rest/src/main/java/com/epam/eco/schemacatalog/rest/view/SchemaProfile.java [47:77]
public SchemaProfile(
@JsonProperty("subject") String subject,
@JsonProperty("version") int version,
@JsonProperty("schemaRegistryId") int schemaRegistryId,
@JsonProperty("compatibilityLevel") CompatibilityLevel compatibilityLevel,
@JsonProperty("globalCompatibilityLevel") boolean globalCompatibilityLevel,
@JsonProperty("mode") Mode mode,
@JsonProperty("versionLatest") boolean versionLatest,
@JsonProperty("schemaMetadata") FormattedMetadata schemaMetadata,
@JsonProperty("schemas") Set<SchemaEntity> schemas,
@JsonProperty("deleted") boolean deleted) {
Validate.notBlank(subject, "Subject is blank");
Validate.isTrue(version >= 0, "Version is invalid");
Validate.isTrue(schemaRegistryId >= 0, "SchemaRegistry id is invalid");
Validate.notNull(compatibilityLevel, "Compatibility level is null");
Validate.notNull(mode, "Mode is null");
if (schemas != null) {
Validate.noNullElements(schemas, "Schemas can't contain null element");
}
this.subject = subject;
this.version = version;
this.schemaRegistryId = schemaRegistryId;
this.compatibilityLevel = compatibilityLevel;
this.globalCompatibilityLevel = globalCompatibilityLevel;
this.mode = mode;
this.versionLatest = versionLatest;
this.deleted = deleted;
this.schemaMetadata = schemaMetadata;
this.schemas = schemas == null ? Collections.emptySet() : Collections.unmodifiableSet(new HashSet<>(schemas));
}