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 0000000000000000000000000000000000000000..ed79fa3f2345d5e31815f6259880a627b2357bf8 --- /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 0000000000000000000000000000000000000000..8f8f0f382e70c89fa2731c6e8943573d0fa1ce1e --- /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 new file mode 100644 index 0000000000000000000000000000000000000000..094b5063e356452c821179e5bfda80990f3e4ff6 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/CalendarPeriod.java @@ -0,0 +1,202 @@ +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.ArrayList; +import java.util.List; +import java.util.Objects; + +@Entity(name="CalendarPeriod") +public class CalendarPeriod extends BaseRootEntity { + @JsonProperty("day") + private String day; + @JsonProperty("status") + private String status; + @JsonProperty("timeZone") + private String timeZone; + @JsonProperty("id") + private String id; + @Valid + @JsonProperty("hourPeriod") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + 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; + } + + public void setDay(String day) { + this.day = day; + } + + public CalendarPeriod timeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * 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; + } + + public void setTimeZone(String timeZone) { + this.timeZone = timeZone; + } + + 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(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; + } + 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(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(" hourPeriod: ").append(toIndentedString(hourPeriod)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/Entity.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/Entity.java new file mode 100644 index 0000000000000000000000000000000000000000..0a6826fbe09c62026504dc57fe144e10c6baf4a3 --- /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 0000000000000000000000000000000000000000..9faa3fe8320be7338e7b32c46ab8b5feb460cddb --- /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 0000000000000000000000000000000000000000..c37bd8c3ec753689b127eee2b2e2096bda69b4a6 --- /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 0000000000000000000000000000000000000000..9f321f35b7bdbba18750133c43f76226336afcc5 --- /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 0000000000000000000000000000000000000000..10b1f8f63c6470c4c8b7b38ffb7cae27e855a465 --- /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 0000000000000000000000000000000000000000..47cbea6ff255b8efadfd763a7a25744f27ba01b8 --- /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 0000000000000000000000000000000000000000..2ab966ab68e7ce403d1d7eba5e9c660891e01238 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/ExternalIdentifier.java @@ -0,0 +1,145 @@ +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; + +/** + * 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") + 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 0000000000000000000000000000000000000000..3b44ca672546da70ac3f1109c7dce72940c9de23 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicAddressValue.java @@ -0,0 +1,386 @@ +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.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToOne; +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") + @OneToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + 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 new file mode 100644 index 0000000000000000000000000000000000000000..893daeae7079b61d5ed1113d2f2d83fa7d304a53 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSite.java @@ -0,0 +1,319 @@ +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 org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.prm669.model.RelatedParty; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +@Entity(name = "GeographicSite") +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") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private List externalIdentifier = new ArrayList<>(); + @JsonProperty("calendar") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private List calendar = new ArrayList<>(); + @JsonProperty("place") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private List place = new ArrayList<>(); + @JsonProperty("siteRelationship") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private List siteRelationship = new ArrayList<>(); + @JsonProperty("relatedParty") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private List relatedParty = new ArrayList<>(); + + + public GeographicSite() { + super(); + } + + + public GeographicSite 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 GeographicSite 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 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; + } + + public void setDescription(String description) { + 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; + } + + public void setStatus(String status) { + this.status = status; + } + + 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(List calendar) { + this.calendar = calendar; + } + + 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 GeographicSite 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; + } + 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); + } + + @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(" ").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(" 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/GeographicSiteAttributeValueChangeEvent.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteAttributeValueChangeEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..d1e1c4dba349defdd0e6bd2ba0b692a5fc583fc3 --- /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 0000000000000000000000000000000000000000..fe8e5a14bfc1c2445b65b09c2b8bdcdd2844c1ae --- /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 0000000000000000000000000000000000000000..3d9cb0aa88accc8fc03e8fb004cfac08173b90c2 --- /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 0000000000000000000000000000000000000000..38ea867010f3faa80dd4da4c03e9b09599c3bd92 --- /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 0000000000000000000000000000000000000000..0aa1bcf9bf811093ef23c019a24e198b4539316a --- /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; + +/** + * The event data structure + */ + +@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") + 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 new file mode 100644 index 0000000000000000000000000000000000000000..8b6aa141fc77c36559f8d58864417a307e5a7b77 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteRelationship.java @@ -0,0 +1,162 @@ +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; + +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() { + super(); + } + + /** + * 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; + } + + public void setRole(String role) { + 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; + } + + public void setId(String id) { + this.id = id; + } + + public GeographicSiteRelationship relationshipType(String relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + /** + * 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; + } + 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(schemaLocation, baseType, type, href, role, validFor, id, relationshipType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GeographicSiteRelationship {\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(" relationshipType: ").append(toIndentedString(relationshipType)).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/GeographicSiteStateChangeEvent.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSiteStateChangeEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..7cefeb5581657072ed0e12cc6c83e9cfa4240d27 --- /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 0000000000000000000000000000000000000000..5bf6c837b543cce3e3d0d4b08f9f475bace16d2e --- /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 0000000000000000000000000000000000000000..bf8b22b0b88241e3bf017c8df55972c911106683 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressUnit.java @@ -0,0 +1,175 @@ +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; +import org.etsi.osl.tmf.common.model.BaseRootEntity; + +/** + * 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") + 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 0000000000000000000000000000000000000000..2c997407675c8600361dffd1083ee4a447f4da64 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/GeographicSubAddressValue.java @@ -0,0 +1,329 @@ +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.persistence.CascadeType; +import jakarta.persistence.OneToMany; +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 + */ + +@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") + 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") + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + 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 new file mode 100644 index 0000000000000000000000000000000000000000..64f8e13661cf315cb299058f6e4232f26f62c827 --- /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/JsonPatch.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/JsonPatch.java new file mode 100644 index 0000000000000000000000000000000000000000..b648690d5b511122eea2b0b89e1e70705b62b954 --- /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 0000000000000000000000000000000000000000..91dc5c3345eb968aaf43922b5028302322140cb0 --- /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 0000000000000000000000000000000000000000..514b147835de83778fbdf1ee613813e912e97743 --- /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 new file mode 100644 index 0000000000000000000000000000000000000000..f0daca2ac63b8777a9aad83a8bc7e0a7bc1bbb53 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/gsm674/model/PlaceRefOrValue.java @@ -0,0 +1,153 @@ +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.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; + +/** + * PlaceRefOrValue + */ + +@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") +}) + +@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 + */ + public PlaceRefOrValue(String atType) { + this.type = atType; + } + + public PlaceRefOrValue 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 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(geographicAddressValue, that.geographicAddressValue); + } + + @Override + public int hashCode() { + return Objects.hash(geographicAddressValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PlaceRefOrValue {\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(" geographicAddress: ").append(toIndentedString(geographicAddressValue)).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/Reference.java b/src/main/java/org/etsi/osl/tmf/gsm674/model/Reference.java new file mode 100644 index 0000000000000000000000000000000000000000..dee520367795feabf059a8c1162d92f036faf464 --- /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 0000000000000000000000000000000000000000..7470808f10f8df6390705864465378b013d1c988 --- /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 "); + } +} +