Skip to content

Commit

Permalink
[GENERATE] Java classes from JSON Schema
Browse files Browse the repository at this point in the history
  • Loading branch information
dapla-bot[bot] authored and johnksv committed Aug 7, 2024
1 parent cd422a9 commit fa0f68a
Showing 1 changed file with 46 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"formats",
"location",
"repos"
})
@Generated("jsonschema2pojo")
Expand All @@ -33,6 +34,13 @@ public class ArtifactRegistry implements Serializable
@JsonPropertyDescription("Set of formats - in upper case- to create artifact registries for, as defined in https://cloud.google.com/artifact-registry/docs/supported-formats . Examples is DOCKER, PYTHON")
@Valid
private List<String> formats = new ArrayList<String>();
/**
* The location for the artifact registry repositories.
*
*/
@JsonProperty("location")
@JsonPropertyDescription("The location for the artifact registry repositories.")
private String location;
/**
* A list of github repositories under Statistics Norway-organisation that is allowed to push to Artifact Registry repositories of the team.
*
Expand All @@ -44,7 +52,7 @@ public class ArtifactRegistry implements Serializable
@JsonIgnore
@Valid
private Map<String, Object> additionalProperties = new LinkedHashMap<String, Object>();
private final static long serialVersionUID = -2223012852394825404L;
private final static long serialVersionUID = 8182237757758119666L;

/**
* No args constructor for use in serialization
Expand All @@ -59,10 +67,13 @@ public ArtifactRegistry() {
* Set of formats - in upper case- to create artifact registries for, as defined in https://cloud.google.com/artifact-registry/docs/supported-formats . Examples is DOCKER, PYTHON.
* @param repos
* A list of github repositories under Statistics Norway-organisation that is allowed to push to Artifact Registry repositories of the team.
* @param location
* The location for the artifact registry repositories.
*/
public ArtifactRegistry(List<String> formats, List<String> repos) {
public ArtifactRegistry(List<String> formats, String location, List<String> repos) {
super();
this.formats = formats;
this.location = location;
this.repos = repos;
}

Expand All @@ -88,6 +99,24 @@ public void setFormats(List<String> formats) {
this.formats = formats;
}

/**
* The location for the artifact registry repositories.
*
*/
@JsonProperty("location")
public String getLocation() {
return location;
}

/**
* The location for the artifact registry repositories.
*
*/
@JsonProperty("location")
public void setLocation(String location) {
this.location = location;
}

/**
* A list of github repositories under Statistics Norway-organisation that is allowed to push to Artifact Registry repositories of the team.
*
Expand Down Expand Up @@ -124,6 +153,10 @@ public String toString() {
sb.append('=');
sb.append(((this.formats == null)?"<null>":this.formats));
sb.append(',');
sb.append("location");
sb.append('=');
sb.append(((this.location == null)?"<null>":this.location));
sb.append(',');
sb.append("repos");
sb.append('=');
sb.append(((this.repos == null)?"<null>":this.repos));
Expand All @@ -143,6 +176,7 @@ public String toString() {
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.location == null)? 0 :this.location.hashCode()));
result = ((result* 31)+((this.formats == null)? 0 :this.formats.hashCode()));
result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
result = ((result* 31)+((this.repos == null)? 0 :this.repos.hashCode()));
Expand All @@ -158,7 +192,7 @@ public boolean equals(Object other) {
return false;
}
ArtifactRegistry rhs = ((ArtifactRegistry) other);
return ((((this.formats == rhs.formats)||((this.formats!= null)&&this.formats.equals(rhs.formats)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.repos == rhs.repos)||((this.repos!= null)&&this.repos.equals(rhs.repos))));
return (((((this.location == rhs.location)||((this.location!= null)&&this.location.equals(rhs.location)))&&((this.formats == rhs.formats)||((this.formats!= null)&&this.formats.equals(rhs.formats))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.repos == rhs.repos)||((this.repos!= null)&&this.repos.equals(rhs.repos))));
}

public static class ArtifactRegistryBuilder
Expand All @@ -170,8 +204,8 @@ public ArtifactRegistryBuilder() {
super();
}

public ArtifactRegistryBuilder(List<String> formats, List<String> repos) {
super(formats, repos);
public ArtifactRegistryBuilder(List<String> formats, String location, List<String> repos) {
super(formats, location, repos);
}

}
Expand All @@ -189,10 +223,10 @@ public ArtifactRegistryBuilderBase() {
}

@SuppressWarnings("unchecked")
public ArtifactRegistryBuilderBase(List<String> formats, List<String> repos) {
public ArtifactRegistryBuilderBase(List<String> formats, String location, List<String> repos) {
// Skip initialization when called from subclass
if (this.getClass().equals(ArtifactRegistry.ArtifactRegistryBuilder.class)) {
this.instance = ((T) new ArtifactRegistry(formats, repos));
this.instance = ((T) new ArtifactRegistry(formats, location, repos));
}
}

Expand All @@ -208,6 +242,11 @@ public ArtifactRegistry.ArtifactRegistryBuilderBase withFormats(List<String> for
return this;
}

public ArtifactRegistry.ArtifactRegistryBuilderBase withLocation(String location) {
((ArtifactRegistry) this.instance).location = location;
return this;
}

public ArtifactRegistry.ArtifactRegistryBuilderBase withRepos(List<String> repos) {
((ArtifactRegistry) this.instance).repos = repos;
return this;
Expand Down

0 comments on commit fa0f68a

Please sign in to comment.