From d07187001c34a809ef99a179572237331056c96c Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Thu, 28 Mar 2024 16:49:38 +0200 Subject: [PATCH 1/8] tmf 674 model entities --- .../osl/tmf/gsm674/model/CalendarPeriod.java | 100 +++++++++++ .../osl/tmf/gsm674/model/GeographicSite.java | 161 ++++++++++++++++++ .../model/GeographicSiteRelationship.java | 96 +++++++++++ .../etsi/osl/tmf/gsm674/model/HourPeriod.java | 79 +++++++++ .../osl/tmf/gsm674/model/PlaceRefOrValue.java | 86 ++++++++++ 5 files changed, 522 insertions(+) create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/CalendarPeriod.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteRelationship.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/HourPeriod.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/CalendarPeriod.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/CalendarPeriod.java new file mode 100644 index 0000000..a4cbf48 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/CalendarPeriod.java @@ -0,0 +1,100 @@ +package org.etsi.osl.tmf.gsm674.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToMany; +import org.etsi.osl.tmf.common.model.BaseRootEntity; + +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; + +@Entity(name="CalendarPeriod") +public class CalendarPeriod extends BaseRootEntity { + @JsonProperty("day") + private String day; + @JsonProperty("status") + private String status; + @JsonProperty("timeZone") + private String timeZone; + + @JsonProperty("hourPeriod") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + Set hourPeriod = new HashSet<>(); + + public CalendarPeriod() { + } + + public String getDay() { + return day; + } + + public void setDay(String day) { + this.day = day; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getTimeZone() { + return timeZone; + } + + public void setTimeZone(String timeZone) { + this.timeZone = timeZone; + } + + public Set getHourPeriod() { + return hourPeriod; + } + + public void setHourPeriod(Set hourPeriod) { + this.hourPeriod = hourPeriod; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + CalendarPeriod that = (CalendarPeriod) o; + return Objects.equals(day, that.day) && Objects.equals(status, that.status) && Objects.equals(timeZone, that.timeZone) && Objects.equals(hourPeriod, that.hourPeriod); + } + + @Override + public int hashCode() { + return Objects.hash(day, status, timeZone, hourPeriod); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CalendarPeriod {\n"); + sb.append(" day: ").append(toIndentedString(day)).append("\n"); + sb.append(" timezone: ").append(toIndentedString(timeZone)).append("\n"); + sb.append(" hourPeriod: ").append(toIndentedString(hourPeriod)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java new file mode 100644 index 0000000..b3ec7a1 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java @@ -0,0 +1,161 @@ +package org.etsi.osl.tmf.gsm674.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToMany; +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.prm669.model.RelatedParty; + +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; + +@Entity(name = "GeographicSite") +public class GeographicSite extends BaseRootEntity { + + @JsonProperty("id") + private String id; + @JsonProperty("code") + private String code; + @JsonProperty("description") + private String description; + @JsonProperty("name") + private String name; + @JsonProperty("status") + private String status; + + @JsonProperty("calendar") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set calendar = new HashSet<>(); + + @JsonProperty("place") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set placeRefOrValue = new HashSet<>(); + + @JsonProperty("siteRelationship") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set geographicSiteRelationship = new HashSet<>(); + + @JsonProperty("relatedParty") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set relatedParties = new HashSet<>(); + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + GeographicSite that = (GeographicSite) o; + return Objects.equals(id, that.id) && Objects.equals(code, that.code) && Objects.equals(description, that.description) && Objects.equals(name, that.name) && Objects.equals(status, that.status) && Objects.equals(calendar, that.calendar) && Objects.equals(placeRefOrValue, that.placeRefOrValue) && Objects.equals(geographicSiteRelationship, that.geographicSiteRelationship) && Objects.equals(relatedParties, that.relatedParties); + } + + @Override + public int hashCode() { + return Objects.hash(id, code, description, name, status, calendar, placeRefOrValue, geographicSiteRelationship, relatedParties); + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Set getCalendar() { + return calendar; + } + + public void setCalendar(Set calendar) { + this.calendar = calendar; + } + + public Set getPlaceRefOrValue() { + return placeRefOrValue; + } + + public void setPlaceRefOrValue(Set placeRefOrValue) { + this.placeRefOrValue = placeRefOrValue; + } + + public Set getGeographicSiteRelationship() { + return geographicSiteRelationship; + } + + public void setGeographicSiteRelationship(Set geographicSiteRelationship) { + this.geographicSiteRelationship = geographicSiteRelationship; + } + + public Set getRelatedParties() { + return relatedParties; + } + + public void setRelatedParties(Set relatedParties) { + this.relatedParties = relatedParties; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicSite {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" calendar: ").append(toIndentedString(calendar)).append("\n"); + sb.append(" place: ").append(toIndentedString(placeRefOrValue)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParties)).append("\n"); + sb.append(" siteRelationship: ").append(toIndentedString(geographicSiteRelationship)).append("\n"); + sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteRelationship.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteRelationship.java new file mode 100644 index 0000000..ff05ba8 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteRelationship.java @@ -0,0 +1,96 @@ +package org.etsi.osl.tmf.gsm674.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.common.model.TimePeriod; + +import java.util.Objects; + +@Entity(name="GeographicSiteRelationship") +public class GeographicSiteRelationship extends BaseRootEntity { + @JsonProperty("relationshipType") + private String relationshipType; + @JsonProperty("role") + private String role; + @JsonProperty("id") + private String id; + + @JsonProperty("validFor") + private TimePeriod validFor; + + public GeographicSiteRelationship() { + } + + public String getRelationshipType() { + return relationshipType; + } + + public void setRelationshipType(String relationshipType) { + this.relationshipType = relationshipType; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public TimePeriod getValidFor() { + return validFor; + } + + public void setValidFor(TimePeriod validFor) { + this.validFor = validFor; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + GeographicSiteRelationship that = (GeographicSiteRelationship) o; + return Objects.equals(relationshipType, that.relationshipType) && Objects.equals(role, that.role) && Objects.equals(id, that.id) && Objects.equals(validFor, that.validFor); + } + + @Override + public int hashCode() { + return Objects.hash(relationshipType, role, id, validFor); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicSiteRelationship {\n"); + sb.append(" relationshipType: ").append(toIndentedString(relationshipType)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/HourPeriod.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/HourPeriod.java new file mode 100644 index 0000000..d031b83 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/HourPeriod.java @@ -0,0 +1,79 @@ +package org.etsi.osl.tmf.gsm674.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootEntity; + +import java.util.Objects; + +@Entity(name="HourPeriod") +public class HourPeriod extends BaseRootEntity { + + @JsonProperty("endHour") + private String endHour; + @JsonProperty("startHour") + private String startHour; + + public HourPeriod() { + } + + public HourPeriod(String endHour, String startHour) { + this.endHour = endHour; + this.startHour = startHour; + } + + public String getEndHour() { + return endHour; + } + + public void setEndHour(String endHour) { + this.endHour = endHour; + } + + public String getStartHour() { + return startHour; + } + + public void setStartHour(String startHour) { + this.startHour = startHour; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + HourPeriod that = (HourPeriod) o; + return Objects.equals(endHour, that.endHour) && Objects.equals(startHour, that.startHour); + } + + @Override + public int hashCode() { + return Objects.hash(endHour, startHour); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HourPeriod {\n"); + sb.append(" startHour: ").append(toIndentedString(startHour)).append("\n"); + sb.append(" endHour: ").append(toIndentedString(endHour)).append("\n"); + sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java new file mode 100644 index 0000000..11a99b3 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java @@ -0,0 +1,86 @@ +package org.etsi.osl.tmf.gsm674.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootEntity; + +import java.util.Objects; + +@Entity(name="PlaceRefOrValue") +public class PlaceRefOrValue extends BaseRootEntity { + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + public PlaceRefOrValue() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + PlaceRefOrValue that = (PlaceRefOrValue) o; + return Objects.equals(id, that.id) && Objects.equals(name, that.name) && Objects.equals(referredType, that.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, referredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PlaceRefOrValue {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" @referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} -- GitLab From 68c2867c74ef4cf58ad9595d0aa8775828c1964e Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Thu, 4 Apr 2024 10:43:18 +0300 Subject: [PATCH 2/8] add methods in the model --- .../osl/tmf/gsm674/model/GeographicSite.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java index b3ec7a1..6d100c4 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java @@ -41,6 +41,39 @@ public class GeographicSite extends BaseRootEntity { @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) private Set relatedParties = new HashSet<>(); + public GeographicSite addCalendarPeriod(CalendarPeriod calendarPeriod){ + if(this.calendar==null){ + this.calendar=new HashSet<>(); + } + this.calendar.add(calendarPeriod); + return this; + } + + public GeographicSite addPlaceRefOrValue(PlaceRefOrValue placeRefOrValue){ + if(this.placeRefOrValue==null){ + this.placeRefOrValue=new HashSet<>(); + } + this.placeRefOrValue.add(placeRefOrValue); + return this; + } + + public GeographicSite addGeographicSiteRelationship(GeographicSiteRelationship geographicSiteRelationship){ + if (this.geographicSiteRelationship==null){ + this.geographicSiteRelationship=new HashSet<>(); + + } + this.geographicSiteRelationship.add(geographicSiteRelationship); + return this; + } + + public GeographicSite addRelatedParty(RelatedParty relatedParty){ + if(this.relatedParties==null){ + this.relatedParties=new HashSet<>(); + } + this.relatedParties.add(relatedParty); + return this; + } + @Override public boolean equals(Object o) { if (this == o) return true; -- GitLab From 00963c1502745150427f5fa2088f98a68477b20f Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Tue, 9 Apr 2024 16:53:52 +0300 Subject: [PATCH 3/8] refactor to use BaseRootNamed entity instead --- .../etsi/osl/tmf/gsm674/model/GeographicSite.java | 14 ++------------ .../etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java | 14 +++----------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java index 6d100c4..db14ec4 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java @@ -4,7 +4,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.OneToMany; -import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.etsi.osl.tmf.prm669.model.RelatedParty; import java.util.HashSet; @@ -12,7 +12,7 @@ import java.util.Objects; import java.util.Set; @Entity(name = "GeographicSite") -public class GeographicSite extends BaseRootEntity { +public class GeographicSite extends BaseRootNamedEntity { @JsonProperty("id") private String id; @@ -20,8 +20,6 @@ public class GeographicSite extends BaseRootEntity { private String code; @JsonProperty("description") private String description; - @JsonProperty("name") - private String name; @JsonProperty("status") private String status; @@ -112,14 +110,6 @@ public class GeographicSite extends BaseRootEntity { this.description = description; } - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - public String getStatus() { return status; } diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java index 11a99b3..759e2b8 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java @@ -2,12 +2,12 @@ package org.etsi.osl.tmf.gsm674.model; import com.fasterxml.jackson.annotation.JsonProperty; import jakarta.persistence.Entity; -import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import java.util.Objects; @Entity(name="PlaceRefOrValue") -public class PlaceRefOrValue extends BaseRootEntity { +public class PlaceRefOrValue extends BaseRootNamedEntity { @JsonProperty("id") private String id; @@ -28,14 +28,6 @@ public class PlaceRefOrValue extends BaseRootEntity { this.id = id; } - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - public String getReferredType() { return referredType; } @@ -55,7 +47,7 @@ public class PlaceRefOrValue extends BaseRootEntity { @Override public int hashCode() { - return Objects.hash(id, name, referredType); + return Objects.hash(super.hashCode(), id, name, referredType); } @Override -- GitLab From b69a81c59dae4ac998d0157831918e53812ba3dc Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Wed, 10 Apr 2024 13:27:59 +0300 Subject: [PATCH 4/8] refactor code --- .../java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java | 4 ++-- .../org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java index db14ec4..5a00733 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java @@ -78,12 +78,12 @@ public class GeographicSite extends BaseRootNamedEntity { if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; GeographicSite that = (GeographicSite) o; - return Objects.equals(id, that.id) && Objects.equals(code, that.code) && Objects.equals(description, that.description) && Objects.equals(name, that.name) && Objects.equals(status, that.status) && Objects.equals(calendar, that.calendar) && Objects.equals(placeRefOrValue, that.placeRefOrValue) && Objects.equals(geographicSiteRelationship, that.geographicSiteRelationship) && Objects.equals(relatedParties, that.relatedParties); + return Objects.equals(id, that.id) && Objects.equals(code, that.code) && Objects.equals(description, that.description) && Objects.equals(status, that.status) && Objects.equals(calendar, that.calendar) && Objects.equals(placeRefOrValue, that.placeRefOrValue) && Objects.equals(geographicSiteRelationship, that.geographicSiteRelationship) && Objects.equals(relatedParties, that.relatedParties); } @Override public int hashCode() { - return Objects.hash(id, code, description, name, status, calendar, placeRefOrValue, geographicSiteRelationship, relatedParties); + return Objects.hash(super.hashCode(), id, code, description, status, calendar, placeRefOrValue, geographicSiteRelationship, relatedParties); } public String getId() { diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java index 759e2b8..5a63806 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java @@ -11,9 +11,6 @@ public class PlaceRefOrValue extends BaseRootNamedEntity { @JsonProperty("id") private String id; - @JsonProperty("name") - private String name; - @JsonProperty("@referredType") private String referredType; @@ -42,12 +39,12 @@ public class PlaceRefOrValue extends BaseRootNamedEntity { if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; PlaceRefOrValue that = (PlaceRefOrValue) o; - return Objects.equals(id, that.id) && Objects.equals(name, that.name) && Objects.equals(referredType, that.referredType); + return Objects.equals(id, that.id) && Objects.equals(referredType, that.referredType); } @Override public int hashCode() { - return Objects.hash(super.hashCode(), id, name, referredType); + return Objects.hash(super.hashCode(), id, referredType); } @Override -- GitLab From e990b4d850273e6bbc76cc161045c72d1024f11a Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Fri, 26 Apr 2024 20:05:48 +0300 Subject: [PATCH 5/8] upgrade to version 5 of tmf 674 --- .../osl/tmf/gsm674/model/Addressable.java | 112 +++++ .../etsi/osl/tmf/gsm674/model/BaseEvent.java | 337 +++++++++++++++ .../osl/tmf/gsm674/model/CalendarPeriod.java | 146 ++++++- .../org/etsi/osl/tmf/gsm674/model/Entity.java | 197 +++++++++ .../etsi/osl/tmf/gsm674/model/EntityRef.java | 74 ++++ .../org/etsi/osl/tmf/gsm674/model/Error.java | 193 +++++++++ .../tmf/gsm674/model/EventSubscription.java | 135 ++++++ .../gsm674/model/EventSubscriptionInput.java | 111 +++++ .../etsi/osl/tmf/gsm674/model/Extensible.java | 134 ++++++ .../tmf/gsm674/model/ExternalIdentifier.java | 142 +++++++ .../gsm674/model/GeographicAddressValue.java | 383 +++++++++++++++++ .../osl/tmf/gsm674/model/GeographicSite.java | 298 +++++++++---- ...ographicSiteAttributeValueChangeEvent.java | 159 +++++++ .../gsm674/model/GeographicSiteCreate.java | 345 +++++++++++++++ .../model/GeographicSiteCreateEvent.java | 158 +++++++ .../model/GeographicSiteDeleteEvent.java | 158 +++++++ .../model/GeographicSiteEventPayload.java | 74 ++++ .../model/GeographicSiteRelationship.java | 106 ++++- .../model/GeographicSiteStateChangeEvent.java | 158 +++++++ .../gsm674/model/GeographicSiteUpdate.java | 395 ++++++++++++++++++ .../model/GeographicSubAddressUnit.java | 177 ++++++++ .../model/GeographicSubAddressValue.java | 328 +++++++++++++++ .../etsi/osl/tmf/gsm674/model/HourPeriod.java | 6 +- .../etsi/osl/tmf/gsm674/model/JsonPatch.java | 201 +++++++++ .../model/PatchGeographicSite200Response.java | 5 + .../etsi/osl/tmf/gsm674/model/PlaceRef.java | 223 ++++++++++ .../osl/tmf/gsm674/model/PlaceRefOrValue.java | 131 ++++-- .../etsi/osl/tmf/gsm674/model/Reference.java | 131 ++++++ .../osl/tmf/gsm674/model/SchemaContext.java | 122 ++++++ 29 files changed, 4981 insertions(+), 158 deletions(-) create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/Addressable.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/BaseEvent.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/Entity.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/EntityRef.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/Error.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/EventSubscription.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/EventSubscriptionInput.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/Extensible.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/ExternalIdentifier.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicAddressValue.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteAttributeValueChangeEvent.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteCreate.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteCreateEvent.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteDeleteEvent.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteEventPayload.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteStateChangeEvent.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteUpdate.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/JsonPatch.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/PatchGeographicSite200Response.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRef.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/Reference.java create mode 100644 src/main/java/org/etsi/osl/tmf/gsm674/model/SchemaContext.java diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/Addressable.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/Addressable.java new file mode 100644 index 0000000..ed79fa3 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/Addressable.java @@ -0,0 +1,112 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + + +/** + * Base schema for adressable entities + */ + +@Schema(name = "Addressable", description = "Base schema for adressable entities") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class Addressable { + + @JsonProperty("href") + private String href; + + @JsonProperty("id") + private String id; + + public Addressable() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Addressable(String href, String id) { + this.href = href; + this.id = id; + } + + public Addressable href(String href) { + this.href = href; + return this; + } + + /** + * Hyperlink reference + * @return href + */ + @NotNull + @Schema(name = "href", description = "Hyperlink reference", requiredMode = Schema.RequiredMode.REQUIRED) + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public Addressable id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + @NotNull + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.REQUIRED) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Addressable addressable = (Addressable) o; + return Objects.equals(this.href, addressable.href) && + Objects.equals(this.id, addressable.id); + } + + @Override + public int hashCode() { + return Objects.hash(href, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Addressable {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/BaseEvent.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/BaseEvent.java new file mode 100644 index 0000000..8f8f0f3 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/BaseEvent.java @@ -0,0 +1,337 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.time.OffsetDateTime; + +import jakarta.validation.Valid; +import org.springframework.format.annotation.DateTimeFormat; + +import io.swagger.v3.oas.annotations.media.Schema; + + +/** + * BaseEvent + */ + +@JsonIgnoreProperties( + value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the @type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = BaseEvent.class, name = "BaseEvent"), + @JsonSubTypes.Type(value = GeographicSiteAttributeValueChangeEvent.class, name = "GeographicSiteAttributeValueChangeEvent"), + @JsonSubTypes.Type(value = GeographicSiteCreateEvent.class, name = "GeographicSiteCreateEvent"), + @JsonSubTypes.Type(value = GeographicSiteDeleteEvent.class, name = "GeographicSiteDeleteEvent"), + @JsonSubTypes.Type(value = GeographicSiteStateChangeEvent.class, name = "GeographicSiteStateChangeEvent") +}) + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class BaseEvent extends Entity { + + @JsonProperty("event") + private Object event; + @JsonProperty("eventId") + private String eventId; + + @JsonProperty("eventTime") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime eventTime; + @JsonProperty("eventType") + private String eventType; + + @JsonProperty("correlationId") + private String correlationId; + @JsonProperty("domain") + private String domain; + + @JsonProperty("title") + private String title; + @JsonProperty("description") + private String description; + @JsonProperty("priority") + private String priority; + @JsonProperty("timeOcurred") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime timeOcurred; + + public BaseEvent() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BaseEvent(String href, String id, String atType) { + super(href, id, atType); + } + + public BaseEvent event(Object event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + + @Schema(name = "event", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public Object getEvent() { + return event; + } + + public void setEvent(Object event) { + this.event = event; + } + + public BaseEvent eventId(String eventId) { + this.eventId = eventId; + return this; + } + + /** + * The identifier of the notification. + * @return eventId + */ + + @Schema(name = "eventId", description = "The identifier of the notification.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + public BaseEvent eventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * Time of the event occurrence. + * @return eventTime + */ + @Valid + @Schema(name = "eventTime", description = "Time of the event occurrence.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public OffsetDateTime getEventTime() { + return eventTime; + } + + public void setEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + } + + public BaseEvent eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The type of the notification. + * @return eventType + */ + + @Schema(name = "eventType", description = "The type of the notification.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public BaseEvent correlationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * The correlation id for this event. + * @return correlationId + */ + + @Schema(name = "correlationId", description = "The correlation id for this event.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getCorrelationId() { + return correlationId; + } + + public void setCorrelationId(String correlationId) { + this.correlationId = correlationId; + } + + public BaseEvent domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain of the event. + * @return domain + */ + + @Schema(name = "domain", description = "The domain of the event.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public BaseEvent title(String title) { + this.title = title; + return this; + } + + /** + * The title of the event. + * @return title + */ + + @Schema(name = "title", description = "The title of the event.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public BaseEvent description(String description) { + this.description = description; + return this; + } + + /** + * An explanatory of the event. + * @return description + */ + + @Schema(name = "description", description = "An explanatory of the event.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public BaseEvent priority(String priority) { + this.priority = priority; + return this; + } + + /** + * A priority. + * @return priority + */ + + @Schema(name = "priority", description = "A priority.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public BaseEvent timeOcurred(OffsetDateTime timeOcurred) { + this.timeOcurred = timeOcurred; + return this; + } + + /** + * The time the event occured. + * @return timeOcurred + */ + @Valid + @Schema(name = "timeOcurred", description = "The time the event occured.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public OffsetDateTime getTimeOcurred() { + return timeOcurred; + } + + public void setTimeOcurred(OffsetDateTime timeOcurred) { + this.timeOcurred = timeOcurred; + } + + + public BaseEvent href(String href) { + super.href(href); + return this; + } + + public BaseEvent id(String id) { + super.id(id); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BaseEvent baseEvent = (BaseEvent) o; + return Objects.equals(this.event, baseEvent.event) && + Objects.equals(this.eventId, baseEvent.eventId) && + Objects.equals(this.eventTime, baseEvent.eventTime) && + Objects.equals(this.eventType, baseEvent.eventType) && + Objects.equals(this.correlationId, baseEvent.correlationId) && + Objects.equals(this.domain, baseEvent.domain) && + Objects.equals(this.title, baseEvent.title) && + Objects.equals(this.description, baseEvent.description) && + Objects.equals(this.priority, baseEvent.priority) && + Objects.equals(this.timeOcurred, baseEvent.timeOcurred) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, eventId, eventTime, eventType, correlationId, domain, title, description, priority, timeOcurred, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BaseEvent {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); + sb.append(" eventTime: ").append(toIndentedString(eventTime)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" correlationId: ").append(toIndentedString(correlationId)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" timeOcurred: ").append(toIndentedString(timeOcurred)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/CalendarPeriod.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/CalendarPeriod.java index a4cbf48..094b506 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/CalendarPeriod.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/CalendarPeriod.java @@ -1,14 +1,17 @@ package org.etsi.osl.tmf.gsm674.model; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.OneToMany; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; import org.etsi.osl.tmf.common.model.BaseRootEntity; -import java.util.HashSet; +import java.util.ArrayList; +import java.util.List; import java.util.Objects; -import java.util.Set; @Entity(name="CalendarPeriod") public class CalendarPeriod extends BaseRootEntity { @@ -18,14 +21,56 @@ public class CalendarPeriod extends BaseRootEntity { private String status; @JsonProperty("timeZone") private String timeZone; - + @JsonProperty("id") + private String id; + @Valid @JsonProperty("hourPeriod") @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) - Set hourPeriod = new HashSet<>(); + List hourPeriod = new ArrayList<>(); public CalendarPeriod() { + super(); + } + + /** + * Constructor with only required parameters + */ + public CalendarPeriod(String status) { + this.status = status; + } + + public CalendarPeriod id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier of the calendar period + * @return id + */ + + @Schema(name = "id", description = "unique identifier of the calendar period", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public CalendarPeriod day(String day) { + this.day = day; + return this; } + /** + * Day where the calendar status applies (e.g.: monday, mon-to-fri, weekdays, weekend, all week, ...) + * @return day + */ + + @Schema(name = "day", description = "Day where the calendar status applies (e.g.: monday, mon-to-fri, weekdays, weekend, all week, ...)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("day") public String getDay() { return day; } @@ -34,14 +79,18 @@ public class CalendarPeriod extends BaseRootEntity { this.day = day; } - public String getStatus() { - return status; + public CalendarPeriod timeZone(String timeZone) { + this.timeZone = timeZone; + return this; } - public void setStatus(String status) { - this.status = status; - } + /** + * Indication of the timezone applicable to the calendar information (e.g.: Paris, GMT+1) + * @return timeZone + */ + @Schema(name = "timeZone", description = "Indication of the timezone applicable to the calendar information (e.g.: Paris, GMT+1)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("timeZone") public String getTimeZone() { return timeZone; } @@ -50,39 +99,92 @@ public class CalendarPeriod extends BaseRootEntity { this.timeZone = timeZone; } - public Set getHourPeriod() { + public CalendarPeriod hourPeriod(List hourPeriod) { + this.hourPeriod = hourPeriod; + return this; + } + + public CalendarPeriod addHourPeriodItem(HourPeriod hourPeriodItem) { + if (this.hourPeriod == null) { + this.hourPeriod = new ArrayList<>(); + } + this.hourPeriod.add(hourPeriodItem); + return this; + } + + /** + * Get hourPeriod + * @return hourPeriod + */ + @Valid + @Schema(name = "hourPeriod", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("hourPeriod") + public List getHourPeriod() { return hourPeriod; } - public void setHourPeriod(Set hourPeriod) { + public void setHourPeriod(List hourPeriod) { this.hourPeriod = hourPeriod; } + public CalendarPeriod status(String status) { + this.status = status; + return this; + } + + /** + * Indication of the availability of the caledar period (e.g.: available, booked, etc.) + * @return status + */ + @NotNull + @Schema(name = "status", description = "Indication of the availability of the caledar period (e.g.: available, booked, etc.)", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("status") + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + @Override public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - CalendarPeriod that = (CalendarPeriod) o; - return Objects.equals(day, that.day) && Objects.equals(status, that.status) && Objects.equals(timeZone, that.timeZone) && Objects.equals(hourPeriod, that.hourPeriod); + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CalendarPeriod calendarPeriod = (CalendarPeriod) o; + return Objects.equals(this.schemaLocation, calendarPeriod.schemaLocation) && + Objects.equals(this.baseType, calendarPeriod.baseType) && + Objects.equals(this.type, calendarPeriod.type) && + Objects.equals(this.href, calendarPeriod.href) && + Objects.equals(this.id, calendarPeriod.id) && + Objects.equals(this.day, calendarPeriod.day) && + Objects.equals(this.timeZone, calendarPeriod.timeZone) && + Objects.equals(this.hourPeriod, calendarPeriod.hourPeriod) && + Objects.equals(this.status, calendarPeriod.status); } @Override public int hashCode() { - return Objects.hash(day, status, timeZone, hourPeriod); + return Objects.hash(schemaLocation, baseType, type, href, id, day, timeZone, hourPeriod, status); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CalendarPeriod {\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" day: ").append(toIndentedString(day)).append("\n"); - sb.append(" timezone: ").append(toIndentedString(timeZone)).append("\n"); + sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n"); sb.append(" hourPeriod: ").append(toIndentedString(hourPeriod)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); - sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); } @@ -91,7 +193,7 @@ public class CalendarPeriod extends BaseRootEntity { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(java.lang.Object o) { + private String toIndentedString(Object o) { if (o == null) { return "null"; } diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/Entity.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/Entity.java new file mode 100644 index 0000000..0a6826f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/Entity.java @@ -0,0 +1,197 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.common.model.BaseRootEntity; + +/** + * Entity + */ + +@JsonIgnoreProperties( + value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the @type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = Entity.class, name = "Entity"), + @JsonSubTypes.Type(value = BaseEvent.class, name = "BaseEvent"), + @JsonSubTypes.Type(value = GeographicSite.class, name = "GeographicSite"), + @JsonSubTypes.Type(value = GeographicSiteAttributeValueChangeEvent.class, name = "GeographicSiteAttributeValueChangeEvent"), + @JsonSubTypes.Type(value = GeographicSiteCreateEvent.class, name = "GeographicSiteCreateEvent"), + @JsonSubTypes.Type(value = GeographicSiteDeleteEvent.class, name = "GeographicSiteDeleteEvent"), + @JsonSubTypes.Type(value = GeographicSiteStateChangeEvent.class, name = "GeographicSiteStateChangeEvent") +}) + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class Entity { + @JsonProperty("href") + private String href; + @JsonProperty("id") + private String id; + @JsonProperty("@type") + private String atType; + @JsonProperty("@baseType") + private String atBaseType; + @JsonProperty("@schemaLocation") + private String atSchemaLocation; + + public Entity() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Entity(String href, String id, String atType) { + this.href = href; + this.id = id; + this.atType = atType; + } + + public Entity href(String href) { + this.href = href; + return this; + } + + /** + * Hyperlink reference + * @return href + */ + @NotNull + @Schema(name = "href", description = "Hyperlink reference", requiredMode = Schema.RequiredMode.REQUIRED) + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public Entity id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + @NotNull + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.REQUIRED) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Entity atType(String atType) { + this.atType = atType; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return atType + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public Entity atBaseType(String atBaseType) { + this.atBaseType = atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return atBaseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getAtBaseType() { + return atBaseType; + } + + public void setAtBaseType(String atBaseType) { + this.atBaseType = atBaseType; + } + + public Entity atSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return atSchemaLocation + */ + + @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getAtSchemaLocation() { + return atSchemaLocation; + } + + public void setAtSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Entity entity = (Entity) o; + return Objects.equals(this.href, entity.href) && + Objects.equals(this.id, entity.id) && + Objects.equals(this.atType, entity.atType) && + Objects.equals(this.atBaseType, entity.atBaseType) && + Objects.equals(this.atSchemaLocation, entity.atSchemaLocation); + } + + @Override + public int hashCode() { + return Objects.hash(href, id, atType, atBaseType, atSchemaLocation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Entity {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" atType: ").append(toIndentedString(atType)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/EntityRef.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/EntityRef.java new file mode 100644 index 0000000..9faa3fe --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/EntityRef.java @@ -0,0 +1,74 @@ +package org.etsi.osl.tmf.gsm674.model; + + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +/** + * Entity reference schema to be use for all entityRef class. + */ + +@Schema(name = "EntityRef", description = "Entity reference schema to be use for all entityRef class.") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class EntityRef { + @JsonProperty("href") + private String href; + + public EntityRef href(String href) { + this.href = href; + return this; + } + + /** + * Hyperlink reference + * @return href + */ + + @Schema(name = "href", description = "Hyperlink reference", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityRef entityRef = (EntityRef) o; + return Objects.equals(this.href, entityRef.href); + } + + @Override + public int hashCode() { + return Objects.hash(href); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityRef {\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/Error.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/Error.java new file mode 100644 index 0000000..c37bd8c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/Error.java @@ -0,0 +1,193 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.common.model.BaseRootEntity; + + +/** + * Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx) + */ + +@Schema(name = "Error", description = "Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)") + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class Error extends BaseRootEntity { + @JsonProperty("code") + private String code; + @JsonProperty("reason") + private String reason; + @JsonProperty("message") + private String message; + @JsonProperty("status") + private String status; + @JsonProperty("referenceError") + private String referenceError; + + public Error() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Error(String atType, String code, String reason) { + this.type = atType; + this.code = code; + this.reason = reason; + } + + public Error code(String code) { + this.code = code; + return this; + } + + /** + * Application relevant detail, defined in the API or a common list. + * @return code + */ + @NotNull + @Schema(name = "code", description = "Application relevant detail, defined in the API or a common list.", requiredMode = Schema.RequiredMode.REQUIRED) + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public Error reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Explanation of the reason for the error which can be shown to a client user. + * @return reason + */ + @NotNull + @Schema(name = "reason", description = "Explanation of the reason for the error which can be shown to a client user.", requiredMode = Schema.RequiredMode.REQUIRED) + + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public Error message(String message) { + this.message = message; + return this; + } + + /** + * More details and corrective actions related to the error which can be shown to a client user. + * @return message + */ + + @Schema(name = "message", description = "More details and corrective actions related to the error which can be shown to a client user.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public Error status(String status) { + this.status = status; + return this; + } + + /** + * HTTP Error code extension + * @return status + */ + + @Schema(name = "status", description = "HTTP Error code extension", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Error referenceError(String referenceError) { + this.referenceError = referenceError; + return this; + } + + /** + * URI of documentation describing the error. + * @return referenceError + */ + + @Schema(name = "referenceError", description = "URI of documentation describing the error.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getReferenceError() { + return referenceError; + } + + public void setReferenceError(String referenceError) { + this.referenceError = referenceError; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error error = (Error) o; + return Objects.equals(this.type, error.type) && + Objects.equals(this.baseType, error.baseType) && + Objects.equals(this.schemaLocation, error.schemaLocation) && + Objects.equals(this.code, error.code) && + Objects.equals(this.reason, error.reason) && + Objects.equals(this.message, error.message) && + Objects.equals(this.status, error.status) && + Objects.equals(this.referenceError, error.referenceError); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, code, reason, message, status, referenceError); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Error {\n"); + sb.append(" @type: ").append(toIndentedString(type)).append("\n"); + sb.append(" @baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" @schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" referenceError: ").append(toIndentedString(referenceError)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/EventSubscription.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/EventSubscription.java new file mode 100644 index 0000000..9f321f3 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/EventSubscription.java @@ -0,0 +1,135 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +/** + * Sets the communication endpoint address the service instance must use to deliver notification information + */ + +@Schema(name = "EventSubscription", description = "Sets the communication endpoint address the service instance must use to deliver notification information") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class EventSubscription { + @JsonProperty("id") + private String id; + @JsonProperty("callback") + private String callback; + @JsonProperty("query") + private String query; + + public EventSubscription() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EventSubscription(String id, String callback) { + this.id = id; + this.callback = callback; + } + + public EventSubscription id(String id) { + this.id = id; + return this; + } + + /** + * Id of the listener + * @return id + */ + @NotNull + @Schema(name = "id", description = "Id of the listener", requiredMode = Schema.RequiredMode.REQUIRED) + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public EventSubscription callback(String callback) { + this.callback = callback; + return this; + } + + /** + * The callback being registered. + * @return callback + */ + @NotNull + @Schema(name = "callback", description = "The callback being registered.", requiredMode = Schema.RequiredMode.REQUIRED) + + public String getCallback() { + return callback; + } + + public void setCallback(String callback) { + this.callback = callback; + } + + public EventSubscription query(String query) { + this.query = query; + return this; + } + + /** + * additional data to be passed + * @return query + */ + + @Schema(name = "query", description = "additional data to be passed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EventSubscription eventSubscription = (EventSubscription) o; + return Objects.equals(this.id, eventSubscription.id) && + Objects.equals(this.callback, eventSubscription.callback) && + Objects.equals(this.query, eventSubscription.query); + } + + @Override + public int hashCode() { + return Objects.hash(id, callback, query); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EventSubscription {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" callback: ").append(toIndentedString(callback)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/EventSubscriptionInput.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/EventSubscriptionInput.java new file mode 100644 index 0000000..10b1f8f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/EventSubscriptionInput.java @@ -0,0 +1,111 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + + +/** + * Sets the communication endpoint address the service instance must use to deliver notification information + */ + +@Schema(name = "EventSubscriptionInput", description = "Sets the communication endpoint address the service instance must use to deliver notification information") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class EventSubscriptionInput { + @JsonProperty("callback") + private String callback; + @JsonProperty("query") + private String query; + + public EventSubscriptionInput() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EventSubscriptionInput(String callback) { + this.callback = callback; + } + + public EventSubscriptionInput callback(String callback) { + this.callback = callback; + return this; + } + + /** + * The callback being registered. + * @return callback + */ + @NotNull + @Schema(name = "callback", description = "The callback being registered.", requiredMode = Schema.RequiredMode.REQUIRED) + + public String getCallback() { + return callback; + } + + public void setCallback(String callback) { + this.callback = callback; + } + + public EventSubscriptionInput query(String query) { + this.query = query; + return this; + } + + /** + * additional data to be passed + * @return query + */ + + @Schema(name = "query", description = "additional data to be passed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EventSubscriptionInput eventSubscriptionInput = (EventSubscriptionInput) o; + return Objects.equals(this.callback, eventSubscriptionInput.callback) && + Objects.equals(this.query, eventSubscriptionInput.query); + } + + @Override + public int hashCode() { + return Objects.hash(callback, query); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EventSubscriptionInput {\n"); + sb.append(" callback: ").append(toIndentedString(callback)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/Extensible.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/Extensible.java new file mode 100644 index 0000000..47cbea6 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/Extensible.java @@ -0,0 +1,134 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +/** + * Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type + */ + +@Schema(name = "Extensible", description = "Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class Extensible { + @JsonProperty("@type") + private String atType; + @JsonProperty("@baseType") + private String atBaseType; + @JsonProperty("@schemaLocation") + private String atSchemaLocation; + + public Extensible() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Extensible(String atType) { + this.atType = atType; + } + + public Extensible atType(String atType) { + this.atType = atType; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return atType + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public Extensible atBaseType(String atBaseType) { + this.atBaseType = atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return atBaseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getAtBaseType() { + return atBaseType; + } + + public void setAtBaseType(String atBaseType) { + this.atBaseType = atBaseType; + } + + public Extensible atSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return atSchemaLocation + */ + + @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getAtSchemaLocation() { + return atSchemaLocation; + } + + public void setAtSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Extensible extensible = (Extensible) o; + return Objects.equals(this.atType, extensible.atType) && + Objects.equals(this.atBaseType, extensible.atBaseType) && + Objects.equals(this.atSchemaLocation, extensible.atSchemaLocation); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Extensible {\n"); + sb.append(" atType: ").append(toIndentedString(atType)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/ExternalIdentifier.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/ExternalIdentifier.java new file mode 100644 index 0000000..a086f14 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/ExternalIdentifier.java @@ -0,0 +1,142 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; + +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * ExternalIdentifier + */ + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ExternalIdentifier extends BaseRootEntity { + @JsonProperty("owner") + private String owner; + @JsonProperty("externalIdentifierType") + private String externalIdentifierType; + @JsonProperty("id") + private String id; + + public ExternalIdentifier() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ExternalIdentifier(String id) { + this.id = id; + } + + + public ExternalIdentifier owner(String owner) { + this.owner = owner; + return this; + } + + /** + * Name of the external system that owns the entity. + * @return owner + */ + + @Schema(name = "owner", example = "MagentoCommerce", description = "Name of the external system that owns the entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public ExternalIdentifier externalIdentifierType(String externalIdentifierType) { + this.externalIdentifierType = externalIdentifierType; + return this; + } + + /** + * Type of the identification, typically would be the type of the entity within the external system + * @return externalIdentifierType + */ + + @Schema(name = "externalIdentifierType", example = "ProductOrder", description = "Type of the identification, typically would be the type of the entity within the external system", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getExternalIdentifierType() { + return externalIdentifierType; + } + + public void setExternalIdentifierType(String externalIdentifierType) { + this.externalIdentifierType = externalIdentifierType; + } + + public ExternalIdentifier id(String id) { + this.id = id; + return this; + } + + /** + * identification of the entity within the external system. + * @return id + */ + @NotNull + @Schema(name = "id", description = "identification of the entity within the external system.", requiredMode = Schema.RequiredMode.REQUIRED) + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExternalIdentifier externalIdentifier = (ExternalIdentifier) o; + return Objects.equals(this.schemaLocation, externalIdentifier.schemaLocation) && + Objects.equals(this.baseType, externalIdentifier.baseType) && + Objects.equals(this.type, externalIdentifier.type) && + Objects.equals(this.owner, externalIdentifier.owner) && + Objects.equals(this.externalIdentifierType, externalIdentifier.externalIdentifierType) && + Objects.equals(this.id, externalIdentifier.id); + } + + @Override + public int hashCode() { + return Objects.hash(schemaLocation, baseType, type, owner, externalIdentifierType, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalIdentifier {\n"); + sb.append(" @schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" @baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" @type: ").append(toIndentedString(type)).append("\n"); + sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); + sb.append(" externalIdentifierType: ").append(toIndentedString(externalIdentifierType)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicAddressValue.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicAddressValue.java new file mode 100644 index 0000000..94b74d4 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicAddressValue.java @@ -0,0 +1,383 @@ +package org.etsi.osl.tmf.gsm674.model; + + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; + + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; +import jakarta.validation.Valid; + + +/** + * GeographicAddressValue + */ + + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name="GeographicAddress") +public class GeographicAddressValue extends PlaceRefOrValue { + @JsonProperty("locality") + private String locality; + @JsonProperty("postcode") + private String postcode; + @JsonProperty("stateOrProvince") + private String stateOrProvince; + @JsonProperty("streetNr") + private String streetNr; + @JsonProperty("streetNrLast") + private String streetNrLast; + @JsonProperty("streetNrLastSuffix") + private String streetNrLastSuffix; + @JsonProperty("streetNrSuffix") + private String streetNrSuffix; + @JsonProperty("streetSuffix") + private String streetSuffix; + @JsonProperty("streetType") + private String streetType; + @JsonProperty("geographicSubAddress") + private GeographicSubAddressValue geographicSubAddress; + @JsonProperty("city") + private String city; + @JsonProperty("country") + private String country; + @JsonProperty("streetName") + private String streetName; + + public GeographicAddressValue() { + super(); + } + + /** + * Constructor with only required parameters + */ + public GeographicAddressValue locality(String locality) { + this.locality = locality; + return this; + } + + /** + * An area of defined or undefined boundaries within a local authority or other legislatively defined area, usually rural or semi rural in nature. [ANZLIC-STREET], or a suburb, a bounded locality within a city, town or shire principally of urban character [ANZLICSTREET] + * @return locality + */ + + @Schema(name = "locality", description = "An area of defined or undefined boundaries within a local authority or other legislatively defined area, usually rural or semi rural in nature. [ANZLIC-STREET], or a suburb, a bounded locality within a city, town or shire principally of urban character [ANZLICSTREET]", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getLocality() { + return locality; + } + + public void setLocality(String locality) { + this.locality = locality; + } + + public GeographicAddressValue postcode(String postcode) { + this.postcode = postcode; + return this; + } + + /** + * descriptor for a postal delivery area, used to speed and simplify the delivery of mail (also know as zipcode) + * @return postcode + */ + + @Schema(name = "postcode", description = "descriptor for a postal delivery area, used to speed and simplify the delivery of mail (also know as zipcode)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getPostcode() { + return postcode; + } + + public void setPostcode(String postcode) { + this.postcode = postcode; + } + + public GeographicAddressValue stateOrProvince(String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + return this; + } + + /** + * the State or Province that the address is in + * @return stateOrProvince + */ + + @Schema(name = "stateOrProvince", description = "the State or Province that the address is in", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getStateOrProvince() { + return stateOrProvince; + } + + public void setStateOrProvince(String stateOrProvince) { + this.stateOrProvince = stateOrProvince; + } + + public GeographicAddressValue streetNr(String streetNr) { + this.streetNr = streetNr; + return this; + } + + /** + * Number identifying a specific property on a public street. It may be combined with streetNrLast for ranged addresses + * @return streetNr + */ + + @Schema(name = "streetNr", description = "Number identifying a specific property on a public street. It may be combined with streetNrLast for ranged addresses", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getStreetNr() { + return streetNr; + } + + public void setStreetNr(String streetNr) { + this.streetNr = streetNr; + } + + public GeographicAddressValue streetNrLast(String streetNrLast) { + this.streetNrLast = streetNrLast; + return this; + } + + /** + * Last number in a range of street numbers allocated to a property + * @return streetNrLast + */ + + @Schema(name = "streetNrLast", description = "Last number in a range of street numbers allocated to a property", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getStreetNrLast() { + return streetNrLast; + } + + public void setStreetNrLast(String streetNrLast) { + this.streetNrLast = streetNrLast; + } + + public GeographicAddressValue streetNrLastSuffix(String streetNrLastSuffix) { + this.streetNrLastSuffix = streetNrLastSuffix; + return this; + } + + /** + * Last street number suffix for a ranged address + * @return streetNrLastSuffix + */ + + @Schema(name = "streetNrLastSuffix", description = "Last street number suffix for a ranged address", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getStreetNrLastSuffix() { + return streetNrLastSuffix; + } + + public void setStreetNrLastSuffix(String streetNrLastSuffix) { + this.streetNrLastSuffix = streetNrLastSuffix; + } + + public GeographicAddressValue streetNrSuffix(String streetNrSuffix) { + this.streetNrSuffix = streetNrSuffix; + return this; + } + + /** + * the first street number suffix + * @return streetNrSuffix + */ + + @Schema(name = "streetNrSuffix", description = "the first street number suffix", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getStreetNrSuffix() { + return streetNrSuffix; + } + + public void setStreetNrSuffix(String streetNrSuffix) { + this.streetNrSuffix = streetNrSuffix; + } + + public GeographicAddressValue streetSuffix(String streetSuffix) { + this.streetSuffix = streetSuffix; + return this; + } + + /** + * A modifier denoting a relative direction + * @return streetSuffix + */ + + @Schema(name = "streetSuffix", description = "A modifier denoting a relative direction", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getStreetSuffix() { + return streetSuffix; + } + + public void setStreetSuffix(String streetSuffix) { + this.streetSuffix = streetSuffix; + } + + public GeographicAddressValue streetType(String streetType) { + this.streetType = streetType; + return this; + } + + /** + * alley, avenue, boulevard, brae, crescent, drive, highway, lane, terrace, parade, place, tarn, way, wharf + * @return streetType + */ + + @Schema(name = "streetType", description = "alley, avenue, boulevard, brae, crescent, drive, highway, lane, terrace, parade, place, tarn, way, wharf ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getStreetType() { + return streetType; + } + + public void setStreetType(String streetType) { + this.streetType = streetType; + } + + public GeographicAddressValue geographicSubAddress(GeographicSubAddressValue geographicSubAddress) { + this.geographicSubAddress = geographicSubAddress; + return this; + } + + /** + * Get geographicSubAddress + * @return geographicSubAddress + */ + @Valid + @Schema(name = "geographicSubAddress", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public GeographicSubAddressValue getGeographicSubAddress() { + return geographicSubAddress; + } + + public void setGeographicSubAddress(GeographicSubAddressValue geographicSubAddress) { + this.geographicSubAddress = geographicSubAddress; + } + + public GeographicAddressValue city(String city) { + this.city = city; + return this; + } + + /** + * City that the address is in + * @return city + */ + + @Schema(name = "city", description = "City that the address is in", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public GeographicAddressValue country(String country) { + this.country = country; + return this; + } + + /** + * Country that the address is in + * @return country + */ + + @Schema(name = "country", description = "Country that the address is in", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + public GeographicAddressValue streetName(String streetName) { + this.streetName = streetName; + return this; + } + + /** + * Name of the street or other street type + * @return streetName + */ + + @Schema(name = "streetName", description = "Name of the street or other street type", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getStreetName() { + return streetName; + } + + public void setStreetName(String streetName) { + this.streetName = streetName; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeographicAddressValue geographicAddressValue = (GeographicAddressValue) o; + return Objects.equals(this.type, geographicAddressValue.type) && + Objects.equals(this.baseType, geographicAddressValue.baseType) && + Objects.equals(this.schemaLocation, geographicAddressValue.schemaLocation) && + Objects.equals(this.locality, geographicAddressValue.locality) && + Objects.equals(this.postcode, geographicAddressValue.postcode) && + Objects.equals(this.stateOrProvince, geographicAddressValue.stateOrProvince) && + Objects.equals(this.streetNr, geographicAddressValue.streetNr) && + Objects.equals(this.streetNrLast, geographicAddressValue.streetNrLast) && + Objects.equals(this.streetNrLastSuffix, geographicAddressValue.streetNrLastSuffix) && + Objects.equals(this.streetNrSuffix, geographicAddressValue.streetNrSuffix) && + Objects.equals(this.streetSuffix, geographicAddressValue.streetSuffix) && + Objects.equals(this.streetType, geographicAddressValue.streetType) && + Objects.equals(this.geographicSubAddress, geographicAddressValue.geographicSubAddress) && + Objects.equals(this.city, geographicAddressValue.city) && + Objects.equals(this.country, geographicAddressValue.country) && + Objects.equals(this.streetName, geographicAddressValue.streetName) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, locality, postcode, stateOrProvince, streetNr, streetNrLast, streetNrLastSuffix, streetNrSuffix, streetSuffix, streetType, geographicSubAddress, city, country, streetName, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicAddressValue {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" @type: ").append(toIndentedString(type)).append("\n"); + sb.append(" @baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" @schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" locality: ").append(toIndentedString(locality)).append("\n"); + sb.append(" postcode: ").append(toIndentedString(postcode)).append("\n"); + sb.append(" stateOrProvince: ").append(toIndentedString(stateOrProvince)).append("\n"); + sb.append(" streetNr: ").append(toIndentedString(streetNr)).append("\n"); + sb.append(" streetNrLast: ").append(toIndentedString(streetNrLast)).append("\n"); + sb.append(" streetNrLastSuffix: ").append(toIndentedString(streetNrLastSuffix)).append("\n"); + sb.append(" streetNrSuffix: ").append(toIndentedString(streetNrSuffix)).append("\n"); + sb.append(" streetSuffix: ").append(toIndentedString(streetSuffix)).append("\n"); + sb.append(" streetType: ").append(toIndentedString(streetType)).append("\n"); + sb.append(" geographicSubAddress: ").append(toIndentedString(geographicSubAddress)).append("\n"); + sb.append(" city: ").append(toIndentedString(city)).append("\n"); + sb.append(" country: ").append(toIndentedString(country)).append("\n"); + sb.append(" streetName: ").append(toIndentedString(streetName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java index 5a00733..889e318 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java @@ -1,107 +1,101 @@ package org.etsi.osl.tmf.gsm674.model; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.OneToMany; -import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; +import jakarta.validation.Valid; +import org.etsi.osl.tmf.common.model.BaseRootEntity; import org.etsi.osl.tmf.prm669.model.RelatedParty; +import org.springframework.format.annotation.DateTimeFormat; -import java.util.HashSet; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; import java.util.Objects; -import java.util.Set; @Entity(name = "GeographicSite") -public class GeographicSite extends BaseRootNamedEntity { - - @JsonProperty("id") - private String id; +public class GeographicSite extends BaseRootEntity implements PatchGeographicSite200Response { + @JsonProperty("creationDate") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime creationDate; @JsonProperty("code") private String code; @JsonProperty("description") private String description; @JsonProperty("status") private String status; - + @JsonProperty("externalIdentifier") + private List externalIdentifier = new ArrayList<>(); @JsonProperty("calendar") @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) - private Set calendar = new HashSet<>(); - + private List calendar = new ArrayList<>(); @JsonProperty("place") @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) - private Set placeRefOrValue = new HashSet<>(); - + private List place = new ArrayList<>(); @JsonProperty("siteRelationship") @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) - private Set geographicSiteRelationship = new HashSet<>(); - + private List siteRelationship = new ArrayList<>(); @JsonProperty("relatedParty") @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) - private Set relatedParties = new HashSet<>(); + private List relatedParty = new ArrayList<>(); - public GeographicSite addCalendarPeriod(CalendarPeriod calendarPeriod){ - if(this.calendar==null){ - this.calendar=new HashSet<>(); - } - this.calendar.add(calendarPeriod); - return this; - } - public GeographicSite addPlaceRefOrValue(PlaceRefOrValue placeRefOrValue){ - if(this.placeRefOrValue==null){ - this.placeRefOrValue=new HashSet<>(); - } - this.placeRefOrValue.add(placeRefOrValue); - return this; + public GeographicSite() { + super(); } - public GeographicSite addGeographicSiteRelationship(GeographicSiteRelationship geographicSiteRelationship){ - if (this.geographicSiteRelationship==null){ - this.geographicSiteRelationship=new HashSet<>(); - } - this.geographicSiteRelationship.add(geographicSiteRelationship); + public GeographicSite code(String code) { + this.code = code; return this; } - public GeographicSite addRelatedParty(RelatedParty relatedParty){ - if(this.relatedParties==null){ - this.relatedParties=new HashSet<>(); - } - this.relatedParties.add(relatedParty); - return this; - } + /** + * A code that may be used for some addressing schemes eg: [ANSI T1.253-1999] + * @return code + */ - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - GeographicSite that = (GeographicSite) o; - return Objects.equals(id, that.id) && Objects.equals(code, that.code) && Objects.equals(description, that.description) && Objects.equals(status, that.status) && Objects.equals(calendar, that.calendar) && Objects.equals(placeRefOrValue, that.placeRefOrValue) && Objects.equals(geographicSiteRelationship, that.geographicSiteRelationship) && Objects.equals(relatedParties, that.relatedParties); + @Schema(name = "code", description = "A code that may be used for some addressing schemes eg: [ANSI T1.253-1999]", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getCode() { + return code; } - @Override - public int hashCode() { - return Objects.hash(super.hashCode(), id, code, description, status, calendar, placeRefOrValue, geographicSiteRelationship, relatedParties); + public void setCode(String code) { + this.code = code; } - public String getId() { - return id; + public GeographicSite creationDate(OffsetDateTime creationDate) { + this.creationDate = creationDate; + return this; } - public void setId(String id) { - this.id = id; + /** + * Date and time when the GeographicSite was created + * @return creationDate + */ + @Valid + @Schema(name = "creationDate", description = "Date and time when the GeographicSite was created", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public OffsetDateTime getCreationDate() { + return creationDate; } - public String getCode() { - return code; + public void setCreationDate(OffsetDateTime creationDate) { + this.creationDate = creationDate; } - public void setCode(String code) { - this.code = code; + public GeographicSite description(String description) { + this.description = description; + return this; } + /** + * Text describing additional information regarding the site + * @return description + */ + + @Schema(name = "description", description = "Text describing additional information regarding the site", requiredMode = Schema.RequiredMode.NOT_REQUIRED) public String getDescription() { return description; } @@ -110,6 +104,17 @@ public class GeographicSite extends BaseRootNamedEntity { this.description = description; } + public GeographicSite status(String status) { + this.status = status; + return this; + } + + /** + * The condition of the GeographicSite, such as planned, underConstruction, cancelled, active, inactive, former + * @return status + */ + + @Schema(name = "status", description = "The condition of the GeographicSite, such as planned, underConstruction, cancelled, active, inactive, former", requiredMode = Schema.RequiredMode.NOT_REQUIRED) public String getStatus() { return status; } @@ -118,55 +123,183 @@ public class GeographicSite extends BaseRootNamedEntity { this.status = status; } - public Set getCalendar() { + public GeographicSite relatedParty(List relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public GeographicSite addRelatedPartyItem(RelatedParty relatedPartyItem) { + if (this.relatedParty == null) { + this.relatedParty = new ArrayList<>(); + } + this.relatedParty.add(relatedPartyItem); + return this; + } + + /** + * Get relatedParty + * @return relatedParty + */ + @Valid + @Schema(name = "relatedParty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public List getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List relatedParty) { + this.relatedParty = relatedParty; + } + + public GeographicSite externalIdentifier(List externalIdentifier) { + this.externalIdentifier = externalIdentifier; + return this; + } + + public GeographicSite addExternalIdentifierItem(ExternalIdentifier externalIdentifierItem) { + if (this.externalIdentifier == null) { + this.externalIdentifier = new ArrayList<>(); + } + this.externalIdentifier.add(externalIdentifierItem); + return this; + } + + /** + * Get externalIdentifier + * @return externalIdentifier + */ + @Valid + @Schema(name = "externalIdentifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getExternalIdentifier() { + return externalIdentifier; + } + + public void setExternalIdentifier(List externalIdentifier) { + this.externalIdentifier = externalIdentifier; + } + + public GeographicSite calendar(List calendar) { + this.calendar = calendar; + return this; + } + + public GeographicSite addCalendarItem(CalendarPeriod calendarItem) { + if (this.calendar == null) { + this.calendar = new ArrayList<>(); + } + this.calendar.add(calendarItem); + return this; + } + + /** + * Get calendar + * @return calendar + */ + @Valid + @Schema(name = "calendar", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getCalendar() { return calendar; } - public void setCalendar(Set calendar) { + public void setCalendar(List calendar) { this.calendar = calendar; } - public Set getPlaceRefOrValue() { - return placeRefOrValue; + public GeographicSite place(List place) { + this.place = place; + return this; + } + + public GeographicSite addPlaceItem(PlaceRefOrValue placeItem) { + if (this.place == null) { + this.place = new ArrayList<>(); + } + this.place.add(placeItem); + return this; + } + + /** + * Get place + * @return place + */ + @Valid + @Schema(name = "place", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getPlace() { + return place; + } + + public void setPlace(List place) { + this.place = place; + } + + public GeographicSite siteRelationship(List siteRelationship) { + this.siteRelationship = siteRelationship; + return this; } - public void setPlaceRefOrValue(Set placeRefOrValue) { - this.placeRefOrValue = placeRefOrValue; + public GeographicSite addSiteRelationshipItem(GeographicSiteRelationship siteRelationshipItem) { + if (this.siteRelationship == null) { + this.siteRelationship = new ArrayList<>(); + } + this.siteRelationship.add(siteRelationshipItem); + return this; } - public Set getGeographicSiteRelationship() { - return geographicSiteRelationship; + /** + * Get siteRelationship + * @return siteRelationship + */ + @Valid + @Schema(name = "siteRelationship", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getSiteRelationship() { + return siteRelationship; } - public void setGeographicSiteRelationship(Set geographicSiteRelationship) { - this.geographicSiteRelationship = geographicSiteRelationship; + public void setSiteRelationship(List siteRelationship) { + this.siteRelationship = siteRelationship; } - public Set getRelatedParties() { - return relatedParties; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeographicSite geographicSite = (GeographicSite) o; + return Objects.equals(this.code, geographicSite.code) && + Objects.equals(this.creationDate, geographicSite.creationDate) && + Objects.equals(this.description, geographicSite.description) && + Objects.equals(this.status, geographicSite.status) && + Objects.equals(this.relatedParty, geographicSite.relatedParty) && + Objects.equals(this.externalIdentifier, geographicSite.externalIdentifier) && + Objects.equals(this.calendar, geographicSite.calendar) && + Objects.equals(this.place, geographicSite.place) && + Objects.equals(this.siteRelationship, geographicSite.siteRelationship) && + super.equals(o); } - public void setRelatedParties(Set relatedParties) { - this.relatedParties = relatedParties; + @Override + public int hashCode() { + return Objects.hash(code, creationDate, description, status, relatedParty, externalIdentifier, calendar, place, siteRelationship, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GeographicSite {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" externalIdentifier: ").append(toIndentedString(externalIdentifier)).append("\n"); sb.append(" calendar: ").append(toIndentedString(calendar)).append("\n"); - sb.append(" place: ").append(toIndentedString(placeRefOrValue)).append("\n"); - sb.append(" relatedParty: ").append(toIndentedString(relatedParties)).append("\n"); - sb.append(" siteRelationship: ").append(toIndentedString(geographicSiteRelationship)).append("\n"); - sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); - sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" place: ").append(toIndentedString(place)).append("\n"); + sb.append(" siteRelationship: ").append(toIndentedString(siteRelationship)).append("\n"); sb.append("}"); return sb.toString(); } @@ -175,10 +308,11 @@ public class GeographicSite extends BaseRootNamedEntity { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(java.lang.Object o) { + private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } + } diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteAttributeValueChangeEvent.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteAttributeValueChangeEvent.java new file mode 100644 index 0000000..d1e1c4d --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteAttributeValueChangeEvent.java @@ -0,0 +1,159 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.time.OffsetDateTime; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * GeographicSiteAttributeValueChangeEvent + */ + + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class GeographicSiteAttributeValueChangeEvent extends BaseEvent { + @JsonProperty("event") + private GeographicSiteEventPayload event; + + public GeographicSiteAttributeValueChangeEvent() { + super(); + } + + /** + * Constructor with only required parameters + */ + public GeographicSiteAttributeValueChangeEvent(String href, String id, String atType) { + super(href, id, atType); + } + + public GeographicSiteAttributeValueChangeEvent event(GeographicSiteEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + @Valid + @Schema(name = "event", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public GeographicSiteEventPayload getEvent() { + return event; + } + + public void setEvent(GeographicSiteEventPayload event) { + this.event = event; + } + + + public GeographicSiteAttributeValueChangeEvent eventId(String eventId) { + super.eventId(eventId); + return this; + } + + public GeographicSiteAttributeValueChangeEvent eventTime(OffsetDateTime eventTime) { + super.eventTime(eventTime); + return this; + } + + public GeographicSiteAttributeValueChangeEvent eventType(String eventType) { + super.eventType(eventType); + return this; + } + + public GeographicSiteAttributeValueChangeEvent correlationId(String correlationId) { + super.correlationId(correlationId); + return this; + } + + public GeographicSiteAttributeValueChangeEvent domain(String domain) { + super.domain(domain); + return this; + } + + public GeographicSiteAttributeValueChangeEvent title(String title) { + super.title(title); + return this; + } + + public GeographicSiteAttributeValueChangeEvent description(String description) { + super.description(description); + return this; + } + + public GeographicSiteAttributeValueChangeEvent priority(String priority) { + super.priority(priority); + return this; + } + + public GeographicSiteAttributeValueChangeEvent timeOcurred(OffsetDateTime timeOcurred) { + super.timeOcurred(timeOcurred); + return this; + } + + public GeographicSiteAttributeValueChangeEvent href(String href) { + super.href(href); + return this; + } + + public GeographicSiteAttributeValueChangeEvent id(String id) { + super.id(id); + return this; + } + + public GeographicSiteAttributeValueChangeEvent atType(String atType) { + super.atType(atType); + return this; + } + + public GeographicSiteAttributeValueChangeEvent atBaseType(String atBaseType) { + super.atBaseType(atBaseType); + return this; + } + + public GeographicSiteAttributeValueChangeEvent atSchemaLocation(String atSchemaLocation) { + super.atSchemaLocation(atSchemaLocation); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeographicSiteAttributeValueChangeEvent geographicSiteAttributeValueChangeEvent = (GeographicSiteAttributeValueChangeEvent) o; + return Objects.equals(this.event, geographicSiteAttributeValueChangeEvent.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicSiteAttributeValueChangeEvent {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteCreate.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteCreate.java new file mode 100644 index 0000000..fe8e5a1 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteCreate.java @@ -0,0 +1,345 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.prm669.model.RelatedParty; + + +/** + * GeographicSiteCreate + */ + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class GeographicSiteCreate extends BaseRootEntity { + + @JsonProperty("code") + private String code; + @JsonProperty("description") + private String description; + + @Valid + @JsonProperty("relatedParty") + private List relatedParty = new ArrayList<>(); + + @Valid + @JsonProperty("externalIdentifier") + private List externalIdentifier = new ArrayList<>(); + + @Valid + @JsonProperty("calendar") + private List calendar = new ArrayList<>(); + + @Valid + @JsonProperty("place") + private List place = new ArrayList<>(); + + @Valid + @JsonProperty("siteRelationship") + private List siteRelationship = new ArrayList<>(); + + public GeographicSiteCreate() { + super(); + } + + /** + * Constructor with only required parameters + */ + public GeographicSiteCreate(String atType) { + this.type = atType; + } + + public GeographicSiteCreate atType(String atType) { + this.type = atType; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return atType + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getAtType() { + return type; + } + + public void setAtType(String atType) { + this.type = atType; + } + + public GeographicSiteCreate atBaseType(String atBaseType) { + this.baseType = atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return atBaseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getAtBaseType() { + return baseType; + } + + public void setAtBaseType(String atBaseType) { + this.baseType = atBaseType; + } + + public GeographicSiteCreate atSchemaLocation(String atSchemaLocation) { + this.schemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return atSchemaLocation + */ + + @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@schemaLocation") + public String getAtSchemaLocation() { + return schemaLocation; + } + + public void setAtSchemaLocation(String atSchemaLocation) { + this.schemaLocation = atSchemaLocation; + } + + public GeographicSiteCreate code(String code) { + this.code = code; + return this; + } + + /** + * A code that may be used for some addressing schemes eg: [ANSI T1.253-1999] + * @return code + */ + + @Schema(name = "code", description = "A code that may be used for some addressing schemes eg: [ANSI T1.253-1999]", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public GeographicSiteCreate description(String description) { + this.description = description; + return this; + } + + /** + * Text describing additional information regarding the site + * @return description + */ + + @Schema(name = "description", description = "Text describing additional information regarding the site", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public GeographicSiteCreate relatedParty(List relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public GeographicSiteCreate addRelatedPartyItem(RelatedParty relatedPartyItem) { + if (this.relatedParty == null) { + this.relatedParty = new ArrayList<>(); + } + this.relatedParty.add(relatedPartyItem); + return this; + } + + /** + * Get relatedParty + * @return relatedParty + */ + @Valid + @Schema(name = "relatedParty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List relatedParty) { + this.relatedParty = relatedParty; + } + + public GeographicSiteCreate externalIdentifier(List externalIdentifier) { + this.externalIdentifier = externalIdentifier; + return this; + } + + public GeographicSiteCreate addExternalIdentifierItem(ExternalIdentifier externalIdentifierItem) { + if (this.externalIdentifier == null) { + this.externalIdentifier = new ArrayList<>(); + } + this.externalIdentifier.add(externalIdentifierItem); + return this; + } + + /** + * Get externalIdentifier + * @return externalIdentifier + */ + @Valid + @Schema(name = "externalIdentifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getExternalIdentifier() { + return externalIdentifier; + } + + public void setExternalIdentifier(List externalIdentifier) { + this.externalIdentifier = externalIdentifier; + } + + public GeographicSiteCreate calendar(List calendar) { + this.calendar = calendar; + return this; + } + + public GeographicSiteCreate addCalendarItem(CalendarPeriod calendarItem) { + if (this.calendar == null) { + this.calendar = new ArrayList<>(); + } + this.calendar.add(calendarItem); + return this; + } + + /** + * Get calendar + * @return calendar + */ + @Valid + @Schema(name = "calendar", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getCalendar() { + return calendar; + } + + public void setCalendar(List calendar) { + this.calendar = calendar; + } + + public GeographicSiteCreate place(List place) { + this.place = place; + return this; + } + + public GeographicSiteCreate addPlaceItem(PlaceRefOrValue placeItem) { + if (this.place == null) { + this.place = new ArrayList<>(); + } + this.place.add(placeItem); + return this; + } + + /** + * Get place + * @return place + */ + @Valid + @Schema(name = "place", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getPlace() { + return place; + } + + public void setPlace(List place) { + this.place = place; + } + + public GeographicSiteCreate siteRelationship(List siteRelationship) { + this.siteRelationship = siteRelationship; + return this; + } + + public GeographicSiteCreate addSiteRelationshipItem(GeographicSiteRelationship siteRelationshipItem) { + if (this.siteRelationship == null) { + this.siteRelationship = new ArrayList<>(); + } + this.siteRelationship.add(siteRelationshipItem); + return this; + } + + /** + * Get siteRelationship + * @return siteRelationship + */ + @Valid + @Schema(name = "siteRelationship", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getSiteRelationship() { + return siteRelationship; + } + + public void setSiteRelationship(List siteRelationship) { + this.siteRelationship = siteRelationship; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeographicSiteCreate geographicSiteCreate = (GeographicSiteCreate) o; + return Objects.equals(this.type, geographicSiteCreate.type) && + Objects.equals(this.baseType, geographicSiteCreate.baseType) && + Objects.equals(this.schemaLocation, geographicSiteCreate.schemaLocation) && + Objects.equals(this.code, geographicSiteCreate.code) && + Objects.equals(this.description, geographicSiteCreate.description) && + Objects.equals(this.relatedParty, geographicSiteCreate.relatedParty) && + Objects.equals(this.externalIdentifier, geographicSiteCreate.externalIdentifier) && + Objects.equals(this.calendar, geographicSiteCreate.calendar) && + Objects.equals(this.place, geographicSiteCreate.place) && + Objects.equals(this.siteRelationship, geographicSiteCreate.siteRelationship); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, code, description, relatedParty, externalIdentifier, calendar, place, siteRelationship); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicSiteCreate {\n"); + sb.append(" @type: ").append(toIndentedString(type)).append("\n"); + sb.append(" @baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" @schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" externalIdentifier: ").append(toIndentedString(externalIdentifier)).append("\n"); + sb.append(" calendar: ").append(toIndentedString(calendar)).append("\n"); + sb.append(" place: ").append(toIndentedString(place)).append("\n"); + sb.append(" siteRelationship: ").append(toIndentedString(siteRelationship)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteCreateEvent.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteCreateEvent.java new file mode 100644 index 0000000..3d9cb0a --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteCreateEvent.java @@ -0,0 +1,158 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * GeographicSiteCreateEvent + */ + + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class GeographicSiteCreateEvent extends BaseEvent { + @JsonProperty("event") + private GeographicSiteEventPayload event; + + public GeographicSiteCreateEvent() { + super(); + } + + /** + * Constructor with only required parameters + */ + public GeographicSiteCreateEvent(String href, String id, String atType) { + super(href, id, atType); + } + + public GeographicSiteCreateEvent event(GeographicSiteEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + @Valid + @Schema(name = "event", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public GeographicSiteEventPayload getEvent() { + return event; + } + + public void setEvent(GeographicSiteEventPayload event) { + this.event = event; + } + + + public GeographicSiteCreateEvent eventId(String eventId) { + super.eventId(eventId); + return this; + } + + public GeographicSiteCreateEvent eventTime(OffsetDateTime eventTime) { + super.eventTime(eventTime); + return this; + } + + public GeographicSiteCreateEvent eventType(String eventType) { + super.eventType(eventType); + return this; + } + + public GeographicSiteCreateEvent correlationId(String correlationId) { + super.correlationId(correlationId); + return this; + } + + public GeographicSiteCreateEvent domain(String domain) { + super.domain(domain); + return this; + } + + public GeographicSiteCreateEvent title(String title) { + super.title(title); + return this; + } + + public GeographicSiteCreateEvent description(String description) { + super.description(description); + return this; + } + + public GeographicSiteCreateEvent priority(String priority) { + super.priority(priority); + return this; + } + + public GeographicSiteCreateEvent timeOcurred(OffsetDateTime timeOcurred) { + super.timeOcurred(timeOcurred); + return this; + } + + public GeographicSiteCreateEvent href(String href) { + super.href(href); + return this; + } + + public GeographicSiteCreateEvent id(String id) { + super.id(id); + return this; + } + + public GeographicSiteCreateEvent atType(String atType) { + super.atType(atType); + return this; + } + + public GeographicSiteCreateEvent atBaseType(String atBaseType) { + super.atBaseType(atBaseType); + return this; + } + + public GeographicSiteCreateEvent atSchemaLocation(String atSchemaLocation) { + super.atSchemaLocation(atSchemaLocation); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeographicSiteCreateEvent geographicSiteCreateEvent = (GeographicSiteCreateEvent) o; + return Objects.equals(this.event, geographicSiteCreateEvent.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicSiteCreateEvent {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteDeleteEvent.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteDeleteEvent.java new file mode 100644 index 0000000..38ea867 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteDeleteEvent.java @@ -0,0 +1,158 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * GeographicSiteDeleteEvent + */ + + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class GeographicSiteDeleteEvent extends BaseEvent { + @JsonProperty("event") + private GeographicSiteEventPayload event; + + public GeographicSiteDeleteEvent() { + super(); + } + + /** + * Constructor with only required parameters + */ + public GeographicSiteDeleteEvent(String href, String id, String atType) { + super(href, id, atType); + } + + public GeographicSiteDeleteEvent event(GeographicSiteEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + @Valid + @Schema(name = "event", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public GeographicSiteEventPayload getEvent() { + return event; + } + + public void setEvent(GeographicSiteEventPayload event) { + this.event = event; + } + + + public GeographicSiteDeleteEvent eventId(String eventId) { + super.eventId(eventId); + return this; + } + + public GeographicSiteDeleteEvent eventTime(OffsetDateTime eventTime) { + super.eventTime(eventTime); + return this; + } + + public GeographicSiteDeleteEvent eventType(String eventType) { + super.eventType(eventType); + return this; + } + + public GeographicSiteDeleteEvent correlationId(String correlationId) { + super.correlationId(correlationId); + return this; + } + + public GeographicSiteDeleteEvent domain(String domain) { + super.domain(domain); + return this; + } + + public GeographicSiteDeleteEvent title(String title) { + super.title(title); + return this; + } + + public GeographicSiteDeleteEvent description(String description) { + super.description(description); + return this; + } + + public GeographicSiteDeleteEvent priority(String priority) { + super.priority(priority); + return this; + } + + public GeographicSiteDeleteEvent timeOcurred(OffsetDateTime timeOcurred) { + super.timeOcurred(timeOcurred); + return this; + } + + public GeographicSiteDeleteEvent href(String href) { + super.href(href); + return this; + } + + public GeographicSiteDeleteEvent id(String id) { + super.id(id); + return this; + } + + public GeographicSiteDeleteEvent atType(String atType) { + super.atType(atType); + return this; + } + + public GeographicSiteDeleteEvent atBaseType(String atBaseType) { + super.atBaseType(atBaseType); + return this; + } + + public GeographicSiteDeleteEvent atSchemaLocation(String atSchemaLocation) { + super.atSchemaLocation(atSchemaLocation); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeographicSiteDeleteEvent geographicSiteDeleteEvent = (GeographicSiteDeleteEvent) o; + return Objects.equals(this.event, geographicSiteDeleteEvent.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicSiteDeleteEvent {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteEventPayload.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteEventPayload.java new file mode 100644 index 0000000..ce9ab0c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteEventPayload.java @@ -0,0 +1,74 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * TBD + */ + +@Schema(name = "GeographicSiteEventPayload", description = "TBD") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class GeographicSiteEventPayload { + @JsonProperty("geographicSite") + private GeographicSite geographicSite; + + public GeographicSiteEventPayload geographicSite(GeographicSite geographicSite) { + this.geographicSite = geographicSite; + return this; + } + + /** + * Get geographicSite + * @return geographicSite + */ + @Valid + @Schema(name = "geographicSite", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public GeographicSite getGeographicSite() { + return geographicSite; + } + + public void setGeographicSite(GeographicSite geographicSite) { + this.geographicSite = geographicSite; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeographicSiteEventPayload geographicSiteEventPayload = (GeographicSiteEventPayload) o; + return Objects.equals(this.geographicSite, geographicSiteEventPayload.geographicSite); + } + + @Override + public int hashCode() { + return Objects.hash(geographicSite); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicSiteEventPayload {\n"); + sb.append(" geographicSite: ").append(toIndentedString(geographicSite)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteRelationship.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteRelationship.java index ff05ba8..8b6aa14 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteRelationship.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteRelationship.java @@ -1,7 +1,10 @@ package org.etsi.osl.tmf.gsm674.model; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import jakarta.persistence.Entity; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; import org.etsi.osl.tmf.common.model.BaseRootEntity; import org.etsi.osl.tmf.common.model.TimePeriod; @@ -20,16 +23,24 @@ public class GeographicSiteRelationship extends BaseRootEntity { private TimePeriod validFor; public GeographicSiteRelationship() { + super(); } - public String getRelationshipType() { - return relationshipType; - } - - public void setRelationshipType(String relationshipType) { + /** + * Constructor with only required parameters + */ + public GeographicSiteRelationship(String id, String relationshipType) { + this.id = id; this.relationshipType = relationshipType; } + /** + * Role of the related site in the relationship + * @return role + */ + + @Schema(name = "role", description = "Role of the related site in the relationship", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("role") public String getRole() { return role; } @@ -38,6 +49,38 @@ public class GeographicSiteRelationship extends BaseRootEntity { this.role = role; } + public GeographicSiteRelationship validFor(TimePeriod validFor) { + this.validFor = validFor; + return this; + } + + /** + * Get validFor + * @return validFor + */ + @Valid + @Schema(name = "validFor", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("validFor") + public TimePeriod getValidFor() { + return validFor; + } + + public void setValidFor(TimePeriod validFor) { + this.validFor = validFor; + } + + public GeographicSiteRelationship id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the related site entity within the server + * @return id + */ + @NotNull + @Schema(name = "id", description = "Unique identifier of the related site entity within the server", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("id") public String getId() { return id; } @@ -46,39 +89,62 @@ public class GeographicSiteRelationship extends BaseRootEntity { this.id = id; } - public TimePeriod getValidFor() { - return validFor; + public GeographicSiteRelationship relationshipType(String relationshipType) { + this.relationshipType = relationshipType; + return this; } - public void setValidFor(TimePeriod validFor) { - this.validFor = validFor; + /** + * Type of relationship + * @return relationshipType + */ + @NotNull + @Schema(name = "relationshipType", description = "Type of relationship", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("relationshipType") + public String getRelationshipType() { + return relationshipType; + } + + public void setRelationshipType(String relationshipType) { + this.relationshipType = relationshipType; } @Override public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - GeographicSiteRelationship that = (GeographicSiteRelationship) o; - return Objects.equals(relationshipType, that.relationshipType) && Objects.equals(role, that.role) && Objects.equals(id, that.id) && Objects.equals(validFor, that.validFor); + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeographicSiteRelationship geographicSiteRelationship = (GeographicSiteRelationship) o; + return Objects.equals(this.schemaLocation, geographicSiteRelationship.schemaLocation) && + Objects.equals(this.baseType, geographicSiteRelationship.baseType) && + Objects.equals(this.type, geographicSiteRelationship.type) && + Objects.equals(this.href, geographicSiteRelationship.href) && + Objects.equals(this.role, geographicSiteRelationship.role) && + Objects.equals(this.validFor, geographicSiteRelationship.validFor) && + Objects.equals(this.id, geographicSiteRelationship.id) && + Objects.equals(this.relationshipType, geographicSiteRelationship.relationshipType); } @Override public int hashCode() { - return Objects.hash(relationshipType, role, id, validFor); + return Objects.hash(schemaLocation, baseType, type, href, role, validFor, id, relationshipType); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GeographicSiteRelationship {\n"); - sb.append(" relationshipType: ").append(toIndentedString(relationshipType)).append("\n"); + sb.append(" @schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" @baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" @type: ").append(toIndentedString(type)).append("\n"); sb.append(" href: ").append(toIndentedString(href)).append("\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" validFor: ").append(toIndentedString(validFor)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); - sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" relationshipType: ").append(toIndentedString(relationshipType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -87,7 +153,7 @@ public class GeographicSiteRelationship extends BaseRootEntity { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(java.lang.Object o) { + private String toIndentedString(Object o) { if (o == null) { return "null"; } diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteStateChangeEvent.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteStateChangeEvent.java new file mode 100644 index 0000000..7cefeb5 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteStateChangeEvent.java @@ -0,0 +1,158 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * GeographicSiteStateChangeEvent + */ + + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class GeographicSiteStateChangeEvent extends BaseEvent { + @JsonProperty("event") + private GeographicSiteEventPayload event; + + public GeographicSiteStateChangeEvent() { + super(); + } + + /** + * Constructor with only required parameters + */ + public GeographicSiteStateChangeEvent(String href, String id, String atType) { + super(href, id, atType); + } + + public GeographicSiteStateChangeEvent event(GeographicSiteEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + @Valid + @Schema(name = "event", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public GeographicSiteEventPayload getEvent() { + return event; + } + + public void setEvent(GeographicSiteEventPayload event) { + this.event = event; + } + + + public GeographicSiteStateChangeEvent eventId(String eventId) { + super.eventId(eventId); + return this; + } + + public GeographicSiteStateChangeEvent eventTime(OffsetDateTime eventTime) { + super.eventTime(eventTime); + return this; + } + + public GeographicSiteStateChangeEvent eventType(String eventType) { + super.eventType(eventType); + return this; + } + + public GeographicSiteStateChangeEvent correlationId(String correlationId) { + super.correlationId(correlationId); + return this; + } + + public GeographicSiteStateChangeEvent domain(String domain) { + super.domain(domain); + return this; + } + + public GeographicSiteStateChangeEvent title(String title) { + super.title(title); + return this; + } + + public GeographicSiteStateChangeEvent description(String description) { + super.description(description); + return this; + } + + public GeographicSiteStateChangeEvent priority(String priority) { + super.priority(priority); + return this; + } + + public GeographicSiteStateChangeEvent timeOcurred(OffsetDateTime timeOcurred) { + super.timeOcurred(timeOcurred); + return this; + } + + public GeographicSiteStateChangeEvent href(String href) { + super.href(href); + return this; + } + + public GeographicSiteStateChangeEvent id(String id) { + super.id(id); + return this; + } + + public GeographicSiteStateChangeEvent atType(String atType) { + super.atType(atType); + return this; + } + + public GeographicSiteStateChangeEvent atBaseType(String atBaseType) { + super.atBaseType(atBaseType); + return this; + } + + public GeographicSiteStateChangeEvent atSchemaLocation(String atSchemaLocation) { + super.atSchemaLocation(atSchemaLocation); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeographicSiteStateChangeEvent geographicSiteStateChangeEvent = (GeographicSiteStateChangeEvent) o; + return Objects.equals(this.event, geographicSiteStateChangeEvent.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicSiteStateChangeEvent {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteUpdate.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteUpdate.java new file mode 100644 index 0000000..5bf6c83 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteUpdate.java @@ -0,0 +1,395 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.prm669.model.RelatedParty; +import org.springframework.format.annotation.DateTimeFormat; +import io.swagger.v3.oas.annotations.media.Schema; +/** + * GeographicSiteUpdate + */ + + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class GeographicSiteUpdate { + @JsonProperty("@type") + private String atType; + @JsonProperty("@baseType") + private String atBaseType; + @JsonProperty("@schemaLocation") + private String atSchemaLocation; + @JsonProperty("code") + private String code; + @JsonProperty("creationDate") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime creationDate; + @JsonProperty("description") + private String description; + @JsonProperty("status") + private String status; + + @Valid + @JsonProperty("relatedParty") + private List relatedParty = new ArrayList<>(); + + @Valid + @JsonProperty("externalIdentifier") + private List externalIdentifier = new ArrayList<>(); + + @Valid + @JsonProperty("calendar") + private List calendar = new ArrayList<>(); + + @Valid + @JsonProperty("place") + private List place = new ArrayList<>(); + + @Valid + @JsonProperty("siteRelationship") + private List siteRelationship = new ArrayList<>(); + + public GeographicSiteUpdate() { + super(); + } + + /** + * Constructor with only required parameters + */ + public GeographicSiteUpdate(String atType) { + this.atType = atType; + } + + public GeographicSiteUpdate atType(String atType) { + this.atType = atType; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return atType + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public GeographicSiteUpdate atBaseType(String atBaseType) { + this.atBaseType = atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return atBaseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getAtBaseType() { + return atBaseType; + } + + public void setAtBaseType(String atBaseType) { + this.atBaseType = atBaseType; + } + + public GeographicSiteUpdate atSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return atSchemaLocation + */ + + @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getAtSchemaLocation() { + return atSchemaLocation; + } + + public void setAtSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + } + + public GeographicSiteUpdate code(String code) { + this.code = code; + return this; + } + + /** + * A code that may be used for some addressing schemes eg: [ANSI T1.253-1999] + * @return code + */ + + @Schema(name = "code", description = "A code that may be used for some addressing schemes eg: [ANSI T1.253-1999]", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public GeographicSiteUpdate creationDate(OffsetDateTime creationDate) { + this.creationDate = creationDate; + return this; + } + + /** + * Date and time when the GeographicSite was created + * @return creationDate + */ + @Valid + @Schema(name = "creationDate", description = "Date and time when the GeographicSite was created", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public OffsetDateTime getCreationDate() { + return creationDate; + } + + public void setCreationDate(OffsetDateTime creationDate) { + this.creationDate = creationDate; + } + + public GeographicSiteUpdate description(String description) { + this.description = description; + return this; + } + + /** + * Text describing additional information regarding the site + * @return description + */ + + @Schema(name = "description", description = "Text describing additional information regarding the site", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public GeographicSiteUpdate status(String status) { + this.status = status; + return this; + } + + /** + * The condition of the GeographicSite, such as planned, underConstruction, cancelled, active, inactive, former + * @return status + */ + + @Schema(name = "status", description = "The condition of the GeographicSite, such as planned, underConstruction, cancelled, active, inactive, former", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public GeographicSiteUpdate relatedParty(List relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public GeographicSiteUpdate addRelatedPartyItem(RelatedParty relatedPartyItem) { + if (this.relatedParty == null) { + this.relatedParty = new ArrayList<>(); + } + this.relatedParty.add(relatedPartyItem); + return this; + } + + /** + * Get relatedParty + * @return relatedParty + */ + @Valid + @Schema(name = "relatedParty", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List relatedParty) { + this.relatedParty = relatedParty; + } + + public GeographicSiteUpdate externalIdentifier(List externalIdentifier) { + this.externalIdentifier = externalIdentifier; + return this; + } + + public GeographicSiteUpdate addExternalIdentifierItem(ExternalIdentifier externalIdentifierItem) { + if (this.externalIdentifier == null) { + this.externalIdentifier = new ArrayList<>(); + } + this.externalIdentifier.add(externalIdentifierItem); + return this; + } + + /** + * Get externalIdentifier + * @return externalIdentifier + */ + @Valid + @Schema(name = "externalIdentifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getExternalIdentifier() { + return externalIdentifier; + } + + public void setExternalIdentifier(List externalIdentifier) { + this.externalIdentifier = externalIdentifier; + } + + public GeographicSiteUpdate calendar(List calendar) { + this.calendar = calendar; + return this; + } + + public GeographicSiteUpdate addCalendarItem(CalendarPeriod calendarItem) { + if (this.calendar == null) { + this.calendar = new ArrayList<>(); + } + this.calendar.add(calendarItem); + return this; + } + + /** + * Get calendar + * @return calendar + */ + @Valid + @Schema(name = "calendar", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getCalendar() { + return calendar; + } + + public void setCalendar(List calendar) { + this.calendar = calendar; + } + + public GeographicSiteUpdate place(List place) { + this.place = place; + return this; + } + + public GeographicSiteUpdate addPlaceItem(PlaceRefOrValue placeItem) { + if (this.place == null) { + this.place = new ArrayList<>(); + } + this.place.add(placeItem); + return this; + } + + /** + * Get place + * @return place + */ + @Valid + @Schema(name = "place", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getPlace() { + return place; + } + + public void setPlace(List place) { + this.place = place; + } + + public GeographicSiteUpdate siteRelationship(List siteRelationship) { + this.siteRelationship = siteRelationship; + return this; + } + + public GeographicSiteUpdate addSiteRelationshipItem(GeographicSiteRelationship siteRelationshipItem) { + if (this.siteRelationship == null) { + this.siteRelationship = new ArrayList<>(); + } + this.siteRelationship.add(siteRelationshipItem); + return this; + } + + /** + * Get siteRelationship + * @return siteRelationship + */ + @Valid + @Schema(name = "siteRelationship", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getSiteRelationship() { + return siteRelationship; + } + + public void setSiteRelationship(List siteRelationship) { + this.siteRelationship = siteRelationship; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeographicSiteUpdate geographicSiteUpdate = (GeographicSiteUpdate) o; + return Objects.equals(this.atType, geographicSiteUpdate.atType) && + Objects.equals(this.atBaseType, geographicSiteUpdate.atBaseType) && + Objects.equals(this.atSchemaLocation, geographicSiteUpdate.atSchemaLocation) && + Objects.equals(this.code, geographicSiteUpdate.code) && + Objects.equals(this.creationDate, geographicSiteUpdate.creationDate) && + Objects.equals(this.description, geographicSiteUpdate.description) && + Objects.equals(this.status, geographicSiteUpdate.status) && + Objects.equals(this.relatedParty, geographicSiteUpdate.relatedParty) && + Objects.equals(this.externalIdentifier, geographicSiteUpdate.externalIdentifier) && + Objects.equals(this.calendar, geographicSiteUpdate.calendar) && + Objects.equals(this.place, geographicSiteUpdate.place) && + Objects.equals(this.siteRelationship, geographicSiteUpdate.siteRelationship); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation, code, creationDate, description, status, relatedParty, externalIdentifier, calendar, place, siteRelationship); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicSiteUpdate {\n"); + sb.append(" atType: ").append(toIndentedString(atType)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" externalIdentifier: ").append(toIndentedString(externalIdentifier)).append("\n"); + sb.append(" calendar: ").append(toIndentedString(calendar)).append("\n"); + sb.append(" place: ").append(toIndentedString(place)).append("\n"); + sb.append(" siteRelationship: ").append(toIndentedString(siteRelationship)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java new file mode 100644 index 0000000..fe9529b --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java @@ -0,0 +1,177 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +/** + * GeographicSubAddressUnit + */ + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class GeographicSubAddressUnit { + @JsonProperty("@schemaLocation") + private String schemaLocation; + @JsonProperty("@baseType") + private String baseType; + @JsonProperty("@type") + private String type; + @JsonProperty("subUnitNumber") + private String subUnitNumber; + @JsonProperty("subUnitType") + private String subUnitType; + + public GeographicSubAddressUnit() { + super(); + } + + /** + * Constructor with only required parameters + */ + public GeographicSubAddressUnit(String subUnitNumber, String subUnitType) { + this.subUnitNumber = subUnitNumber; + this.subUnitType = subUnitType; + } + + public GeographicSubAddressUnit atSchemaLocation(String atSchemaLocation) { + this.schemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return atSchemaLocation + */ + + @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getAtSchemaLocation() { + return schemaLocation; + } + + public void setAtSchemaLocation(String atSchemaLocation) { + this.schemaLocation = atSchemaLocation; + } + + public GeographicSubAddressUnit atBaseType(String atBaseType) { + this.baseType = atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return atBaseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getAtBaseType() { + return baseType; + } + + public void setAtBaseType(String atBaseType) { + this.baseType = atBaseType; + } + + public GeographicSubAddressUnit atType(String atType) { + this.type = atType; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return atType + */ + + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getAtType() { + return type; + } + + public void setAtType(String atType) { + this.type = atType; + } + + public GeographicSubAddressUnit subUnitNumber(String subUnitNumber) { + this.subUnitNumber = subUnitNumber; + return this; + } + + /** + * The discriminator used for the subunit, often just a simple number but may also be a range. + * @return subUnitNumber + */ + @NotNull + @Schema(name = "subUnitNumber", description = "The discriminator used for the subunit, often just a simple number but may also be a range.", requiredMode = Schema.RequiredMode.REQUIRED) + public String getSubUnitNumber() { + return subUnitNumber; + } + + public void setSubUnitNumber(String subUnitNumber) { + this.subUnitNumber = subUnitNumber; + } + + public GeographicSubAddressUnit subUnitType(String subUnitType) { + this.subUnitType = subUnitType; + return this; + } + + /** + * The type of subunit e.g.BERTH, FLAT, PIER, SUITE, SHOP, TOWER, UNIT, WHARF, RACK + * @return subUnitType + */ + @NotNull + @Schema(name = "subUnitType", description = "The type of subunit e.g.BERTH, FLAT, PIER, SUITE, SHOP, TOWER, UNIT, WHARF, RACK", requiredMode = Schema.RequiredMode.REQUIRED) + public String getSubUnitType() { + return subUnitType; + } + + public void setSubUnitType(String subUnitType) { + this.subUnitType = subUnitType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeographicSubAddressUnit geographicSubAddressUnit = (GeographicSubAddressUnit) o; + return Objects.equals(this.schemaLocation, geographicSubAddressUnit.schemaLocation) && + Objects.equals(this.baseType, geographicSubAddressUnit.baseType) && + Objects.equals(this.type, geographicSubAddressUnit.type) && + Objects.equals(this.subUnitNumber, geographicSubAddressUnit.subUnitNumber) && + Objects.equals(this.subUnitType, geographicSubAddressUnit.subUnitType); + } + + @Override + public int hashCode() { + return Objects.hash(schemaLocation, baseType, type, subUnitNumber, subUnitType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicSubAddressUnit {\n"); + sb.append(" @schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" @baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" @type: ").append(toIndentedString(type)).append("\n"); + sb.append(" subUnitNumber: ").append(toIndentedString(subUnitNumber)).append("\n"); + sb.append(" subUnitType: ").append(toIndentedString(subUnitType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java new file mode 100644 index 0000000..270708d --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java @@ -0,0 +1,328 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.ArrayList; +import java.util.List; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * GeographicSubAddressValue + */ + + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class GeographicSubAddressValue { + @JsonProperty("@type") + private String type; + @JsonProperty("@baseType") + private String baseType; + @JsonProperty("@schemaLocation") + private String schemaLocation; + @JsonProperty("buildingName") + private String buildingName; + @JsonProperty("levelNumber") + private String levelNumber; + @JsonProperty("levelType") + private String levelType; + @JsonProperty("name") + private String name; + @JsonProperty("privateStreetName") + private String privateStreetName; + @JsonProperty("privateStreetNumber") + private String privateStreetNumber; + + @Valid + @JsonProperty("subUnit") + private List subUnit = new ArrayList<>(); + @JsonProperty("subAddressType") + private String subAddressType; + + public GeographicSubAddressValue() { + super(); + } + + /** + * Constructor with only required parameters + */ + public GeographicSubAddressValue(String atType) { + this.type = atType; + } + + public GeographicSubAddressValue atType(String atType) { + this.type = atType; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return atType + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + public String getAtType() { + return type; + } + + public void setAtType(String atType) { + this.type = atType; + } + + public GeographicSubAddressValue atBaseType(String atBaseType) { + this.baseType = atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return atBaseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getAtBaseType() { + return baseType; + } + + public void setAtBaseType(String atBaseType) { + this.baseType = atBaseType; + } + + public GeographicSubAddressValue atSchemaLocation(String atSchemaLocation) { + this.schemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return atSchemaLocation + */ + + @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getAtSchemaLocation() { + return schemaLocation; + } + + public void setAtSchemaLocation(String atSchemaLocation) { + this.schemaLocation = atSchemaLocation; + } + + public GeographicSubAddressValue buildingName(String buildingName) { + this.buildingName = buildingName; + return this; + } + + /** + * allows for buildings that have well-known names + * @return buildingName + */ + + @Schema(name = "buildingName", description = "allows for buildings that have well-known names", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getBuildingName() { + return buildingName; + } + + public void setBuildingName(String buildingName) { + this.buildingName = buildingName; + } + + public GeographicSubAddressValue levelNumber(String levelNumber) { + this.levelNumber = levelNumber; + return this; + } + + /** + * used where a level type may be repeated e.g. BASEMENT 1, BASEMENT 2 + * @return levelNumber + */ + + @Schema(name = "levelNumber", description = "used where a level type may be repeated e.g. BASEMENT 1, BASEMENT 2", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getLevelNumber() { + return levelNumber; + } + + public void setLevelNumber(String levelNumber) { + this.levelNumber = levelNumber; + } + + public GeographicSubAddressValue levelType(String levelType) { + this.levelType = levelType; + return this; + } + + /** + * describes level types within a building + * @return levelType + */ + + @Schema(name = "levelType", description = "describes level types within a building", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getLevelType() { + return levelType; + } + + public void setLevelType(String levelType) { + this.levelType = levelType; + } + + public GeographicSubAddressValue name(String name) { + this.name = name; + return this; + } + + /** + * Name of the subAddress to identify it with a meaningful identification + * @return name + */ + + @Schema(name = "name", description = "Name of the subAddress to identify it with a meaningful identification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GeographicSubAddressValue privateStreetName(String privateStreetName) { + this.privateStreetName = privateStreetName; + return this; + } + + /** + * private streets internal to a property (e.g. a university) may have internal names that are not recorded by the land title office. + * @return privateStreetName + */ + + @Schema(name = "privateStreetName", description = "private streets internal to a property (e.g. a university) may have internal names that are not recorded by the land title office.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getPrivateStreetName() { + return privateStreetName; + } + + public void setPrivateStreetName(String privateStreetName) { + this.privateStreetName = privateStreetName; + } + + public GeographicSubAddressValue privateStreetNumber(String privateStreetNumber) { + this.privateStreetNumber = privateStreetNumber; + return this; + } + + /** + * private streets numbers internal to a private street + * @return privateStreetNumber + */ + + @Schema(name = "privateStreetNumber", description = "private streets numbers internal to a private street", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getPrivateStreetNumber() { + return privateStreetNumber; + } + + public void setPrivateStreetNumber(String privateStreetNumber) { + this.privateStreetNumber = privateStreetNumber; + } + + public GeographicSubAddressValue subUnit(List subUnit) { + this.subUnit = subUnit; + return this; + } + + public GeographicSubAddressValue addSubUnitItem(GeographicSubAddressUnit subUnitItem) { + if (this.subUnit == null) { + this.subUnit = new ArrayList<>(); + } + this.subUnit.add(subUnitItem); + return this; + } + + /** + * Representation of a SubUnit. It is used for describing subunit within a subAddress e.g. BERTH, FLAT, PIER, SUITE, SHOP, TOWER, UNIT, WHARF. + * @return subUnit + */ + @Valid + @Schema(name = "subUnit", description = "Representation of a SubUnit. It is used for describing subunit within a subAddress e.g. BERTH, FLAT, PIER, SUITE, SHOP, TOWER, UNIT, WHARF.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public List getSubUnit() { + return subUnit; + } + + public void setSubUnit(List subUnit) { + this.subUnit = subUnit; + } + + public GeographicSubAddressValue subAddressType(String subAddressType) { + this.subAddressType = subAddressType; + return this; + } + + /** + * Type of subAddress : it can be a subunit or a private street + * @return subAddressType + */ + + @Schema(name = "subAddressType", description = "Type of subAddress : it can be a subunit or a private street", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getSubAddressType() { + return subAddressType; + } + + public void setSubAddressType(String subAddressType) { + this.subAddressType = subAddressType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeographicSubAddressValue geographicSubAddressValue = (GeographicSubAddressValue) o; + return Objects.equals(this.type, geographicSubAddressValue.type) && + Objects.equals(this.baseType, geographicSubAddressValue.baseType) && + Objects.equals(this.schemaLocation, geographicSubAddressValue.schemaLocation) && + Objects.equals(this.buildingName, geographicSubAddressValue.buildingName) && + Objects.equals(this.levelNumber, geographicSubAddressValue.levelNumber) && + Objects.equals(this.levelType, geographicSubAddressValue.levelType) && + Objects.equals(this.name, geographicSubAddressValue.name) && + Objects.equals(this.privateStreetName, geographicSubAddressValue.privateStreetName) && + Objects.equals(this.privateStreetNumber, geographicSubAddressValue.privateStreetNumber) && + Objects.equals(this.subUnit, geographicSubAddressValue.subUnit) && + Objects.equals(this.subAddressType, geographicSubAddressValue.subAddressType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, buildingName, levelNumber, levelType, name, privateStreetName, privateStreetNumber, subUnit, subAddressType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicSubAddressValue {\n"); + sb.append(" @type: ").append(toIndentedString(type)).append("\n"); + sb.append(" @baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" @schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" buildingName: ").append(toIndentedString(buildingName)).append("\n"); + sb.append(" levelNumber: ").append(toIndentedString(levelNumber)).append("\n"); + sb.append(" levelType: ").append(toIndentedString(levelType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" privateStreetName: ").append(toIndentedString(privateStreetName)).append("\n"); + sb.append(" privateStreetNumber: ").append(toIndentedString(privateStreetNumber)).append("\n"); + sb.append(" subUnit: ").append(toIndentedString(subUnit)).append("\n"); + sb.append(" subAddressType: ").append(toIndentedString(subAddressType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/HourPeriod.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/HourPeriod.java index d031b83..64f8e13 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/HourPeriod.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/HourPeriod.java @@ -58,9 +58,9 @@ public class HourPeriod extends BaseRootEntity { sb.append("class HourPeriod {\n"); sb.append(" startHour: ").append(toIndentedString(startHour)).append("\n"); sb.append(" endHour: ").append(toIndentedString(endHour)).append("\n"); - sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); - sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" @baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" @schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" @type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/JsonPatch.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/JsonPatch.java new file mode 100644 index 0000000..b648690 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/JsonPatch.java @@ -0,0 +1,201 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + + +/** + * A JSONPatch document as defined by RFC 6902 + */ + +@Schema(name = "JsonPatch", description = "A JSONPatch document as defined by RFC 6902") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class JsonPatch { + + /** + * The operation to be performed + */ + public enum OpEnum { + ADD("add"), + + REMOVE("remove"), + + REPLACE("replace"), + + MOVE("move"), + + COPY("copy"), + + TEST("test"); + + private String value; + + OpEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OpEnum fromValue(String value) { + for (OpEnum b : OpEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + @JsonProperty("op") + private OpEnum op; + @JsonProperty("path") + private String path; + @JsonProperty("value") + private Object value; + @JsonProperty("from") + private String from; + + public JsonPatch() { + super(); + } + + /** + * Constructor with only required parameters + */ + public JsonPatch(OpEnum op, String path) { + this.op = op; + this.path = path; + } + + public JsonPatch op(OpEnum op) { + this.op = op; + return this; + } + + /** + * The operation to be performed + * @return op + */ + @NotNull + @Schema(name = "op", description = "The operation to be performed", requiredMode = Schema.RequiredMode.REQUIRED) + public OpEnum getOp() { + return op; + } + + public void setOp(OpEnum op) { + this.op = op; + } + + public JsonPatch path(String path) { + this.path = path; + return this; + } + + /** + * A JSON-Pointer + * @return path + */ + @NotNull + @Schema(name = "path", description = "A JSON-Pointer", requiredMode = Schema.RequiredMode.REQUIRED) + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public JsonPatch value(Object value) { + this.value = value; + return this; + } + + /** + * The value to be used within the operations. + * @return value + */ + + @Schema(name = "value", description = "The value to be used within the operations.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public Object getValue() { + return value; + } + + public void setValue(Object value) { + this.value = value; + } + + public JsonPatch from(String from) { + this.from = from; + return this; + } + + /** + * A string containing a JSON Pointer value. + * @return from + */ + + @Schema(name = "from", description = "A string containing a JSON Pointer value.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getFrom() { + return from; + } + + public void setFrom(String from) { + this.from = from; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JsonPatch jsonPatch = (JsonPatch) o; + return Objects.equals(this.op, jsonPatch.op) && + Objects.equals(this.path, jsonPatch.path) && + Objects.equals(this.value, jsonPatch.value) && + Objects.equals(this.from, jsonPatch.from); + } + + @Override + public int hashCode() { + return Objects.hash(op, path, value, from); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JsonPatch {\n"); + sb.append(" op: ").append(toIndentedString(op)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" from: ").append(toIndentedString(from)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/PatchGeographicSite200Response.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/PatchGeographicSite200Response.java new file mode 100644 index 0000000..91dc5c3 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/PatchGeographicSite200Response.java @@ -0,0 +1,5 @@ +package org.etsi.osl.tmf.gsm674.model; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface PatchGeographicSite200Response { +} diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRef.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRef.java new file mode 100644 index 0000000..514b147 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRef.java @@ -0,0 +1,223 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +/** + * PlaceRef + */ + + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PlaceRef extends PlaceRefOrValue { + @JsonProperty("id") + private String id; + @JsonProperty("name") + private String name; + @JsonProperty("@referredType") + private String atReferredType; + + @JsonProperty("@schemaLocation") + private String atSchemaLocation; + @JsonProperty("@baseType") + private String atBaseType; + @JsonProperty("@type") + private String atType; + + public PlaceRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + + public PlaceRef id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the referred entity. + * @return id + */ + @NotNull + @Schema(name = "id", description = "Identifier of the referred entity.", requiredMode = Schema.RequiredMode.REQUIRED) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public PlaceRef name(String name) { + this.name = name; + return this; + } + + /** + * Name of the referred entity. + * @return name + */ + + @Schema(name = "name", description = "Name of the referred entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PlaceRef atReferredType(String atReferredType) { + this.atReferredType = atReferredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return atReferredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getAtReferredType() { + return atReferredType; + } + + public void setAtReferredType(String atReferredType) { + this.atReferredType = atReferredType; + } + + public PlaceRef href(String href) { + this.href = href; + return this; + } + + /** + * Hyperlink reference + * @return href + */ + + @Schema(name = "href", description = "Hyperlink reference", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("href") + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public PlaceRef atSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return atSchemaLocation + */ + + @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getAtSchemaLocation() { + return atSchemaLocation; + } + + public void setAtSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + } + + public PlaceRef atBaseType(String atBaseType) { + this.atBaseType = atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return atBaseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getAtBaseType() { + return atBaseType; + } + + public void setAtBaseType(String atBaseType) { + this.atBaseType = atBaseType; + } + + public PlaceRef atType(String atType) { + this.atType = atType; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return atType + */ + + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlaceRef placeRef = (PlaceRef) o; + return Objects.equals(this.id, placeRef.id) && + Objects.equals(this.name, placeRef.name) && + Objects.equals(this.atReferredType, placeRef.atReferredType) && + Objects.equals(this.href, placeRef.href) && + Objects.equals(this.atSchemaLocation, placeRef.atSchemaLocation) && + Objects.equals(this.atBaseType, placeRef.atBaseType) && + Objects.equals(this.atType, placeRef.atType) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, atReferredType, href, atSchemaLocation, atBaseType, atType, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PlaceRef {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" atReferredType: ").append(toIndentedString(atReferredType)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n"); + sb.append(" atType: ").append(toIndentedString(atType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java index 5a63806..b52f3c1 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java @@ -1,63 +1,131 @@ package org.etsi.osl.tmf.gsm674.model; -import com.fasterxml.jackson.annotation.JsonProperty; -import jakarta.persistence.Entity; -import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.common.model.BaseRootEntity; + +/** + * PlaceRefOrValue + */ -@Entity(name="PlaceRefOrValue") -public class PlaceRefOrValue extends BaseRootNamedEntity { - @JsonProperty("id") - private String id; +@JsonIgnoreProperties( + value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the @type to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "@type", visible = true) +@JsonSubTypes({ + @JsonSubTypes.Type(value = GeographicAddressValue.class, name = "GeographicAddressValue"), + @JsonSubTypes.Type(value = PlaceRef.class, name = "PlaceRef"), + @JsonSubTypes.Type(value = PlaceRefOrValue.class, name = "PlaceRefOrValue") +}) - @JsonProperty("@referredType") - private String referredType; +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PlaceRefOrValue extends BaseRootEntity { public PlaceRefOrValue() { + super(); } - public String getId() { - return id; + /** + * Constructor with only required parameters + */ + public PlaceRefOrValue(String atType) { + this.type = atType; } - public void setId(String id) { - this.id = id; + public PlaceRefOrValue atType(String atType) { + this.type = atType; + return this; } - public String getReferredType() { - return referredType; + /** + * When sub-classing, this defines the sub-class Extensible name + * @return atType + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getAtType() { + return type; } - public void setReferredType(String referredType) { - this.referredType = referredType; + public void setAtType(String atType) { + this.type = atType; + } + + public PlaceRefOrValue atBaseType(String atBaseType) { + this.baseType = atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return atBaseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getAtBaseType() { + return baseType; + } + + public void setAtBaseType(String atBaseType) { + this.baseType = atBaseType; + } + + public PlaceRefOrValue atSchemaLocation(String atSchemaLocation) { + this.schemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return atSchemaLocation + */ + + @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@schemaLocation") + public String getAtSchemaLocation() { + return schemaLocation; + } + + public void setAtSchemaLocation(String atSchemaLocation) { + this.schemaLocation = atSchemaLocation; } @Override public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - if (!super.equals(o)) return false; - PlaceRefOrValue that = (PlaceRefOrValue) o; - return Objects.equals(id, that.id) && Objects.equals(referredType, that.referredType); + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlaceRefOrValue placeRefOrValue = (PlaceRefOrValue) o; + return Objects.equals(this.type, placeRefOrValue.type) && + Objects.equals(this.baseType, placeRefOrValue.baseType) && + Objects.equals(this.schemaLocation, placeRefOrValue.schemaLocation); } @Override public int hashCode() { - return Objects.hash(super.hashCode(), id, referredType); + return Objects.hash(type, baseType, schemaLocation); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PlaceRefOrValue {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" @referredType: ").append(toIndentedString(referredType)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); - sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" @type: ").append(toIndentedString(type)).append("\n"); + sb.append(" @baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" @schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); sb.append("}"); return sb.toString(); } @@ -66,10 +134,11 @@ public class PlaceRefOrValue extends BaseRootNamedEntity { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(java.lang.Object o) { + private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } } + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/Reference.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/Reference.java new file mode 100644 index 0000000..dee5203 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/Reference.java @@ -0,0 +1,131 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotNull; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * Reference schema . + */ + +@Schema(name = "Reference", description = "Reference schema .") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class Reference { + @JsonProperty("id") + private String id; + @JsonProperty("name") + private String name; + @JsonProperty("@referredType") + private String atReferredType; + + public Reference() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Reference(String id) { + this.id = id; + } + + public Reference id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the referred entity. + * @return id + */ + @NotNull + @Schema(name = "id", description = "Identifier of the referred entity.", requiredMode = Schema.RequiredMode.REQUIRED) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Reference name(String name) { + this.name = name; + return this; + } + + /** + * Name of the referred entity. + * @return name + */ + + @Schema(name = "name", description = "Name of the referred entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Reference atReferredType(String atReferredType) { + this.atReferredType = atReferredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return atReferredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getAtReferredType() { + return atReferredType; + } + + public void setAtReferredType(String atReferredType) { + this.atReferredType = atReferredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Reference reference = (Reference) o; + return Objects.equals(this.id, reference.id) && + Objects.equals(this.name, reference.name) && + Objects.equals(this.atReferredType, reference.atReferredType); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, atReferredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Reference {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" atReferredType: ").append(toIndentedString(atReferredType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/SchemaContext.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/SchemaContext.java new file mode 100644 index 0000000..7470808 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/SchemaContext.java @@ -0,0 +1,122 @@ +package org.etsi.osl.tmf.gsm674.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +/** + * SchemaContext schema for use in TMForum Open-APIs + */ + +@Schema(name = "SchemaContext", description = "SchemaContext schema for use in TMForum Open-APIs") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class SchemaContext { + + private String atSchemaLocation; + + private String atBaseType; + + private String atType; + + public SchemaContext atSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return atSchemaLocation + */ + + @Schema(name = "@schemaLocation", description = "A URI to a JSON-Schema file that defines additional attributes and relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@schemaLocation") + public String getAtSchemaLocation() { + return atSchemaLocation; + } + + public void setAtSchemaLocation(String atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + } + + public SchemaContext atBaseType(String atBaseType) { + this.atBaseType = atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return atBaseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getAtBaseType() { + return atBaseType; + } + + public void setAtBaseType(String atBaseType) { + this.atBaseType = atBaseType; + } + + public SchemaContext atType(String atType) { + this.atType = atType; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return atType + */ + + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchemaContext schemaContext = (SchemaContext) o; + return Objects.equals(this.atSchemaLocation, schemaContext.atSchemaLocation) && + Objects.equals(this.atBaseType, schemaContext.atBaseType) && + Objects.equals(this.atType, schemaContext.atType); + } + + @Override + public int hashCode() { + return Objects.hash(atSchemaLocation, atBaseType, atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SchemaContext {\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n"); + sb.append(" atType: ").append(toIndentedString(atType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + -- GitLab From 7a02a0ccadd74c7daade73220382ded9f60434aa Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Wed, 1 May 2024 17:41:55 +0300 Subject: [PATCH 6/8] refactor: GeographicAddress part of the place --- .../tmf/gsm674/model/ExternalIdentifier.java | 5 ++- .../model/GeographicSubAddressUnit.java | 6 ++-- .../model/GeographicSubAddressValue.java | 9 ++++-- .../osl/tmf/gsm674/model/PlaceRefOrValue.java | 31 ++++++++++++------- 4 files changed, 35 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/ExternalIdentifier.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/ExternalIdentifier.java index a086f14..2ab966a 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/ExternalIdentifier.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/ExternalIdentifier.java @@ -3,6 +3,8 @@ package org.etsi.osl.tmf.gsm674.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.persistence.Table; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; import org.etsi.osl.tmf.common.model.BaseRootEntity; import io.swagger.v3.oas.annotations.media.Schema; @@ -10,7 +12,8 @@ import io.swagger.v3.oas.annotations.media.Schema; /** * ExternalIdentifier */ - +@Entity(name = "ExternalIdentifier") +@Table(name = "ExternalIdentifier") @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") public class ExternalIdentifier extends BaseRootEntity { @JsonProperty("owner") diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java index fe9529b..c7645eb 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java @@ -3,12 +3,14 @@ package org.etsi.osl.tmf.gsm674.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Table; import jakarta.validation.constraints.NotNull; - +import jakarta.persistence.Entity; /** * GeographicSubAddressUnit */ - +@Entity(name = "GeographicSubAddressUnit") +@Table(name = "GeographicSubAddressUnit") @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") public class GeographicSubAddressUnit { @JsonProperty("@schemaLocation") diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java index 270708d..acb69d2 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java @@ -5,14 +5,18 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.ArrayList; import java.util.List; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.CascadeType; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; - +import jakarta.persistence.Entity; /** * GeographicSubAddressValue */ - +@Entity(name = "GeographicSubAddressValue") +@Table(name = "GeographicSubAddressValue") @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") public class GeographicSubAddressValue { @JsonProperty("@type") @@ -36,6 +40,7 @@ public class GeographicSubAddressValue { @Valid @JsonProperty("subUnit") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) private List subUnit = new ArrayList<>(); @JsonProperty("subAddressType") private String subAddressType; diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java index b52f3c1..f0daca2 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java @@ -8,6 +8,10 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToOne; +import jakarta.persistence.Table; import jakarta.validation.constraints.NotNull; import org.etsi.osl.tmf.common.model.BaseRootEntity; @@ -26,13 +30,22 @@ import org.etsi.osl.tmf.common.model.BaseRootEntity; @JsonSubTypes.Type(value = PlaceRefOrValue.class, name = "PlaceRefOrValue") }) +@Table(name = "PlaceRefOrValue") +@Entity(name = "PlaceRefOrValue") @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") public class PlaceRefOrValue extends BaseRootEntity { + @JsonProperty("geographicAddress") + @OneToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private GeographicAddressValue geographicAddressValue; public PlaceRefOrValue() { super(); } + public PlaceRefOrValue(GeographicAddressValue geographicAddressValue) { + this.geographicAddressValue = geographicAddressValue; + } + /** * Constructor with only required parameters */ @@ -102,21 +115,16 @@ public class PlaceRefOrValue extends BaseRootEntity { @Override public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PlaceRefOrValue placeRefOrValue = (PlaceRefOrValue) o; - return Objects.equals(this.type, placeRefOrValue.type) && - Objects.equals(this.baseType, placeRefOrValue.baseType) && - Objects.equals(this.schemaLocation, placeRefOrValue.schemaLocation); + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + if (!super.equals(o)) return false; + PlaceRefOrValue that = (PlaceRefOrValue) o; + return Objects.equals(geographicAddressValue, that.geographicAddressValue); } @Override public int hashCode() { - return Objects.hash(type, baseType, schemaLocation); + return Objects.hash(geographicAddressValue); } @Override @@ -126,6 +134,7 @@ public class PlaceRefOrValue extends BaseRootEntity { sb.append(" @type: ").append(toIndentedString(type)).append("\n"); sb.append(" @baseType: ").append(toIndentedString(baseType)).append("\n"); sb.append(" @schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" geographicAddress: ").append(toIndentedString(geographicAddressValue)).append("\n"); sb.append("}"); return sb.toString(); } -- GitLab From e02c3856e6982cd8ab85469b467e75c25e599ed2 Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Thu, 2 May 2024 15:50:46 +0300 Subject: [PATCH 7/8] fixing entity relationships --- .../osl/tmf/gsm674/model/GeographicAddressValue.java | 3 +++ .../etsi/osl/tmf/gsm674/model/GeographicSite.java | 1 + .../tmf/gsm674/model/GeographicSubAddressUnit.java | 12 ++++-------- .../tmf/gsm674/model/GeographicSubAddressValue.java | 10 +++------- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicAddressValue.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicAddressValue.java index 94b74d4..3b44ca6 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicAddressValue.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicAddressValue.java @@ -6,7 +6,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; +import jakarta.persistence.OneToOne; import jakarta.validation.Valid; @@ -37,6 +39,7 @@ public class GeographicAddressValue extends PlaceRefOrValue { @JsonProperty("streetType") private String streetType; @JsonProperty("geographicSubAddress") + @OneToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) private GeographicSubAddressValue geographicSubAddress; @JsonProperty("city") private String city; diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java index 889e318..893daea 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java @@ -27,6 +27,7 @@ public class GeographicSite extends BaseRootEntity implements PatchGeographicSit @JsonProperty("status") private String status; @JsonProperty("externalIdentifier") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) private List externalIdentifier = new ArrayList<>(); @JsonProperty("calendar") @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java index c7645eb..06545f9 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java @@ -6,20 +6,16 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.persistence.Table; import jakarta.validation.constraints.NotNull; import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootEntity; + /** * GeographicSubAddressUnit */ @Entity(name = "GeographicSubAddressUnit") @Table(name = "GeographicSubAddressUnit") @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") -public class GeographicSubAddressUnit { - @JsonProperty("@schemaLocation") - private String schemaLocation; - @JsonProperty("@baseType") - private String baseType; - @JsonProperty("@type") - private String type; - @JsonProperty("subUnitNumber") +public class GeographicSubAddressUnit extends BaseRootEntity { + @JsonProperty("subUnitNumber") private String subUnitNumber; @JsonProperty("subUnitType") private String subUnitType; diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java index acb69d2..e1ad6e9 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java @@ -11,6 +11,8 @@ import jakarta.persistence.Table; import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootEntity; + /** * GeographicSubAddressValue */ @@ -18,13 +20,7 @@ import jakarta.persistence.Entity; @Entity(name = "GeographicSubAddressValue") @Table(name = "GeographicSubAddressValue") @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") -public class GeographicSubAddressValue { - @JsonProperty("@type") - private String type; - @JsonProperty("@baseType") - private String baseType; - @JsonProperty("@schemaLocation") - private String schemaLocation; +public class GeographicSubAddressValue extends BaseRootEntity { @JsonProperty("buildingName") private String buildingName; @JsonProperty("levelNumber") -- GitLab From bc173ac00540d01dcc93063ba4350e231cf4ee2d Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Mon, 13 May 2024 18:06:31 +0300 Subject: [PATCH 8/8] Change the entity names to be shorter + add description --- .../etsi/osl/tmf/gsm674/model/GeographicSiteEventPayload.java | 4 ++-- .../etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java | 4 ++-- .../etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteEventPayload.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteEventPayload.java index ce9ab0c..0aa1bcf 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteEventPayload.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteEventPayload.java @@ -6,10 +6,10 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; /** - * TBD + * The event data structure */ -@Schema(name = "GeographicSiteEventPayload", description = "TBD") +@Schema(name = "GeographicSiteEventPayload", description = "The event data structure") @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") public class GeographicSiteEventPayload { @JsonProperty("geographicSite") diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java index 06545f9..bf8b22b 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java @@ -11,8 +11,8 @@ import org.etsi.osl.tmf.common.model.BaseRootEntity; /** * GeographicSubAddressUnit */ -@Entity(name = "GeographicSubAddressUnit") -@Table(name = "GeographicSubAddressUnit") +@Entity(name = "GeoSubAddUnit") +@Table(name = "GeoSubAddUnit") @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") public class GeographicSubAddressUnit extends BaseRootEntity { @JsonProperty("subUnitNumber") diff --git a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java index e1ad6e9..2c99740 100644 --- a/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java @@ -17,8 +17,8 @@ import org.etsi.osl.tmf.common.model.BaseRootEntity; * GeographicSubAddressValue */ -@Entity(name = "GeographicSubAddressValue") -@Table(name = "GeographicSubAddressValue") +@Entity(name = "GeoSubAddVal") +@Table(name = "GeoSubAddVal") @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-24T14:24:54.867613034Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") public class GeographicSubAddressValue extends BaseRootEntity { @JsonProperty("buildingName") -- GitLab