diff --git a/generated/java/dapla-kuben-resource-model/src/main/java/no/ssb/dapla/kuben/v1/PlatformManagedTeamInfoSpec.java b/generated/java/dapla-kuben-resource-model/src/main/java/no/ssb/dapla/kuben/v1/PlatformManagedTeamInfoSpec.java index 422258f..2bd72e3 100644 --- a/generated/java/dapla-kuben-resource-model/src/main/java/no/ssb/dapla/kuben/v1/PlatformManagedTeamInfoSpec.java +++ b/generated/java/dapla-kuben-resource-model/src/main/java/no/ssb/dapla/kuben/v1/PlatformManagedTeamInfoSpec.java @@ -2,11 +2,15 @@ package no.ssb.dapla.kuben.v1; import java.io.Serializable; +import java.util.HashMap; +import java.util.Map; import javax.annotation.processing.Generated; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyDescription; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonValue; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Pattern; @@ -17,7 +21,8 @@ */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ - "section_code" + "section_code", + "autonomy_level" }) @Generated("jsonschema2pojo") public class PlatformManagedTeamInfoSpec implements Serializable @@ -33,7 +38,14 @@ public class PlatformManagedTeamInfoSpec implements Serializable @Pattern(regexp = "[0-9]{3}") @NotNull private String sectionCode; - private final static long serialVersionUID = -4116034070535887052L; + /** + * The level of autonomy the team has.. This says something about the level of control and responsibility the team has over their own resources. + * + */ + @JsonProperty("autonomy_level") + @JsonPropertyDescription("The level of autonomy the team has.. This says something about the level of control and responsibility the team has over their own resources.") + private PlatformManagedTeamInfoSpec.AutonomyLevel autonomyLevel; + private final static long serialVersionUID = -1536793031518413103L; /** * No args constructor for use in serialization @@ -44,12 +56,15 @@ public PlatformManagedTeamInfoSpec() { /** * + * @param autonomyLevel + * The level of autonomy the team has.. This says something about the level of control and responsibility the team has over their own resources. * @param sectionCode * The code of the section this teams belong to. */ - public PlatformManagedTeamInfoSpec(String sectionCode) { + public PlatformManagedTeamInfoSpec(String sectionCode, PlatformManagedTeamInfoSpec.AutonomyLevel autonomyLevel) { super(); this.sectionCode = sectionCode; + this.autonomyLevel = autonomyLevel; } public static PlatformManagedTeamInfoSpec.PlatformManagedTeamInfoSpecBuilderBase builder() { @@ -76,6 +91,24 @@ public void setSectionCode(String sectionCode) { this.sectionCode = sectionCode; } + /** + * The level of autonomy the team has.. This says something about the level of control and responsibility the team has over their own resources. + * + */ + @JsonProperty("autonomy_level") + public PlatformManagedTeamInfoSpec.AutonomyLevel getAutonomyLevel() { + return autonomyLevel; + } + + /** + * The level of autonomy the team has.. This says something about the level of control and responsibility the team has over their own resources. + * + */ + @JsonProperty("autonomy_level") + public void setAutonomyLevel(PlatformManagedTeamInfoSpec.AutonomyLevel autonomyLevel) { + this.autonomyLevel = autonomyLevel; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -84,6 +117,10 @@ public String toString() { sb.append('='); sb.append(((this.sectionCode == null)?"":this.sectionCode)); sb.append(','); + sb.append("autonomyLevel"); + sb.append('='); + sb.append(((this.autonomyLevel == null)?"":this.autonomyLevel)); + sb.append(','); if (sb.charAt((sb.length()- 1)) == ',') { sb.setCharAt((sb.length()- 1), ']'); } else { @@ -96,6 +133,7 @@ public String toString() { public int hashCode() { int result = 1; result = ((result* 31)+((this.sectionCode == null)? 0 :this.sectionCode.hashCode())); + result = ((result* 31)+((this.autonomyLevel == null)? 0 :this.autonomyLevel.hashCode())); return result; } @@ -108,7 +146,53 @@ public boolean equals(Object other) { return false; } PlatformManagedTeamInfoSpec rhs = ((PlatformManagedTeamInfoSpec) other); - return ((this.sectionCode == rhs.sectionCode)||((this.sectionCode!= null)&&this.sectionCode.equals(rhs.sectionCode))); + return (((this.sectionCode == rhs.sectionCode)||((this.sectionCode!= null)&&this.sectionCode.equals(rhs.sectionCode)))&&((this.autonomyLevel == rhs.autonomyLevel)||((this.autonomyLevel!= null)&&this.autonomyLevel.equals(rhs.autonomyLevel)))); + } + + + /** + * The level of autonomy the team has.. This says something about the level of control and responsibility the team has over their own resources. + * + */ + @Generated("jsonschema2pojo") + public enum AutonomyLevel { + + MANAGED("MANAGED"), + SEMI_MANAGED("SEMI_MANAGED"), + SELF_MANAGED("SELF_MANAGED"); + private final String value; + private final static Map CONSTANTS = new HashMap(); + + static { + for (PlatformManagedTeamInfoSpec.AutonomyLevel c: values()) { + CONSTANTS.put(c.value, c); + } + } + + AutonomyLevel(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + + @JsonValue + public String value() { + return this.value; + } + + @JsonCreator + public static PlatformManagedTeamInfoSpec.AutonomyLevel fromValue(String value) { + PlatformManagedTeamInfoSpec.AutonomyLevel constant = CONSTANTS.get(value); + if (constant == null) { + throw new IllegalArgumentException(value); + } else { + return constant; + } + } + } public static class PlatformManagedTeamInfoSpecBuilder @@ -120,8 +204,8 @@ public PlatformManagedTeamInfoSpecBuilder() { super(); } - public PlatformManagedTeamInfoSpecBuilder(String sectionCode) { - super(sectionCode); + public PlatformManagedTeamInfoSpecBuilder(String sectionCode, PlatformManagedTeamInfoSpec.AutonomyLevel autonomyLevel) { + super(sectionCode, autonomyLevel); } } @@ -139,10 +223,10 @@ public PlatformManagedTeamInfoSpecBuilderBase() { } @SuppressWarnings("unchecked") - public PlatformManagedTeamInfoSpecBuilderBase(String sectionCode) { + public PlatformManagedTeamInfoSpecBuilderBase(String sectionCode, PlatformManagedTeamInfoSpec.AutonomyLevel autonomyLevel) { // Skip initialization when called from subclass if (this.getClass().equals(PlatformManagedTeamInfoSpec.PlatformManagedTeamInfoSpecBuilder.class)) { - this.instance = ((T) new PlatformManagedTeamInfoSpec(sectionCode)); + this.instance = ((T) new PlatformManagedTeamInfoSpec(sectionCode, autonomyLevel)); } } @@ -158,6 +242,11 @@ public PlatformManagedTeamInfoSpec.PlatformManagedTeamInfoSpecBuilderBase withSe return this; } + public PlatformManagedTeamInfoSpec.PlatformManagedTeamInfoSpecBuilderBase withAutonomyLevel(PlatformManagedTeamInfoSpec.AutonomyLevel autonomyLevel) { + ((PlatformManagedTeamInfoSpec) this.instance).autonomyLevel = autonomyLevel; + return this; + } + } } diff --git a/src/v1/platform-managed-team-info.schema.json b/src/v1/platform-managed-team-info.schema.json index bd243e8..32347db 100644 --- a/src/v1/platform-managed-team-info.schema.json +++ b/src/v1/platform-managed-team-info.schema.json @@ -53,6 +53,15 @@ "type": "string", "pattern": "[0-9]{3}", "description": "The code of the section this teams belong to" + }, + "autonomy_level": { + "type": "string", + "enum": [ + "MANAGED", + "SEMI_MANAGED", + "SELF_MANAGED" + ], + "description": "The level of autonomy the team has.. This says something about the level of control and responsibility the team has over their own resources." } } }