diff --git a/.gitignore b/.gitignore index 59419d57edec3ba08708209cd4b803363221ccfd..00277efa677def512f6f3d954d2204aadc20d188 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ /.project /.classpath /.settings +*.iml +/.factorypath diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3d872f628da12898f872b41465d9794dfc5c0684..3f669e27a7079fdd5a208bcb1fa754ba00491cc4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,7 @@ include: - ci-templates/default.yml - ci-templates/build.yml rules: - - if: '$CI_COMMIT_REF_PROTECTED && $CI_COMMIT_REF_NAME != "main" && $CI_COMMIT_REF_NAME != "develop"' + - if: '$CI_COMMIT_REF_PROTECTED == "true" && $CI_COMMIT_REF_NAME != "main" && $CI_COMMIT_REF_NAME != "develop"' - project: osl/code/org.etsi.osl.main ref: develop @@ -29,7 +29,7 @@ include: - ci-templates/default.yml - ci-templates/build_unprotected.yml rules: - - if: '$CI_COMMIT_REF_NAME != "main" && $CI_COMMIT_REF_NAME != "develop" && !$CI_COMMIT_REF_PROTECTED' + - if: '$CI_COMMIT_REF_NAME != "main" && $CI_COMMIT_REF_NAME != "develop" && $CI_COMMIT_REF_PROTECTED == "false"' maven_build: extends: .maven_build diff --git a/README.md b/README.md index c89970778f4675c76df99f80248db352493b3a4e..53bcdba495e00ccc2ebadfa8453f574763e04eb4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # org.etsi.osl.model.tmf - - ## Getting started To make it easy for you to get started with GitLab, here's a list of recommended next steps. @@ -44,6 +42,7 @@ Use the built-in continuous integration in GitLab. *** + # Editing this README When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template. diff --git a/pom.xml b/pom.xml index e38a41b319ba1bfbf6e4b684dbe8c5eb090c8280..41e388ecded44b09008f04dbd8226c4313abb79e 100644 --- a/pom.xml +++ b/pom.xml @@ -3,11 +3,13 @@ <parent> <groupId>org.etsi.osl</groupId> <artifactId>org.etsi.osl.main</artifactId> - <version>1.0.0</version> + <version>2024Q4</version> <relativePath>../org.etsi.osl.main</relativePath> </parent> + <artifactId>org.etsi.osl.model.tmf</artifactId> + <version>${org.etsi.osl.model.tmf.version}</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> @@ -17,12 +19,17 @@ <springdoc.version>${springdoc-version}</springdoc.version> <mapstruct.version>1.5.3.Final</mapstruct.version> </properties> + <repositories> <repository> <id>gitlab-maven</id> <url>https://labs.etsi.org/rep/api/v4/groups/260/-/packages/maven</url> </repository> + <repository> + <id>jitpack.io</id> + <url>https://jitpack.io</url> + </repository> </repositories> <distributionManagement> <repository> @@ -65,6 +72,11 @@ <groupId>com.fasterxml.jackson.datatype</groupId> <artifactId>jackson-datatype-hibernate5-jakarta</artifactId> </dependency> + <dependency> + <groupId>org.openapitools</groupId> + <artifactId>jackson-databind-nullable</artifactId> + <version>0.2.6</version> + </dependency> <!-- swagger --> <dependency> @@ -84,6 +96,23 @@ <artifactId>mapstruct-processor</artifactId> <version>${mapstruct.version}</version> </dependency> + <dependency> + <groupId>javax.annotation</groupId> + <artifactId>javax.annotation-api</artifactId> + <version>1.3.2</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>jakarta.validation</groupId> + <artifactId>jakarta.validation-api</artifactId> + <version>3.0.2</version> + </dependency> + <dependency> + <groupId>org.jetbrains</groupId> + <artifactId>annotations</artifactId> + <version>13.0</version> + <scope>compile</scope> + </dependency> </dependencies> <build> diff --git a/src/main/java/org/etsi/osl/tmf/am651/model/Agreement.java b/src/main/java/org/etsi/osl/tmf/am651/model/Agreement.java index 9dd3e97092120a576b480efaa8957f9c4a42f9d2..113259c06b764c6cc3e1083ca718d826e01e2987 100644 --- a/src/main/java/org/etsi/osl/tmf/am651/model/Agreement.java +++ b/src/main/java/org/etsi/osl/tmf/am651/model/Agreement.java @@ -26,6 +26,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import org.etsi.osl.tmf.common.model.TimePeriod; +import org.etsi.osl.tmf.common.model.service.Characteristic; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/am651/model/AgreementCreate.java b/src/main/java/org/etsi/osl/tmf/am651/model/AgreementCreate.java index 841688a9cf84e16e3c7756af5644b1dfbfe28c3c..02f5906d63b5dda4c31c6fc826bf320766ebd146 100644 --- a/src/main/java/org/etsi/osl/tmf/am651/model/AgreementCreate.java +++ b/src/main/java/org/etsi/osl/tmf/am651/model/AgreementCreate.java @@ -26,6 +26,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import org.etsi.osl.tmf.common.model.TimePeriod; +import org.etsi.osl.tmf.common.model.service.Characteristic; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/am651/model/AgreementItem.java b/src/main/java/org/etsi/osl/tmf/am651/model/AgreementItem.java index a07440a16ef1a71e1628f7fc55ad6674544411e9..17a37426d8c3180b245ec3a201c9bb952244be86 100644 --- a/src/main/java/org/etsi/osl/tmf/am651/model/AgreementItem.java +++ b/src/main/java/org/etsi/osl/tmf/am651/model/AgreementItem.java @@ -24,7 +24,7 @@ import java.util.List; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.pcm620.model.ProductOfferingRef; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/org/etsi/osl/tmf/am651/model/AgreementUpdate.java b/src/main/java/org/etsi/osl/tmf/am651/model/AgreementUpdate.java index b98ce9b6f5106c869a2bf53c4ecd93fdb5a0f813..c3a349813d041a6a425896a9d7ba3a9b20496286 100644 --- a/src/main/java/org/etsi/osl/tmf/am651/model/AgreementUpdate.java +++ b/src/main/java/org/etsi/osl/tmf/am651/model/AgreementUpdate.java @@ -26,6 +26,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import org.etsi.osl.tmf.common.model.TimePeriod; +import org.etsi.osl.tmf.common.model.service.Characteristic; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/am651/model/Characteristic.java b/src/main/java/org/etsi/osl/tmf/am651/model/Characteristic.java deleted file mode 100644 index b00b36d00f59c54925af803122ee4bf98a09f6ff..0000000000000000000000000000000000000000 --- a/src/main/java/org/etsi/osl/tmf/am651/model/Characteristic.java +++ /dev/null @@ -1,175 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.am651.model; - -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import org.springframework.validation.annotation.Validated; - -import io.swagger.v3.oas.annotations.media.Schema; - -/** - * Describes a given characteristic of an object or entity through a name/value pair. - */ -@Schema(description = "Describes a given characteristic of an object or entity through a name/value pair.") -@Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-10-19T23:51:58.660+03:00") - -public class Characteristic { - @JsonProperty("name") - private String name = null; - - @JsonProperty("value") - private String value = null; - - @JsonProperty("@type") - private String type = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - public Characteristic name(String name) { - this.name = name; - return this; - } - - /** - * Name of the characteristic - * @return name - **/ - @Schema(description = "Name of the characteristic") - - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Characteristic value(String value) { - this.value = value; - return this; - } - - /** - * Value of the characteristic - * @return value - **/ - @Schema(description = "Value of the characteristic") - - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public Characteristic type(String type) { - this.type = type; - return this; - } - - /** - * The class type of the actual resource (for type extension). - * @return type - **/ - @Schema(description = "The class type of the actual resource (for type extension).") - - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public Characteristic schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * A link to the schema describing a resource (for type extension). - * @return schemaLocation - **/ - @Schema(description = "A link to the schema describing a resource (for type extension).") - - - public String getSchemaLocation() { - return schemaLocation; - } - - public void setSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Characteristic characteristic = (Characteristic) o; - return Objects.equals(this.name, characteristic.name) && - Objects.equals(this.value, characteristic.value) && - Objects.equals(this.type, characteristic.type) && - Objects.equals(this.schemaLocation, characteristic.schemaLocation); - } - - @Override - public int hashCode() { - return Objects.hash(name, value, type, schemaLocation); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Characteristic {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).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/am651/model/ProductOfferingRef.java b/src/main/java/org/etsi/osl/tmf/am651/model/ProductOfferingRef.java deleted file mode 100644 index 07b20c4d6cf69676c23c1c73aefcbaccb6f11d62..0000000000000000000000000000000000000000 --- a/src/main/java/org/etsi/osl/tmf/am651/model/ProductOfferingRef.java +++ /dev/null @@ -1,175 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.am651.model; - -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import org.springframework.validation.annotation.Validated; - -import io.swagger.v3.oas.annotations.media.Schema; - -/** - * ProductOffering reference. A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information. - */ -@Schema(description = "ProductOffering reference. A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information.") -@Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-10-19T23:51:58.660+03:00") - -public class ProductOfferingRef { - @JsonProperty("href") - private String href = null; - - @JsonProperty("id") - private String id = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("@referredType") - private String referredType = null; - - public ProductOfferingRef href(String href) { - this.href = href; - return this; - } - - /** - * Reference of the product offering - * @return href - **/ - @Schema(description = "Reference of the product offering") - - - public String getHref() { - return href; - } - - public void setHref(String href) { - this.href = href; - } - - public ProductOfferingRef id(String id) { - this.id = id; - return this; - } - - /** - * Unique identifier of the product offering - * @return id - **/ - @Schema(description = "Unique identifier of the product offering") - - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public ProductOfferingRef name(String name) { - this.name = name; - return this; - } - - /** - * Name of the product offering - * @return name - **/ - @Schema(description = "Name of the product offering") - - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ProductOfferingRef referredType(String referredType) { - this.referredType = referredType; - return this; - } - - /** - * The actual type of the target instance when needed for disambiguation. - * @return referredType - **/ - @Schema(description = "The actual type of the target instance when needed for disambiguation.") - - - public String getReferredType() { - return referredType; - } - - public void setReferredType(String referredType) { - this.referredType = referredType; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProductOfferingRef productOfferingRef = (ProductOfferingRef) o; - return Objects.equals(this.href, productOfferingRef.href) && - Objects.equals(this.id, productOfferingRef.id) && - Objects.equals(this.name, productOfferingRef.name) && - Objects.equals(this.referredType, productOfferingRef.referredType); - } - - @Override - public int hashCode() { - return Objects.hash(href, id, name, referredType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProductOfferingRef {\n"); - - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" referredType: ").append(toIndentedString(referredType)).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/common/model/Addressable.java b/src/main/java/org/etsi/osl/tmf/common/model/Addressable.java new file mode 100644 index 0000000000000000000000000000000000000000..6b3ab2da79f20625e45a0808532ae6ddbd1bcd2f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/common/model/Addressable.java @@ -0,0 +1,104 @@ +package org.etsi.osl.tmf.common.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.net.URI; +import java.util.Objects; + +/** + * Base schema for adressable entities + */ + +@Schema(name = "Addressable", description = "Base schema for adressable entities") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-25T11:17:58.147516734Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class Addressable { + + private String id; + + private URI href; + + public Addressable id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Addressable href(URI href) { + this.href = href; + return this; + } + + /** + * Hyperlink reference + * + * @return href + */ + @Valid + @Schema(name = "href", description = "Hyperlink reference", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("href") + public URI getHref() { + return href; + } + + public void setHref(URI href) { + this.href = href; + } + + @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.id, addressable.id) && + Objects.equals(this.href, addressable.href); + } + + @Override + public int hashCode() { + return Objects.hash(id, href); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Addressable {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\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/common/model/Entity.java b/src/main/java/org/etsi/osl/tmf/common/model/Entity.java new file mode 100644 index 0000000000000000000000000000000000000000..ad2a081b1427232b3d7ec8cc70affabbd63d6e4a --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/common/model/Entity.java @@ -0,0 +1,179 @@ +package org.etsi.osl.tmf.common.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.net.URI; +import java.util.Objects; + +/** + * Base entity schema for use in TMForum Open-APIs + */ + +@Schema(name = "Entity", description = "Base entity schema for use in TMForum Open-APIs") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-25T11:17:58.147516734Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class Entity { + + private String id; + + private URI href; + + private String atBaseType; + + private URI atSchemaLocation; + + private String atType; + + public Entity id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Entity href(URI href) { + this.href = href; + return this; + } + + /** + * Hyperlink reference + * + * @return href + */ + @Valid + @Schema(name = "href", description = "Hyperlink reference", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("href") + public URI getHref() { + return href; + } + + public void setHref(URI href) { + this.href = href; + } + + 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) + @JsonProperty("@baseType") + public String getAtBaseType() { + return atBaseType; + } + + public void setAtBaseType(String atBaseType) { + this.atBaseType = atBaseType; + } + + public Entity atSchemaLocation(URI atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * + * @return atSchemaLocation + */ + @Valid + @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 URI getAtSchemaLocation() { + return atSchemaLocation; + } + + public void setAtSchemaLocation(URI atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + } + + public Entity 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; + } + Entity entity = (Entity) o; + return Objects.equals(this.id, entity.id) && + Objects.equals(this.href, entity.href) && + Objects.equals(this.atBaseType, entity.atBaseType) && + Objects.equals(this.atSchemaLocation, entity.atSchemaLocation) && + Objects.equals(this.atType, entity.atType); + } + + @Override + public int hashCode() { + return Objects.hash(id, href, atBaseType, atSchemaLocation, atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Entity {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).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/common/model/EntityRef.java b/src/main/java/org/etsi/osl/tmf/common/model/EntityRef.java new file mode 100644 index 0000000000000000000000000000000000000000..b3d5ffe6a12308410d11263311bc0730e3d45ba9 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/common/model/EntityRef.java @@ -0,0 +1,241 @@ +package org.etsi.osl.tmf.common.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.net.URI; +import java.util.Objects; + +/** + * Entity reference schema to be use for all entityRef class. + */ + +@Schema(name = "EntityRef", description = "Entity reference schema to be use for all entityRef class.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-25T11:17:58.147516734Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class EntityRef { + + private String id; + + private URI href; + + private String name; + + private String atBaseType; + + private URI atSchemaLocation; + + private String atType; + + private String atReferredType; + + public EntityRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EntityRef(String id) { + this.id = id; + } + + public EntityRef id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * + * @return id + */ + @NotNull + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public EntityRef href(URI href) { + this.href = href; + return this; + } + + /** + * Hyperlink reference + * + * @return href + */ + @Valid + @Schema(name = "href", description = "Hyperlink reference", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("href") + public URI getHref() { + return href; + } + + public void setHref(URI href) { + this.href = href; + } + + public EntityRef name(String name) { + this.name = name; + return this; + } + + /** + * Name of the related entity. + * + * @return name + */ + + @Schema(name = "name", description = "Name of the related entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public EntityRef 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 EntityRef atSchemaLocation(URI atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * + * @return atSchemaLocation + */ + @Valid + @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 URI getAtSchemaLocation() { + return atSchemaLocation; + } + + public void setAtSchemaLocation(URI atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + } + + public EntityRef 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; + } + + public EntityRef 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) + @JsonProperty("@referredType") + 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; + } + EntityRef entityRef = (EntityRef) o; + return Objects.equals(this.id, entityRef.id) && + Objects.equals(this.href, entityRef.href) && + Objects.equals(this.name, entityRef.name) && + Objects.equals(this.atBaseType, entityRef.atBaseType) && + Objects.equals(this.atSchemaLocation, entityRef.atSchemaLocation) && + Objects.equals(this.atType, entityRef.atType) && + Objects.equals(this.atReferredType, entityRef.atReferredType); + } + + @Override + public int hashCode() { + return Objects.hash(id, href, name, atBaseType, atSchemaLocation, atType, atReferredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityRef {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n"); + sb.append(" atType: ").append(toIndentedString(atType)).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/common/model/Error.java b/src/main/java/org/etsi/osl/tmf/common/model/Error.java new file mode 100644 index 0000000000000000000000000000000000000000..7c868d35875a5a26dea8b1b594b9f85da3ceabee --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/common/model/Error.java @@ -0,0 +1,267 @@ +package org.etsi.osl.tmf.common.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.net.URI; +import java.util.Objects; + +/** + * 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)") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-04-25T11:17:58.147516734Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class Error { + + private String code; + + private String reason; + + private String message; + + private String status; + + private URI referenceError; + + private String atBaseType; + + private URI atSchemaLocation; + + private String atType; + + public Error() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Error(String code, String reason) { + 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) + @JsonProperty("code") + 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) + @JsonProperty("reason") + 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) + @JsonProperty("message") + 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) + @JsonProperty("status") + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Error referenceError(URI referenceError) { + this.referenceError = referenceError; + return this; + } + + /** + * URI of documentation describing the error. + * + * @return referenceError + */ + @Valid + @Schema(name = "referenceError", description = "URI of documentation describing the error.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("referenceError") + public URI getReferenceError() { + return referenceError; + } + + public void setReferenceError(URI referenceError) { + this.referenceError = referenceError; + } + + public Error 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 Error atSchemaLocation(URI atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * + * @return atSchemaLocation + */ + @Valid + @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 URI getAtSchemaLocation() { + return atSchemaLocation; + } + + public void setAtSchemaLocation(URI atSchemaLocation) { + this.atSchemaLocation = atSchemaLocation; + } + + public Error atType(String atType) { + this.atType = atType; + return this; + } + + /** + * When sub-classing, this defines the sub-class entity name. + * + * @return atType + */ + + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class entity 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; + } + Error error = (Error) o; + return 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) && + Objects.equals(this.atBaseType, error.atBaseType) && + Objects.equals(this.atSchemaLocation, error.atSchemaLocation) && + Objects.equals(this.atType, error.atType); + } + + @Override + public int hashCode() { + return Objects.hash(code, reason, message, status, referenceError, atBaseType, atSchemaLocation, atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Error {\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(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).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/pcm620/model/ProductOffering.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOffering.java index 1efa62fc6e8035777bc63d69cdf43c779505608e..8abd61749c0450f44b8887d167c6b48a24ab4766 100644 --- a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOffering.java +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOffering.java @@ -111,22 +111,22 @@ public class ProductOffering extends BaseEntity { private Set<ProductOfferingTerm> productOfferingTerm = new HashSet<>(); @JsonProperty("productSpecification") - @OneToOne( cascade = {CascadeType.MERGE, CascadeType.DETACH} ) + @OneToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) @JoinColumn(referencedColumnName = "uuid") private ProductSpecificationRef productSpecification = null; @JsonProperty("resourceCandidate") - @OneToOne( cascade = {CascadeType.MERGE, CascadeType.DETACH} ) + @OneToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) @JoinColumn(referencedColumnName = "uuid") private ResourceCandidateRef resourceCandidate = null; @JsonProperty("serviceCandidate") - @OneToOne( cascade = {CascadeType.MERGE, CascadeType.DETACH} ) + @OneToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) @JoinColumn(referencedColumnName = "uuid") private ServiceCandidateRef serviceCandidate = null; @JsonProperty("serviceLevelAgreement") - @OneToOne( cascade = {CascadeType.MERGE, CascadeType.DETACH} ) + @OneToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) @JoinColumn(referencedColumnName = "uuid") private SLARef serviceLevelAgreement = null; @@ -734,5 +734,14 @@ public class ProductOffering extends BaseEntity { return o.toString().replace("\n", "\n "); } + public Object findCharacteristicByName(String aname) { + for (ProductSpecificationCharacteristicValueUse ssci : this.prodSpecCharValueUse ) { + if (ssci.getName()!=null && ssci.getName().equals(aname)) { + return ssci; + } + } + return null; + } + } diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingRef.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingRef.java index dd47df1336aa92cf9a7754785c0a7872e7706f21..616d8c31c7e284da215529090555918c9b528982 100644 --- a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingRef.java +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingRef.java @@ -26,6 +26,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; /** @@ -35,6 +36,7 @@ import jakarta.validation.constraints.NotNull; @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-10-19T00:15:57.249+03:00") @JsonIgnoreProperties( {"uuid"} ) +@Entity(name = "ProdOffref620") public class ProductOfferingRef extends BaseRootNamedEntity { diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecification.java index 3e0944658e7bd296b23d4b802a440dc86cdb3f44..9260c44ac2ef7e2cf3e8e5849a4327bbed49ceab 100644 --- a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecification.java +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecification.java @@ -29,6 +29,7 @@ import org.etsi.osl.tmf.common.model.BaseEntity; import org.etsi.osl.tmf.common.model.service.ServiceSpecificationRef; import org.etsi.osl.tmf.prm669.model.RelatedParty; import org.etsi.osl.tmf.rcm634.model.ResourceSpecificationRef; +import org.etsi.osl.tmf.scm633.model.ServiceSpecCharacteristic; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.persistence.CascadeType; @@ -521,4 +522,13 @@ public class ProductSpecification extends BaseEntity { } return o.toString().replace("\n", "\n "); } + + public ProductSpecificationCharacteristic findProdCharacteristicByName(String an) { + for (ProductSpecificationCharacteristic ssci : this.getProductSpecCharacteristic()) { + if (ssci.getName()!=null && ssci.getName().equals(an)) { + return ssci; + } + } + return null; + } } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/BillingAccountRef.java b/src/main/java/org/etsi/osl/tmf/pim637/model/BillingAccountRef.java similarity index 94% rename from src/main/java/org/etsi/osl/tmf/po622/model/BillingAccountRef.java rename to src/main/java/org/etsi/osl/tmf/pim637/model/BillingAccountRef.java index 5dd0323895b435b2590568adc6f58f171b212a1d..0a30fb73c42490c5181986f3d0d1065d39dec6a1 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/BillingAccountRef.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/BillingAccountRef.java @@ -17,15 +17,14 @@ * limitations under the License. * =========================LICENSE_END================================== */ -package org.etsi.osl.tmf.po622.model; +package org.etsi.osl.tmf.pim637.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; /** @@ -34,24 +33,12 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "BillingAccount reference. A BillingAccount is a detailed description of a bill structure.") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class BillingAccountRef { - @JsonProperty("id") - private String id = null; - @JsonProperty("href") - private String href = null; - @JsonProperty("name") - private String name = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; +@Entity(name = "BillingAccRef622") +public class BillingAccountRef extends BaseRootNamedEntity { + @JsonProperty("id") + private String id = null; @JsonProperty("@referredType") private String _atReferredType = null; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/EntityRef.java b/src/main/java/org/etsi/osl/tmf/pim637/model/EntityRef.java similarity index 64% rename from src/main/java/org/etsi/osl/tmf/po622/model/EntityRef.java rename to src/main/java/org/etsi/osl/tmf/pim637/model/EntityRef.java index 97784a5b973ec5087a7b4fcf740e23cc2e9af79d..600dbe9af461bc4c3d5379dfe2960c5369f7a0c4 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/EntityRef.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/EntityRef.java @@ -1,30 +1,8 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; +package org.etsi.osl.tmf.pim637.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; @@ -33,7 +11,9 @@ import jakarta.validation.constraints.NotNull; */ @Schema(description = "Entity reference schema to be use for all entityRef class.") @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + public class EntityRef { @JsonProperty("id") private String id = null; @@ -45,13 +25,13 @@ public class EntityRef { private String name = null; @JsonProperty("@baseType") - private String baseType = null; + private String _atBaseType = null; @JsonProperty("@schemaLocation") - private String schemaLocation = null; + private String _atSchemaLocation = null; @JsonProperty("@type") - private String type = null; + private String _atType = null; @JsonProperty("@referredType") private String _atReferredType = null; @@ -64,8 +44,8 @@ public class EntityRef { /** * Unique identifier of a related entity. * @return id - **/ - @Schema(description = "Unique identifier of a related entity.") + **/ + @Schema(required = true, description = "Unique identifier of a related entity.") @NotNull public String getId() { @@ -84,9 +64,10 @@ public class EntityRef { /** * Reference of the related entity. * @return href - **/ + **/ @Schema(description = "Reference of the related entity.") - + @NotNull + public String getHref() { return href; } @@ -103,9 +84,10 @@ public class EntityRef { /** * Name of the related entity. * @return name - **/ + **/ @Schema(description = "Name of the related entity.") - + @NotNull + public String getName() { return name; } @@ -114,61 +96,64 @@ public class EntityRef { this.name = name; } - public EntityRef baseType(String baseType) { - this.baseType = baseType; + public EntityRef _atBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; return this; } /** * When sub-classing, this defines the super-class - * @return baseType - **/ + * @return _atBaseType + **/ @Schema(description = "When sub-classing, this defines the super-class") - + @NotNull + public String getAtBaseType() { - return baseType; + return _atBaseType; } - public void setAtBaseType(String baseType) { - this.baseType = baseType; + public void setAtBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; } - public EntityRef schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; + public EntityRef _atSchemaLocation(String _atSchemaLocation) { + this._atSchemaLocation = _atSchemaLocation; return this; } /** * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ + * @return _atSchemaLocation + **/ @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - + @NotNull + public String getAtSchemaLocation() { - return schemaLocation; + return _atSchemaLocation; } - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; + public void setAtSchemaLocation(String _atSchemaLocation) { + this._atSchemaLocation = _atSchemaLocation; } - public EntityRef type(String type) { - this.type = type; + public EntityRef _atType(String _atType) { + this._atType = _atType; return this; } /** * When sub-classing, this defines the sub-class entity name - * @return type - **/ + * @return _atType + **/ @Schema(description = "When sub-classing, this defines the sub-class entity name") - + @NotNull + public String getAtType() { - return type; + return _atType; } - public void setAtType(String type) { - this.type = type; + public void setAtType(String _atType) { + this._atType = _atType; } public EntityRef _atReferredType(String _atReferredType) { @@ -179,9 +164,10 @@ public class EntityRef { /** * The actual type of the target instance when needed for disambiguation. * @return _atReferredType - **/ + **/ @Schema(description = "The actual type of the target instance when needed for disambiguation.") - + @NotNull + public String getAtReferredType() { return _atReferredType; } @@ -203,15 +189,15 @@ public class EntityRef { return Objects.equals(this.id, entityRef.id) && Objects.equals(this.href, entityRef.href) && Objects.equals(this.name, entityRef.name) && - Objects.equals(this.baseType, entityRef.baseType) && - Objects.equals(this.schemaLocation, entityRef.schemaLocation) && - Objects.equals(this.type, entityRef.type) && + Objects.equals(this._atBaseType, entityRef._atBaseType) && + Objects.equals(this._atSchemaLocation, entityRef._atSchemaLocation) && + Objects.equals(this._atType, entityRef._atType) && Objects.equals(this._atReferredType, entityRef._atReferredType); } @Override public int hashCode() { - return Objects.hash(id, href, name, baseType, schemaLocation, type, _atReferredType); + return Objects.hash(id, href, name, _atBaseType, _atSchemaLocation, _atType, _atReferredType); } @Override @@ -222,9 +208,9 @@ public class EntityRef { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" href: ").append(toIndentedString(href)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).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(" _atBaseType: ").append(toIndentedString(_atBaseType)).append("\n"); + sb.append(" _atSchemaLocation: ").append(toIndentedString(_atSchemaLocation)).append("\n"); + sb.append(" _atType: ").append(toIndentedString(_atType)).append("\n"); sb.append(" _atReferredType: ").append(toIndentedString(_atReferredType)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/Error.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Error.java new file mode 100644 index 0000000000000000000000000000000000000000..e13ea9a4bec6ec5f7dc740f16212dfa2b1134ece --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/Error.java @@ -0,0 +1,254 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +/** + * Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx) + */ +@Schema(description = "Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class Error { + @JsonProperty("code") + private String code = null; + + @JsonProperty("reason") + private String reason = null; + + @JsonProperty("message") + private String message = null; + + @JsonProperty("status") + private String status = null; + + @JsonProperty("referenceError") + private String referenceError = null; + + @JsonProperty("@baseType") + private String _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = null; + + public Error code(String code) { + this.code = code; + return this; + } + + /** + * Application relevant detail, defined in the API or a common list. + * @return code + **/ + @Schema(required = true, description = "Application relevant detail, defined in the API or a common list.") + @NotNull + + 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 + **/ + @Schema(required = true, description = "Explanation of the reason for the error which can be shown to a client user.") + @NotNull + + 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(description = "More details and corrective actions related to the error which can be shown to a client user.") + @NotNull + + 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(description = "HTTP Error code extension") + @NotNull + + 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(description = "URI of documentation describing the error.") + @NotNull + + public String getReferenceError() { + return referenceError; + } + + public void setReferenceError(String referenceError) { + this.referenceError = referenceError; + } + + public Error _atBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class. + * @return _atBaseType + **/ + @Schema(description = "When sub-classing, this defines the super-class.") + @NotNull + + public String getAtBaseType() { + return _atBaseType; + } + + public void setAtBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; + } + + public Error _atSchemaLocation(String _atSchemaLocation) { + this._atSchemaLocation = _atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return _atSchemaLocation + **/ + @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") + @NotNull + + public String getAtSchemaLocation() { + return _atSchemaLocation; + } + + public void setAtSchemaLocation(String _atSchemaLocation) { + this._atSchemaLocation = _atSchemaLocation; + } + + public Error _atType(String _atType) { + this._atType = _atType; + return this; + } + + /** + * When sub-classing, this defines the sub-class entity name. + * @return _atType + **/ + @Schema(description = "When sub-classing, this defines the sub-class entity name.") + @NotNull + + public String getAtType() { + return _atType; + } + + public void setAtType(String _atType) { + this._atType = _atType; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error error = (Error) o; + return 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) && + Objects.equals(this._atBaseType, error._atBaseType) && + Objects.equals(this._atSchemaLocation, error._atSchemaLocation) && + Objects.equals(this._atType, error._atType); + } + + @Override + public int hashCode() { + return Objects.hash(code, reason, message, status, referenceError, _atBaseType, _atSchemaLocation, _atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Error {\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(" _atBaseType: ").append(toIndentedString(_atBaseType)).append("\n"); + sb.append(" _atSchemaLocation: ").append(toIndentedString(_atSchemaLocation)).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(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/pim637/model/EventSubscription.java b/src/main/java/org/etsi/osl/tmf/pim637/model/EventSubscription.java new file mode 100644 index 0000000000000000000000000000000000000000..1d272920e640fe22b0834c4f176dca7aa4516c5a --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/EventSubscription.java @@ -0,0 +1,129 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.validation.annotation.Validated; +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(description = "Sets the communication endpoint address the service instance must use to deliver notification information") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class EventSubscription { + @JsonProperty("id") + private String id = null; + + @JsonProperty("callback") + private String callback = null; + + @JsonProperty("query") + private String query = null; + + public EventSubscription id(String id) { + this.id = id; + return this; + } + + /** + * Id of the listener + * @return id + **/ + @Schema(required = true, description = "Id of the listener") + @NotNull + + 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 + **/ + @Schema(required = true, description = "The callback being registered.") + @NotNull + + 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(description = "additional data to be passed") + @NotNull + + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + + @Override + public boolean equals(java.lang.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(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/pim637/model/EventSubscriptionInput.java b/src/main/java/org/etsi/osl/tmf/pim637/model/EventSubscriptionInput.java new file mode 100644 index 0000000000000000000000000000000000000000..2561f945670ca1178b490e411fbdf41c6132bf85 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/EventSubscriptionInput.java @@ -0,0 +1,104 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.validation.annotation.Validated; +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(description = "Sets the communication endpoint address the service instance must use to deliver notification information") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class EventSubscriptionInput { + @JsonProperty("callback") + private String callback = null; + + @JsonProperty("query") + private String query = null; + + public EventSubscriptionInput callback(String callback) { + this.callback = callback; + return this; + } + + /** + * The callback being registered. + * @return callback + **/ + @Schema(required = true, description = "The callback being registered.") + @NotNull + + 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(description = "additional data to be passed") + @NotNull + + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + + @Override + public boolean equals(java.lang.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(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/po622/model/Money.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Money.java similarity index 69% rename from src/main/java/org/etsi/osl/tmf/po622/model/Money.java rename to src/main/java/org/etsi/osl/tmf/pim637/model/Money.java index 3e92fbf16c72573df5d511163adbff235dbf4777..446fa97b97d827175fc593aeae9d32ed30fb271f 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/Money.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/Money.java @@ -1,39 +1,22 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; +package org.etsi.osl.tmf.pim637.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; +import jakarta.validation.constraints.NotNull; /** * A base / value business entity used to represent money */ @Schema(description = "A base / value business entity used to represent money") @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class Money { +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + +@Entity(name = "Money637") +public class Money extends BaseRootEntity { @JsonProperty("unit") private String unit = null; @@ -48,9 +31,10 @@ public class Money { /** * Currency (ISO4217 norm uses 3 letters to define the currency) * @return unit - **/ + **/ @Schema(description = "Currency (ISO4217 norm uses 3 letters to define the currency)") - + @NotNull + public String getUnit() { return unit; } @@ -67,9 +51,10 @@ public class Money { /** * A positive floating point number * @return value - **/ + **/ @Schema(description = "A positive floating point number") - + @NotNull + public Float getValue() { return value; } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/Place.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Place.java similarity index 62% rename from src/main/java/org/etsi/osl/tmf/po622/model/Place.java rename to src/main/java/org/etsi/osl/tmf/pim637/model/Place.java index 62c96891b445614dd888083ee2f247ec50e55b39..7b98f7dc6bd27f8ae12d0a109cb5efc14cdba467 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/Place.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/Place.java @@ -1,38 +1,19 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; +package org.etsi.osl.tmf.pim637.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; /** * Place reference. Place defines the places where the products are sold or delivered. */ @Schema(description = "Place reference. Place defines the places where the products are sold or delivered.") @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + public class Place { @JsonProperty("id") private String id = null; @@ -44,13 +25,13 @@ public class Place { private String name = null; @JsonProperty("@baseType") - private String baseType = null; + private String _atBaseType = null; @JsonProperty("@schemaLocation") - private String schemaLocation = null; + private String _atSchemaLocation = null; @JsonProperty("@type") - private String type = null; + private String _atType = null; public Place id(String id) { this.id = id; @@ -60,9 +41,10 @@ public class Place { /** * Unique identifier of the place * @return id - **/ + **/ @Schema(description = "Unique identifier of the place") - + @NotNull + public String getId() { return id; } @@ -79,9 +61,10 @@ public class Place { /** * Unique reference of the place * @return href - **/ + **/ @Schema(description = "Unique reference of the place") - + @NotNull + public String getHref() { return href; } @@ -98,9 +81,10 @@ public class Place { /** * A user-friendly name for the place, such as [Paris Store], [London Store], [Main Home] * @return name - **/ + **/ @Schema(description = "A user-friendly name for the place, such as [Paris Store], [London Store], [Main Home]") - + @NotNull + public String getName() { return name; } @@ -109,61 +93,64 @@ public class Place { this.name = name; } - public Place baseType(String baseType) { - this.baseType = baseType; + public Place _atBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; return this; } /** * When sub-classing, this defines the super-class - * @return baseType - **/ + * @return _atBaseType + **/ @Schema(description = "When sub-classing, this defines the super-class") - + @NotNull + public String getAtBaseType() { - return baseType; + return _atBaseType; } - public void setAtBaseType(String baseType) { - this.baseType = baseType; + public void setAtBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; } - public Place schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; + public Place _atSchemaLocation(String _atSchemaLocation) { + this._atSchemaLocation = _atSchemaLocation; return this; } /** * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ + * @return _atSchemaLocation + **/ @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - + @NotNull + public String getAtSchemaLocation() { - return schemaLocation; + return _atSchemaLocation; } - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; + public void setAtSchemaLocation(String _atSchemaLocation) { + this._atSchemaLocation = _atSchemaLocation; } - public Place type(String type) { - this.type = type; + public Place _atType(String _atType) { + this._atType = _atType; return this; } /** * When sub-classing, this defines the sub-class entity name - * @return type - **/ + * @return _atType + **/ @Schema(description = "When sub-classing, this defines the sub-class entity name") - + @NotNull + public String getAtType() { - return type; + return _atType; } - public void setAtType(String type) { - this.type = type; + public void setAtType(String _atType) { + this._atType = _atType; } @@ -179,14 +166,14 @@ public class Place { return Objects.equals(this.id, place.id) && Objects.equals(this.href, place.href) && Objects.equals(this.name, place.name) && - Objects.equals(this.baseType, place.baseType) && - Objects.equals(this.schemaLocation, place.schemaLocation) && - Objects.equals(this.type, place.type); + Objects.equals(this._atBaseType, place._atBaseType) && + Objects.equals(this._atSchemaLocation, place._atSchemaLocation) && + Objects.equals(this._atType, place._atType); } @Override public int hashCode() { - return Objects.hash(id, href, name, baseType, schemaLocation, type); + return Objects.hash(id, href, name, _atBaseType, _atSchemaLocation, _atType); } @Override @@ -197,9 +184,9 @@ public class Place { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" href: ").append(toIndentedString(href)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).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(" _atBaseType: ").append(toIndentedString(_atBaseType)).append("\n"); + sb.append(" _atSchemaLocation: ").append(toIndentedString(_atSchemaLocation)).append("\n"); + sb.append(" _atType: ").append(toIndentedString(_atType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/Price.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Price.java similarity index 67% rename from src/main/java/org/etsi/osl/tmf/po622/model/Price.java rename to src/main/java/org/etsi/osl/tmf/pim637/model/Price.java index e1c950d7cbaa6eebc0234078bbe7542faf8a3605..c4f2d69eb4c3f56aac92d57d37aa9216ed129ec6 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/Price.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/Price.java @@ -1,40 +1,26 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; +package org.etsi.osl.tmf.pim637.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToOne; import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; /** * Provides all amounts (tax included, duty free, tax rate), used currency and percentage to apply for Price Alteration. */ @Schema(description = "Provides all amounts (tax included, duty free, tax rate), used currency and percentage to apply for Price Alteration.") @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class Price { +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +@Entity(name = "Price637") +public class Price extends BaseRootEntity { @JsonProperty("percentage") private Float percentage = null; @@ -42,19 +28,21 @@ public class Price { private Float taxRate = null; @JsonProperty("dutyFreeAmount") + @OneToOne(cascade = CascadeType.ALL) private Money dutyFreeAmount = null; @JsonProperty("taxIncludedAmount") + @OneToOne(cascade = CascadeType.ALL) private Money taxIncludedAmount = null; @JsonProperty("@baseType") - private String baseType = null; + private String _atBaseType = null; @JsonProperty("@schemaLocation") - private String schemaLocation = null; + private String _atSchemaLocation = null; @JsonProperty("@type") - private String type = null; + private String _atType = null; public Price percentage(Float percentage) { this.percentage = percentage; @@ -64,9 +52,10 @@ public class Price { /** * Percentage to apply for ProdOfferPriceAlteration * @return percentage - **/ + **/ @Schema(description = "Percentage to apply for ProdOfferPriceAlteration") - + @NotNull + public Float getPercentage() { return percentage; } @@ -83,9 +72,10 @@ public class Price { /** * Tax rate * @return taxRate - **/ + **/ @Schema(description = "Tax rate") - + @NotNull + public Float getTaxRate() { return taxRate; } @@ -102,9 +92,10 @@ public class Price { /** * Get dutyFreeAmount * @return dutyFreeAmount - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public Money getDutyFreeAmount() { return dutyFreeAmount; @@ -122,9 +113,10 @@ public class Price { /** * Get taxIncludedAmount * @return taxIncludedAmount - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public Money getTaxIncludedAmount() { return taxIncludedAmount; @@ -134,61 +126,64 @@ public class Price { this.taxIncludedAmount = taxIncludedAmount; } - public Price baseType(String baseType) { - this.baseType = baseType; + public Price _atBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; return this; } /** * When sub-classing, this defines the super-class - * @return baseType - **/ + * @return _atBaseType + **/ @Schema(description = "When sub-classing, this defines the super-class") - + @NotNull + public String getAtBaseType() { - return baseType; + return _atBaseType; } - public void setAtBaseType(String baseType) { - this.baseType = baseType; + public void setAtBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; } - public Price schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; + public Price _atSchemaLocation(String _atSchemaLocation) { + this._atSchemaLocation = _atSchemaLocation; return this; } /** * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ + * @return _atSchemaLocation + **/ @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - + @NotNull + public String getAtSchemaLocation() { - return schemaLocation; + return _atSchemaLocation; } - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; + public void setAtSchemaLocation(String _atSchemaLocation) { + this._atSchemaLocation = _atSchemaLocation; } - public Price type(String type) { - this.type = type; + public Price _atType(String _atType) { + this._atType = _atType; return this; } /** * When sub-classing, this defines the sub-class entity name - * @return type - **/ + * @return _atType + **/ @Schema(description = "When sub-classing, this defines the sub-class entity name") - + @NotNull + public String getAtType() { - return type; + return _atType; } - public void setAtType(String type) { - this.type = type; + public void setAtType(String _atType) { + this._atType = _atType; } @@ -205,14 +200,14 @@ public class Price { Objects.equals(this.taxRate, price.taxRate) && Objects.equals(this.dutyFreeAmount, price.dutyFreeAmount) && Objects.equals(this.taxIncludedAmount, price.taxIncludedAmount) && - Objects.equals(this.baseType, price.baseType) && - Objects.equals(this.schemaLocation, price.schemaLocation) && - Objects.equals(this.type, price.type); + Objects.equals(this._atBaseType, price._atBaseType) && + Objects.equals(this._atSchemaLocation, price._atSchemaLocation) && + Objects.equals(this._atType, price._atType); } @Override public int hashCode() { - return Objects.hash(percentage, taxRate, dutyFreeAmount, taxIncludedAmount, baseType, schemaLocation, type); + return Objects.hash(percentage, taxRate, dutyFreeAmount, taxIncludedAmount, _atBaseType, _atSchemaLocation, _atType); } @Override @@ -224,9 +219,9 @@ public class Price { sb.append(" taxRate: ").append(toIndentedString(taxRate)).append("\n"); sb.append(" dutyFreeAmount: ").append(toIndentedString(dutyFreeAmount)).append("\n"); sb.append(" taxIncludedAmount: ").append(toIndentedString(taxIncludedAmount)).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(" _atBaseType: ").append(toIndentedString(_atBaseType)).append("\n"); + sb.append(" _atSchemaLocation: ").append(toIndentedString(_atSchemaLocation)).append("\n"); + sb.append(" _atType: ").append(toIndentedString(_atType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/PriceAlteration.java b/src/main/java/org/etsi/osl/tmf/pim637/model/PriceAlteration.java similarity index 72% rename from src/main/java/org/etsi/osl/tmf/po622/model/PriceAlteration.java rename to src/main/java/org/etsi/osl/tmf/pim637/model/PriceAlteration.java index 5efe9e755634b6d00bca3967c6ceb0d023b74e86..75c3805993c5572b7d3123deea5f94c5f844f0a3 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/PriceAlteration.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/PriceAlteration.java @@ -1,31 +1,15 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; +package org.etsi.osl.tmf.pim637.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; +import org.etsi.osl.tmf.pcm620.model.ProductOfferingPriceRef; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToOne; import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; @@ -34,17 +18,16 @@ import jakarta.validation.constraints.NotNull; */ @Schema(description = "Is an amount, usually of money, that modifies the price charged for an order item.") @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class PriceAlteration { +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + +@Entity(name = "PriceAlter637") +public class PriceAlteration extends BaseRootNamedEntity { @JsonProperty("applicationDuration") private Integer applicationDuration = null; @JsonProperty("description") private String description = null; - @JsonProperty("name") - private String name = null; - @JsonProperty("priceType") private String priceType = null; @@ -58,20 +41,13 @@ public class PriceAlteration { private String unitOfMeasure = null; @JsonProperty("price") + @OneToOne(cascade = CascadeType.ALL) private Price price = null; @JsonProperty("productOfferingPrice") + @OneToOne(cascade = CascadeType.ALL) private ProductOfferingPriceRef productOfferingPrice = null; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; - public PriceAlteration applicationDuration(Integer applicationDuration) { this.applicationDuration = applicationDuration; return this; @@ -80,9 +56,10 @@ public class PriceAlteration { /** * Duration during which the alteration applies on the order item price (for instance 2 months free of charge for the recurring charge) * @return applicationDuration - **/ + **/ @Schema(description = "Duration during which the alteration applies on the order item price (for instance 2 months free of charge for the recurring charge)") - + @NotNull + public Integer getApplicationDuration() { return applicationDuration; } @@ -99,9 +76,10 @@ public class PriceAlteration { /** * A narrative that explains in detail the semantics of this order item price alteration * @return description - **/ + **/ @Schema(description = "A narrative that explains in detail the semantics of this order item price alteration") - + @NotNull + public String getDescription() { return description; } @@ -118,9 +96,10 @@ public class PriceAlteration { /** * Name of the order item price alteration * @return name - **/ + **/ @Schema(description = "Name of the order item price alteration") - + @NotNull + public String getName() { return name; } @@ -137,8 +116,8 @@ public class PriceAlteration { /** * A category that describes the price such as recurring, one time and usage. * @return priceType - **/ - @Schema(description = "A category that describes the price such as recurring, one time and usage.") + **/ + @Schema(required = true, description = "A category that describes the price such as recurring, one time and usage.") @NotNull public String getPriceType() { @@ -157,9 +136,10 @@ public class PriceAlteration { /** * Priority level for applying this alteration among all the defined alterations on the order item price * @return priority - **/ + **/ @Schema(description = "Priority level for applying this alteration among all the defined alterations on the order item price") - + @NotNull + public Integer getPriority() { return priority; } @@ -176,9 +156,10 @@ public class PriceAlteration { /** * Could be month, week... * @return recurringChargePeriod - **/ + **/ @Schema(description = "Could be month, week...") - + @NotNull + public String getRecurringChargePeriod() { return recurringChargePeriod; } @@ -195,9 +176,10 @@ public class PriceAlteration { /** * Could be minutes, GB... * @return unitOfMeasure - **/ + **/ @Schema(description = "Could be minutes, GB...") - + @NotNull + public String getUnitOfMeasure() { return unitOfMeasure; } @@ -214,8 +196,8 @@ public class PriceAlteration { /** * Get price * @return price - **/ - @Schema(description = "") + **/ + @Schema(required = true, description = "") @NotNull @Valid @@ -235,9 +217,10 @@ public class PriceAlteration { /** * Get productOfferingPrice * @return productOfferingPrice - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public ProductOfferingPriceRef getProductOfferingPrice() { return productOfferingPrice; @@ -247,62 +230,6 @@ public class PriceAlteration { this.productOfferingPrice = productOfferingPrice; } - public PriceAlteration baseType(String baseType) { - this.baseType = baseType; - return this; - } - - /** - * When sub-classing, this defines the super-class - * @return baseType - **/ - @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { - return baseType; - } - - public void setAtBaseType(String baseType) { - this.baseType = baseType; - } - - public PriceAlteration schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - public String getAtSchemaLocation() { - return schemaLocation; - } - - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - public PriceAlteration type(String type) { - this.type = type; - return this; - } - - /** - * When sub-classing, this defines the sub-class entity name - * @return type - **/ - @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { - return type; - } - - public void setAtType(String type) { - this.type = type; - } @Override @@ -347,9 +274,9 @@ public class PriceAlteration { sb.append(" unitOfMeasure: ").append(toIndentedString(unitOfMeasure)).append("\n"); sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" productOfferingPrice: ").append(toIndentedString(productOfferingPrice)).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(" _atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" _atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" _atType: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/Product.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java similarity index 69% rename from src/main/java/org/etsi/osl/tmf/po622/model/Product.java rename to src/main/java/org/etsi/osl/tmf/pim637/model/Product.java index ee4c02bd2fe8e7b724a442d82d235c4929d458a0..75b40a5ca0d816940ab97f77866a0abb2cf936bc 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/Product.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java @@ -1,138 +1,138 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; +package org.etsi.osl.tmf.pim637.model; -import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Date; +import java.util.HashSet; import java.util.List; import java.util.Objects; - +import java.util.Set; import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; +import org.etsi.osl.tmf.common.model.service.Characteristic; import org.etsi.osl.tmf.common.model.service.ResourceRef; import org.etsi.osl.tmf.common.model.service.ServiceRef; +import org.etsi.osl.tmf.pcm620.model.ProductOfferingRef; +import org.etsi.osl.tmf.pcm620.model.ProductSpecificationRef; +import org.etsi.osl.tmf.po622.model.AgreementItemRef; +import org.etsi.osl.tmf.po622.model.RelatedProductOrderItem; import org.etsi.osl.tmf.prm669.model.RelatedParty; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OneToOne; import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; /** * A product offering procured by a customer or other interested party playing a party role. A product is realized as one or more service(s) and / or resource(s). */ @Schema(description = "A product offering procured by a customer or other interested party playing a party role. A product is realized as one or more service(s) and / or resource(s).") @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class Product { +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + +@Entity(name = "Product637") +public class Product extends BaseRootNamedEntity { @JsonProperty("id") - private String id = null; + protected String id = null; - @JsonProperty("href") - private String href = null; @JsonProperty("description") - private String description = null; + protected String description = null; @JsonProperty("isBundle") - private Boolean isBundle = null; + protected Boolean isBundle = null; @JsonProperty("isCustomerVisible") - private Boolean isCustomerVisible = null; - - @JsonProperty("name") - private String name = null; + protected Boolean isCustomerVisible = null; @JsonProperty("orderDate") - private OffsetDateTime orderDate = null; + protected Date orderDate = null; @JsonProperty("productSerialNumber") - private String productSerialNumber = null; + protected String productSerialNumber = null; @JsonProperty("startDate") - private OffsetDateTime startDate = null; + protected Date startDate = null; @JsonProperty("terminationDate") - private OffsetDateTime terminationDate = null; + protected Date terminationDate = null; @JsonProperty("agreement") @Valid - private List<AgreementItemRef> agreement = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set<AgreementItemRef> agreement = new HashSet<>(); @JsonProperty("billingAccount") - private BillingAccountRef billingAccount = null; + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "billing_acc_refuuid", referencedColumnName = "uuid") + protected BillingAccountRef billingAccount = null; @JsonProperty("place") @Valid - private List<RelatedPlaceRefOrValue> place = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set<RelatedPlaceRefOrValue> place = new HashSet<>(); @JsonProperty("product") @Valid - private List<ProductRefOrValue> product = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set<ProductRefOrValue> product = new HashSet<>(); @JsonProperty("productCharacteristic") @Valid - private List<Characteristic> productCharacteristic = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set<Characteristic> productCharacteristic = new HashSet<>(); @JsonProperty("productOffering") - private ProductOfferingRef productOffering = null; + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "prodoff_refuuid", referencedColumnName = "uuid") + protected ProductOfferingRef productOffering = null; @JsonProperty("productOrderItem") @Valid - private List<RelatedProductOrderItem> productOrderItem = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set<RelatedProductOrderItem> productOrderItem = new HashSet<>(); @JsonProperty("productPrice") @Valid - private List<ProductPrice> productPrice = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set<ProductPrice> productPrice = new HashSet<>(); @JsonProperty("productRelationship") @Valid - private List<ProductRelationship> productRelationship = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set<ProductRelationship> productRelationship = new HashSet<>(); @JsonProperty("productSpecification") - private ProductSpecificationRef productSpecification = null; + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "prodspec_refuuid", referencedColumnName = "uuid") + protected ProductSpecificationRef productSpecification = null; @JsonProperty("productTerm") @Valid - private List<ProductTerm> productTerm = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set<ProductTerm> productTerm = new HashSet<>(); @JsonProperty("realizingResource") @Valid - private List<ResourceRef> realizingResource = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set<ResourceRef> realizingResource = new HashSet<>(); @JsonProperty("realizingService") @Valid - private List<ServiceRef> realizingService = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set<ServiceRef> realizingService = new HashSet<>(); @JsonProperty("relatedParty") @Valid - private List<RelatedParty> relatedParty = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set<RelatedParty> relatedParty = new HashSet<>(); @JsonProperty("status") - private ProductStatusType status = null; + protected ProductStatusType status = null; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; public Product id(String id) { this.id = id; @@ -142,9 +142,10 @@ public class Product { /** * Unique identifier of the product * @return id - **/ + **/ @Schema(description = "Unique identifier of the product") - + @NotNull + public String getId() { return id; } @@ -161,9 +162,10 @@ public class Product { /** * Reference of the product * @return href - **/ + **/ @Schema(description = "Reference of the product") - + @NotNull + public String getHref() { return href; } @@ -180,9 +182,10 @@ public class Product { /** * Is the description of the product. It could be copied from the description of the Product Offering. * @return description - **/ + **/ @Schema(description = "Is the description of the product. It could be copied from the description of the Product Offering.") - + @NotNull + public String getDescription() { return description; } @@ -199,9 +202,10 @@ public class Product { /** * If true, the product is a ProductBundle which is an instantiation of a BundledProductOffering. If false, the product is a ProductComponent which is an instantiation of a SimpleProductOffering. * @return isBundle - **/ + **/ @Schema(description = "If true, the product is a ProductBundle which is an instantiation of a BundledProductOffering. If false, the product is a ProductComponent which is an instantiation of a SimpleProductOffering.") - + @NotNull + public Boolean isIsBundle() { return isBundle; } @@ -218,9 +222,10 @@ public class Product { /** * If true, the product is visible by the customer. * @return isCustomerVisible - **/ + **/ @Schema(description = "If true, the product is visible by the customer.") - + @NotNull + public Boolean isIsCustomerVisible() { return isCustomerVisible; } @@ -237,9 +242,10 @@ public class Product { /** * Name of the product. It could be the same as the name of the product offering * @return name - **/ + **/ @Schema(description = "Name of the product. It could be the same as the name of the product offering") - + @NotNull + public String getName() { return name; } @@ -248,7 +254,7 @@ public class Product { this.name = name; } - public Product orderDate(OffsetDateTime orderDate) { + public Product orderDate(Date orderDate) { this.orderDate = orderDate; return this; } @@ -256,15 +262,16 @@ public class Product { /** * Is the date when the product was ordered * @return orderDate - **/ + **/ @Schema(description = "Is the date when the product was ordered") - + @NotNull + @Valid - public OffsetDateTime getOrderDate() { + public Date getOrderDate() { return orderDate; } - public void setOrderDate(OffsetDateTime orderDate) { + public void setOrderDate(Date orderDate) { this.orderDate = orderDate; } @@ -276,9 +283,10 @@ public class Product { /** * Is the serial number for the product. This is typically applicable to tangible products e.g. Broadband Router. * @return productSerialNumber - **/ + **/ @Schema(description = "Is the serial number for the product. This is typically applicable to tangible products e.g. Broadband Router.") - + @NotNull + public String getProductSerialNumber() { return productSerialNumber; } @@ -287,7 +295,7 @@ public class Product { this.productSerialNumber = productSerialNumber; } - public Product startDate(OffsetDateTime startDate) { + public Product startDate(Date startDate) { this.startDate = startDate; return this; } @@ -295,19 +303,20 @@ public class Product { /** * Is the date from which the product starts * @return startDate - **/ + **/ @Schema(description = "Is the date from which the product starts") - + @NotNull + @Valid - public OffsetDateTime getStartDate() { + public Date getStartDate() { return startDate; } - public void setStartDate(OffsetDateTime startDate) { + public void setStartDate(Date startDate) { this.startDate = startDate; } - public Product terminationDate(OffsetDateTime terminationDate) { + public Product terminationDate(Date terminationDate) { this.terminationDate = terminationDate; return this; } @@ -315,26 +324,27 @@ public class Product { /** * Is the date when the product was terminated * @return terminationDate - **/ + **/ @Schema(description = "Is the date when the product was terminated") - + @NotNull + @Valid - public OffsetDateTime getTerminationDate() { + public Date getTerminationDate() { return terminationDate; } - public void setTerminationDate(OffsetDateTime terminationDate) { + public void setTerminationDate(Date terminationDate) { this.terminationDate = terminationDate; } - public Product agreement(List<AgreementItemRef> agreement) { + public Product agreement(Set<AgreementItemRef> agreement) { this.agreement = agreement; return this; } public Product addAgreementItem(AgreementItemRef agreementItem) { if (this.agreement == null) { - this.agreement = new ArrayList<>(); + this.agreement = new HashSet<AgreementItemRef>(); } this.agreement.add(agreementItem); return this; @@ -343,14 +353,15 @@ public class Product { /** * Get agreement * @return agreement - **/ + **/ @Schema(description = "") - @Valid - public List<AgreementItemRef> getAgreement() { + @NotNull + @Valid + public Set<AgreementItemRef> getAgreement() { return agreement; } - public void setAgreement(List<AgreementItemRef> agreement) { + public void setAgreement(Set<AgreementItemRef> agreement) { this.agreement = agreement; } @@ -362,9 +373,10 @@ public class Product { /** * Get billingAccount * @return billingAccount - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public BillingAccountRef getBillingAccount() { return billingAccount; @@ -374,14 +386,14 @@ public class Product { this.billingAccount = billingAccount; } - public Product place(List<RelatedPlaceRefOrValue> place) { + public Product place(Set<RelatedPlaceRefOrValue> place) { this.place = place; return this; } public Product addPlaceItem(RelatedPlaceRefOrValue placeItem) { if (this.place == null) { - this.place = new ArrayList<>(); + this.place = new HashSet<RelatedPlaceRefOrValue>(); } this.place.add(placeItem); return this; @@ -390,25 +402,26 @@ public class Product { /** * Get place * @return place - **/ + **/ @Schema(description = "") - @Valid - public List<RelatedPlaceRefOrValue> getPlace() { + @NotNull + @Valid + public Set<RelatedPlaceRefOrValue> getPlace() { return place; } - public void setPlace(List<RelatedPlaceRefOrValue> place) { + public void setPlace(Set<RelatedPlaceRefOrValue> place) { this.place = place; } - public Product product(List<ProductRefOrValue> product) { + public Product product(Set<ProductRefOrValue> product) { this.product = product; return this; } public Product addProductItem(ProductRefOrValue productItem) { if (this.product == null) { - this.product = new ArrayList<>(); + this.product = new HashSet<ProductRefOrValue>(); } this.product.add(productItem); return this; @@ -417,25 +430,26 @@ public class Product { /** * Get product * @return product - **/ + **/ @Schema(description = "") - @Valid - public List<ProductRefOrValue> getProduct() { + @NotNull + @Valid + public Set<ProductRefOrValue> getProduct() { return product; } - public void setProduct(List<ProductRefOrValue> product) { + public void setProduct(Set<ProductRefOrValue> product) { this.product = product; } - public Product productCharacteristic(List<Characteristic> productCharacteristic) { + public Product productCharacteristic(Set<Characteristic> productCharacteristic) { this.productCharacteristic = productCharacteristic; return this; } public Product addProductCharacteristicItem(Characteristic productCharacteristicItem) { if (this.productCharacteristic == null) { - this.productCharacteristic = new ArrayList<>(); + this.productCharacteristic = new HashSet<Characteristic>(); } this.productCharacteristic.add(productCharacteristicItem); return this; @@ -444,14 +458,15 @@ public class Product { /** * Get productCharacteristic * @return productCharacteristic - **/ + **/ @Schema(description = "") - @Valid - public List<Characteristic> getProductCharacteristic() { + @NotNull + @Valid + public Set<Characteristic> getProductCharacteristic() { return productCharacteristic; } - public void setProductCharacteristic(List<Characteristic> productCharacteristic) { + public void setProductCharacteristic(Set<Characteristic> productCharacteristic) { this.productCharacteristic = productCharacteristic; } @@ -463,9 +478,10 @@ public class Product { /** * Get productOffering * @return productOffering - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public ProductOfferingRef getProductOffering() { return productOffering; @@ -475,14 +491,14 @@ public class Product { this.productOffering = productOffering; } - public Product productOrderItem(List<RelatedProductOrderItem> productOrderItem) { + public Product productOrderItem(Set<RelatedProductOrderItem> productOrderItem) { this.productOrderItem = productOrderItem; return this; } public Product addProductOrderItemItem(RelatedProductOrderItem productOrderItemItem) { if (this.productOrderItem == null) { - this.productOrderItem = new ArrayList<>(); + this.productOrderItem = new HashSet<RelatedProductOrderItem>(); } this.productOrderItem.add(productOrderItemItem); return this; @@ -491,25 +507,26 @@ public class Product { /** * Get productOrderItem * @return productOrderItem - **/ + **/ @Schema(description = "") - @Valid - public List<RelatedProductOrderItem> getProductOrderItem() { + @NotNull + @Valid + public Set<RelatedProductOrderItem> getProductOrderItem() { return productOrderItem; } - public void setProductOrderItem(List<RelatedProductOrderItem> productOrderItem) { + public void setProductOrderItem(Set<RelatedProductOrderItem> productOrderItem) { this.productOrderItem = productOrderItem; } - public Product productPrice(List<ProductPrice> productPrice) { + public Product productPrice(Set<ProductPrice> productPrice) { this.productPrice = productPrice; return this; } public Product addProductPriceItem(ProductPrice productPriceItem) { if (this.productPrice == null) { - this.productPrice = new ArrayList<>(); + this.productPrice = new HashSet<ProductPrice>(); } this.productPrice.add(productPriceItem); return this; @@ -518,25 +535,26 @@ public class Product { /** * Get productPrice * @return productPrice - **/ + **/ @Schema(description = "") - @Valid - public List<ProductPrice> getProductPrice() { + @NotNull + @Valid + public Set<ProductPrice> getProductPrice() { return productPrice; } - public void setProductPrice(List<ProductPrice> productPrice) { + public void setProductPrice(Set<ProductPrice> productPrice) { this.productPrice = productPrice; } - public Product productRelationship(List<ProductRelationship> productRelationship) { + public Product productRelationship(Set<ProductRelationship> productRelationship) { this.productRelationship = productRelationship; return this; } public Product addProductRelationshipItem(ProductRelationship productRelationshipItem) { if (this.productRelationship == null) { - this.productRelationship = new ArrayList<>(); + this.productRelationship = new HashSet<ProductRelationship>(); } this.productRelationship.add(productRelationshipItem); return this; @@ -545,14 +563,15 @@ public class Product { /** * Get productRelationship * @return productRelationship - **/ + **/ @Schema(description = "") - @Valid - public List<ProductRelationship> getProductRelationship() { + @NotNull + @Valid + public Set<ProductRelationship> getProductRelationship() { return productRelationship; } - public void setProductRelationship(List<ProductRelationship> productRelationship) { + public void setProductRelationship(Set<ProductRelationship> productRelationship) { this.productRelationship = productRelationship; } @@ -564,9 +583,10 @@ public class Product { /** * Get productSpecification * @return productSpecification - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public ProductSpecificationRef getProductSpecification() { return productSpecification; @@ -576,14 +596,14 @@ public class Product { this.productSpecification = productSpecification; } - public Product productTerm(List<ProductTerm> productTerm) { + public Product productTerm(Set<ProductTerm> productTerm) { this.productTerm = productTerm; return this; } public Product addProductTermItem(ProductTerm productTermItem) { if (this.productTerm == null) { - this.productTerm = new ArrayList<>(); + this.productTerm = new HashSet<ProductTerm>(); } this.productTerm.add(productTermItem); return this; @@ -592,25 +612,26 @@ public class Product { /** * Get productTerm * @return productTerm - **/ + **/ @Schema(description = "") - @Valid - public List<ProductTerm> getProductTerm() { + @NotNull + @Valid + public Set<ProductTerm> getProductTerm() { return productTerm; } - public void setProductTerm(List<ProductTerm> productTerm) { + public void setProductTerm(Set<ProductTerm> productTerm) { this.productTerm = productTerm; } - public Product realizingResource(List<ResourceRef> realizingResource) { + public Product realizingResource(Set<ResourceRef> realizingResource) { this.realizingResource = realizingResource; return this; } public Product addRealizingResourceItem(ResourceRef realizingResourceItem) { if (this.realizingResource == null) { - this.realizingResource = new ArrayList<>(); + this.realizingResource = new HashSet<ResourceRef>(); } this.realizingResource.add(realizingResourceItem); return this; @@ -619,25 +640,26 @@ public class Product { /** * Get realizingResource * @return realizingResource - **/ + **/ @Schema(description = "") - @Valid - public List<ResourceRef> getRealizingResource() { + @NotNull + @Valid + public Set<ResourceRef> getRealizingResource() { return realizingResource; } - public void setRealizingResource(List<ResourceRef> realizingResource) { + public void setRealizingResource(Set<ResourceRef> realizingResource) { this.realizingResource = realizingResource; } - public Product realizingService(List<ServiceRef> realizingService) { + public Product realizingService(Set<ServiceRef> realizingService) { this.realizingService = realizingService; return this; } public Product addRealizingServiceItem(ServiceRef realizingServiceItem) { if (this.realizingService == null) { - this.realizingService = new ArrayList<>(); + this.realizingService = new HashSet<ServiceRef>(); } this.realizingService.add(realizingServiceItem); return this; @@ -646,25 +668,26 @@ public class Product { /** * Get realizingService * @return realizingService - **/ + **/ @Schema(description = "") - @Valid - public List<ServiceRef> getRealizingService() { + @NotNull + @Valid + public Set<ServiceRef> getRealizingService() { return realizingService; } - public void setRealizingService(List<ServiceRef> realizingService) { + public void setRealizingService(Set<ServiceRef> realizingService) { this.realizingService = realizingService; } - public Product relatedParty(List<RelatedParty> relatedParty) { + public Product relatedParty(Set<RelatedParty> relatedParty) { this.relatedParty = relatedParty; return this; } public Product addRelatedPartyItem(RelatedParty relatedPartyItem) { if (this.relatedParty == null) { - this.relatedParty = new ArrayList<>(); + this.relatedParty = new HashSet<RelatedParty>(); } this.relatedParty.add(relatedPartyItem); return this; @@ -673,14 +696,15 @@ public class Product { /** * Get relatedParty * @return relatedParty - **/ + **/ @Schema(description = "") - @Valid - public List<RelatedParty> getRelatedParty() { + @NotNull + @Valid + public Set<RelatedParty> getRelatedParty() { return relatedParty; } - public void setRelatedParty(List<RelatedParty> relatedParty) { + public void setRelatedParty(Set<RelatedParty> relatedParty) { this.relatedParty = relatedParty; } @@ -692,9 +716,10 @@ public class Product { /** * Get status * @return status - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public ProductStatusType getStatus() { return status; @@ -704,62 +729,9 @@ public class Product { this.status = status; } - public Product baseType(String baseType) { - this.baseType = baseType; - return this; - } - - /** - * When sub-classing, this defines the super-class - * @return baseType - **/ - @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { - return baseType; - } - - public void setAtBaseType(String baseType) { - this.baseType = baseType; - } + - public Product schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - public String getAtSchemaLocation() { - return schemaLocation; - } - - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - public Product type(String type) { - this.type = type; - return this; - } - - /** - * When sub-classing, this defines the sub-class entity name - * @return type - **/ - @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { - return type; - } - - public void setAtType(String type) { - this.type = type; - } + @Override @@ -801,10 +773,11 @@ public class Product { Objects.equals(this.type, product.type); } - @Override - public int hashCode() { - return Objects.hash(id, href, description, isBundle, isCustomerVisible, name, orderDate, productSerialNumber, startDate, terminationDate, agreement, billingAccount, place, product, productCharacteristic, productOffering, productOrderItem, productPrice, productRelationship, productSpecification, productTerm, realizingResource, realizingService, relatedParty, status, baseType, schemaLocation, type); - } +// @Override +// public int hashCode() { +// return Objects.hash(id, href, description, isBundle, isCustomerVisible, name, orderDate, +// productSerialNumber, startDate, terminationDate, agreement, billingAccount, place, product, productCharacteristic, productOffering, productOrderItem, productPrice, productRelationship, productSpecification, productTerm, realizingResource, realizingService, relatedParty, status, baseType, _atSchemaLocation, _atType); +// } @Override public String toString() { diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductAttributeValueChangeEvent.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductAttributeValueChangeEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..3511cd102a2deaba2a14284dcce462b629004f37 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductAttributeValueChangeEvent.java @@ -0,0 +1,334 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Date; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * The notification data structure + */ +@Schema(description = "The notification data structure") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class ProductAttributeValueChangeEvent { + @JsonProperty("eventId") + private String eventId = null; + + @JsonProperty("eventTime") + private Date eventTime = null; + + @JsonProperty("eventType") + private String eventType = null; + + @JsonProperty("correlationId") + private String correlationId = null; + + @JsonProperty("domain") + private String domain = null; + + @JsonProperty("title") + private String title = null; + + @JsonProperty("description") + private String description = null; + + @JsonProperty("priority") + private String priority = null; + + @JsonProperty("timeOcurred") + private Date timeOcurred = null; + + @JsonProperty("fieldPath") + private String fieldPath = null; + + @JsonProperty("event") + private ProductAttributeValueChangeEventPayload event = null; + + public ProductAttributeValueChangeEvent eventId(String eventId) { + this.eventId = eventId; + return this; + } + + /** + * The identifier of the notification. + * @return eventId + **/ + @Schema(description = "The identifier of the notification.") + @NotNull + + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + public ProductAttributeValueChangeEvent eventTime(Date eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * Time of the event occurrence. + * @return eventTime + **/ + @Schema(description = "Time of the event occurrence.") + @NotNull + + @Valid + public Date getEventTime() { + return eventTime; + } + + public void setEventTime(Date eventTime) { + this.eventTime = eventTime; + } + + public ProductAttributeValueChangeEvent eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The type of the notification. + * @return eventType + **/ + @Schema(description = "The type of the notification.") + @NotNull + + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public ProductAttributeValueChangeEvent correlationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * The correlation id for this event. + * @return correlationId + **/ + @Schema(description = "The correlation id for this event.") + @NotNull + + public String getCorrelationId() { + return correlationId; + } + + public void setCorrelationId(String correlationId) { + this.correlationId = correlationId; + } + + public ProductAttributeValueChangeEvent domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain of the event. + * @return domain + **/ + @Schema(description = "The domain of the event.") + @NotNull + + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public ProductAttributeValueChangeEvent title(String title) { + this.title = title; + return this; + } + + /** + * The title of the event. + * @return title + **/ + @Schema(description = "The title of the event.") + @NotNull + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public ProductAttributeValueChangeEvent description(String description) { + this.description = description; + return this; + } + + /** + * An explnatory of the event. + * @return description + **/ + @Schema(description = "An explnatory of the event.") + @NotNull + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ProductAttributeValueChangeEvent priority(String priority) { + this.priority = priority; + return this; + } + + /** + * A priority. + * @return priority + **/ + @Schema(description = "A priority.") + @NotNull + + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public ProductAttributeValueChangeEvent timeOcurred(Date timeOcurred) { + this.timeOcurred = timeOcurred; + return this; + } + + /** + * The time the event occured. + * @return timeOcurred + **/ + @Schema(description = "The time the event occured.") + @NotNull + + @Valid + public Date getTimeOcurred() { + return timeOcurred; + } + + public void setTimeOcurred(Date timeOcurred) { + this.timeOcurred = timeOcurred; + } + + public ProductAttributeValueChangeEvent fieldPath(String fieldPath) { + this.fieldPath = fieldPath; + return this; + } + + /** + * The path identifying the object field concerned by this notification. + * @return fieldPath + **/ + @Schema(description = "The path identifying the object field concerned by this notification.") + @NotNull + + public String getFieldPath() { + return fieldPath; + } + + public void setFieldPath(String fieldPath) { + this.fieldPath = fieldPath; + } + + public ProductAttributeValueChangeEvent event(ProductAttributeValueChangeEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + **/ + @Schema(description = "") + @NotNull + + @Valid + public ProductAttributeValueChangeEventPayload getEvent() { + return event; + } + + public void setEvent(ProductAttributeValueChangeEventPayload event) { + this.event = event; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAttributeValueChangeEvent productAttributeValueChangeEvent = (ProductAttributeValueChangeEvent) o; + return Objects.equals(this.eventId, productAttributeValueChangeEvent.eventId) && + Objects.equals(this.eventTime, productAttributeValueChangeEvent.eventTime) && + Objects.equals(this.eventType, productAttributeValueChangeEvent.eventType) && + Objects.equals(this.correlationId, productAttributeValueChangeEvent.correlationId) && + Objects.equals(this.domain, productAttributeValueChangeEvent.domain) && + Objects.equals(this.title, productAttributeValueChangeEvent.title) && + Objects.equals(this.description, productAttributeValueChangeEvent.description) && + Objects.equals(this.priority, productAttributeValueChangeEvent.priority) && + Objects.equals(this.timeOcurred, productAttributeValueChangeEvent.timeOcurred) && + Objects.equals(this.fieldPath, productAttributeValueChangeEvent.fieldPath) && + Objects.equals(this.event, productAttributeValueChangeEvent.event); + } + + @Override + public int hashCode() { + return Objects.hash(eventId, eventTime, eventType, correlationId, domain, title, description, priority, timeOcurred, fieldPath, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAttributeValueChangeEvent {\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(" fieldPath: ").append(toIndentedString(fieldPath)).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(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/pim637/model/ProductAttributeValueChangeEventPayload.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductAttributeValueChangeEventPayload.java new file mode 100644 index 0000000000000000000000000000000000000000..50b4c3a7e50f08d4d7cfc69eebf07b154b359375 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductAttributeValueChangeEventPayload.java @@ -0,0 +1,81 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * The event data structure + */ +@Schema(description = "The event data structure") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class ProductAttributeValueChangeEventPayload { + @JsonProperty("product") + private Product product = null; + + public ProductAttributeValueChangeEventPayload product(Product product) { + this.product = product; + return this; + } + + /** + * Get product + * @return product + **/ + @Schema(description = "") + @NotNull + + @Valid + public Product getProduct() { + return product; + } + + public void setProduct(Product product) { + this.product = product; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAttributeValueChangeEventPayload productAttributeValueChangeEventPayload = (ProductAttributeValueChangeEventPayload) o; + return Objects.equals(this.product, productAttributeValueChangeEventPayload.product); + } + + @Override + public int hashCode() { + return Objects.hash(product); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAttributeValueChangeEventPayload {\n"); + + sb.append(" product: ").append(toIndentedString(product)).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/pim637/model/ProductBatchEvent.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductBatchEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..f1a1186c6e1ff9f101236083098a156bd358208b --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductBatchEvent.java @@ -0,0 +1,359 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Date; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * The notification data structure + */ +@Schema(description = "The notification data structure") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class ProductBatchEvent { + @JsonProperty("id") + private String id = null; + + @JsonProperty("href") + private String href = null; + + @JsonProperty("eventId") + private String eventId = null; + + @JsonProperty("eventTime") + private Date eventTime = null; + + @JsonProperty("eventType") + private String eventType = null; + + @JsonProperty("correlationId") + private String correlationId = null; + + @JsonProperty("domain") + private String domain = null; + + @JsonProperty("title") + private String title = null; + + @JsonProperty("description") + private String description = null; + + @JsonProperty("priority") + private String priority = null; + + @JsonProperty("timeOcurred") + private Date timeOcurred = null; + + @JsonProperty("event") + private ProductBatchEventPayload event = null; + + public ProductBatchEvent id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the Process flow + * @return id + **/ + @Schema(description = "Identifier of the Process flow") + @NotNull + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ProductBatchEvent href(String href) { + this.href = href; + return this; + } + + /** + * Reference of the ProcessFlow + * @return href + **/ + @Schema(description = "Reference of the ProcessFlow") + @NotNull + + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public ProductBatchEvent eventId(String eventId) { + this.eventId = eventId; + return this; + } + + /** + * The identifier of the notification. + * @return eventId + **/ + @Schema(description = "The identifier of the notification.") + @NotNull + + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + public ProductBatchEvent eventTime(Date eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * Time of the event occurrence. + * @return eventTime + **/ + @Schema(description = "Time of the event occurrence.") + @NotNull + + @Valid + public Date getEventTime() { + return eventTime; + } + + public void setEventTime(Date eventTime) { + this.eventTime = eventTime; + } + + public ProductBatchEvent eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The type of the notification. + * @return eventType + **/ + @Schema(description = "The type of the notification.") + @NotNull + + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public ProductBatchEvent correlationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * The correlation id for this event. + * @return correlationId + **/ + @Schema(description = "The correlation id for this event.") + @NotNull + + public String getCorrelationId() { + return correlationId; + } + + public void setCorrelationId(String correlationId) { + this.correlationId = correlationId; + } + + public ProductBatchEvent domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain of the event. + * @return domain + **/ + @Schema(description = "The domain of the event.") + @NotNull + + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public ProductBatchEvent title(String title) { + this.title = title; + return this; + } + + /** + * The title of the event. + * @return title + **/ + @Schema(description = "The title of the event.") + @NotNull + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public ProductBatchEvent description(String description) { + this.description = description; + return this; + } + + /** + * An explnatory of the event. + * @return description + **/ + @Schema(description = "An explnatory of the event.") + @NotNull + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ProductBatchEvent priority(String priority) { + this.priority = priority; + return this; + } + + /** + * A priority. + * @return priority + **/ + @Schema(description = "A priority.") + @NotNull + + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public ProductBatchEvent timeOcurred(Date timeOcurred) { + this.timeOcurred = timeOcurred; + return this; + } + + /** + * The time the event occured. + * @return timeOcurred + **/ + @Schema(description = "The time the event occured.") + @NotNull + + @Valid + public Date getTimeOcurred() { + return timeOcurred; + } + + public void setTimeOcurred(Date timeOcurred) { + this.timeOcurred = timeOcurred; + } + + public ProductBatchEvent event(ProductBatchEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + **/ + @Schema(description = "") + @NotNull + + @Valid + public ProductBatchEventPayload getEvent() { + return event; + } + + public void setEvent(ProductBatchEventPayload event) { + this.event = event; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductBatchEvent productBatchEvent = (ProductBatchEvent) o; + return Objects.equals(this.id, productBatchEvent.id) && + Objects.equals(this.href, productBatchEvent.href) && + Objects.equals(this.eventId, productBatchEvent.eventId) && + Objects.equals(this.eventTime, productBatchEvent.eventTime) && + Objects.equals(this.eventType, productBatchEvent.eventType) && + Objects.equals(this.correlationId, productBatchEvent.correlationId) && + Objects.equals(this.domain, productBatchEvent.domain) && + Objects.equals(this.title, productBatchEvent.title) && + Objects.equals(this.description, productBatchEvent.description) && + Objects.equals(this.priority, productBatchEvent.priority) && + Objects.equals(this.timeOcurred, productBatchEvent.timeOcurred) && + Objects.equals(this.event, productBatchEvent.event); + } + + @Override + public int hashCode() { + return Objects.hash(id, href, eventId, eventTime, eventType, correlationId, domain, title, description, priority, timeOcurred, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductBatchEvent {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).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(" 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(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/pim637/model/ProductBatchEventPayload.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductBatchEventPayload.java new file mode 100644 index 0000000000000000000000000000000000000000..e90831cb7692e047a22b32a00dc85deb485e546f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductBatchEventPayload.java @@ -0,0 +1,81 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * The event data structure + */ +@Schema(description = "The event data structure") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class ProductBatchEventPayload { + @JsonProperty("product") + private Product product = null; + + public ProductBatchEventPayload product(Product product) { + this.product = product; + return this; + } + + /** + * Get product + * @return product + **/ + @Schema(description = "") + @NotNull + + @Valid + public Product getProduct() { + return product; + } + + public void setProduct(Product product) { + this.product = product; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductBatchEventPayload productBatchEventPayload = (ProductBatchEventPayload) o; + return Objects.equals(this.product, productBatchEventPayload.product); + } + + @Override + public int hashCode() { + return Objects.hash(product); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductBatchEventPayload {\n"); + + sb.append(" product: ").append(toIndentedString(product)).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/pim637/model/ProductCreate.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductCreate.java new file mode 100644 index 0000000000000000000000000000000000000000..a9e2e368d8d2a2e7a274efb3fdbfb1358b312cfa --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductCreate.java @@ -0,0 +1,822 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.service.Characteristic; +import org.etsi.osl.tmf.common.model.service.ResourceRef; +import org.etsi.osl.tmf.common.model.service.ServiceRef; +import org.etsi.osl.tmf.pcm620.model.ProductOfferingRef; +import org.etsi.osl.tmf.pcm620.model.ProductSpecificationRef; +import org.etsi.osl.tmf.po622.model.AgreementItemRef; +import org.etsi.osl.tmf.po622.model.RelatedProductOrderItem; +import org.etsi.osl.tmf.prm669.model.RelatedParty; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * A product offering procured by a customer or other interested party playing a party role. A product is realized as one or more service(s) and / or resource(s). Skipped properties: id,href + */ +@Schema(description = "A product offering procured by a customer or other interested party playing a party role. A product is realized as one or more service(s) and / or resource(s). Skipped properties: id,href") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class ProductCreate { + @JsonProperty("description") + private String description = null; + + @JsonProperty("isBundle") + private Boolean isBundle = null; + + @JsonProperty("isCustomerVisible") + private Boolean isCustomerVisible = null; + + @JsonProperty("name") + private String name = null; + + @JsonProperty("orderDate") + private Date orderDate = null; + + @JsonProperty("productSerialNumber") + private String productSerialNumber = null; + + @JsonProperty("startDate") + private Date startDate = null; + + @JsonProperty("terminationDate") + private Date terminationDate = null; + + @JsonProperty("agreement") + @Valid + private List<AgreementItemRef> agreement = null; + + @JsonProperty("billingAccount") + private BillingAccountRef billingAccount = null; + + @JsonProperty("place") + @Valid + private List<RelatedPlaceRefOrValue> place = null; + + @JsonProperty("product") + @Valid + private List<ProductRefOrValue> product = null; + + @JsonProperty("productCharacteristic") + @Valid + private List<Characteristic> productCharacteristic = null; + + @JsonProperty("productOffering") + private ProductOfferingRef productOffering = null; + + @JsonProperty("productOrderItem") + @Valid + private List<RelatedProductOrderItem> productOrderItem = null; + + @JsonProperty("productPrice") + @Valid + private List<ProductPrice> productPrice = null; + + @JsonProperty("productRelationship") + @Valid + private List<ProductRelationship> productRelationship = null; + + @JsonProperty("productSpecification") + private ProductSpecificationRef productSpecification = null; + + @JsonProperty("productTerm") + @Valid + private List<ProductTerm> productTerm = null; + + @JsonProperty("realizingResource") + @Valid + private List<ResourceRef> realizingResource = null; + + @JsonProperty("realizingService") + @Valid + private List<ServiceRef> realizingService = null; + + @JsonProperty("relatedParty") + @Valid + private List<RelatedParty> relatedParty = null; + + @JsonProperty("status") + private ProductStatusType status = null; + + @JsonProperty("@baseType") + private String _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = null; + + public ProductCreate description(String description) { + this.description = description; + return this; + } + + /** + * Is the description of the product. It could be copied from the description of the Product Offering. + * @return description + **/ + @Schema(description = "Is the description of the product. It could be copied from the description of the Product Offering.") + @NotNull + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ProductCreate isBundle(Boolean isBundle) { + this.isBundle = isBundle; + return this; + } + + /** + * If true, the product is a ProductBundle which is an instantiation of a BundledProductOffering. If false, the product is a ProductComponent which is an instantiation of a SimpleProductOffering. + * @return isBundle + **/ + @Schema(description = "If true, the product is a ProductBundle which is an instantiation of a BundledProductOffering. If false, the product is a ProductComponent which is an instantiation of a SimpleProductOffering.") + @NotNull + + public Boolean isIsBundle() { + return isBundle; + } + + public void setIsBundle(Boolean isBundle) { + this.isBundle = isBundle; + } + + public ProductCreate isCustomerVisible(Boolean isCustomerVisible) { + this.isCustomerVisible = isCustomerVisible; + return this; + } + + /** + * If true, the product is visible by the customer. + * @return isCustomerVisible + **/ + @Schema(description = "If true, the product is visible by the customer.") + @NotNull + + public Boolean isIsCustomerVisible() { + return isCustomerVisible; + } + + public void setIsCustomerVisible(Boolean isCustomerVisible) { + this.isCustomerVisible = isCustomerVisible; + } + + public ProductCreate name(String name) { + this.name = name; + return this; + } + + /** + * Name of the product. It could be the same as the name of the product offering + * @return name + **/ + @Schema(description = "Name of the product. It could be the same as the name of the product offering") + @NotNull + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ProductCreate orderDate(Date orderDate) { + this.orderDate = orderDate; + return this; + } + + /** + * Is the date when the product was ordered + * @return orderDate + **/ + @Schema(description = "Is the date when the product was ordered") + @NotNull + + @Valid + public Date getOrderDate() { + return orderDate; + } + + public void setOrderDate(Date orderDate) { + this.orderDate = orderDate; + } + + public ProductCreate productSerialNumber(String productSerialNumber) { + this.productSerialNumber = productSerialNumber; + return this; + } + + /** + * Is the serial number for the product. This is typically applicable to tangible products e.g. Broadband Router. + * @return productSerialNumber + **/ + @Schema(description = "Is the serial number for the product. This is typically applicable to tangible products e.g. Broadband Router.") + @NotNull + + public String getProductSerialNumber() { + return productSerialNumber; + } + + public void setProductSerialNumber(String productSerialNumber) { + this.productSerialNumber = productSerialNumber; + } + + public ProductCreate startDate(Date startDate) { + this.startDate = startDate; + return this; + } + + /** + * Is the date from which the product starts + * @return startDate + **/ + @Schema(description = "Is the date from which the product starts") + @NotNull + + @Valid + public Date getStartDate() { + return startDate; + } + + public void setStartDate(Date startDate) { + this.startDate = startDate; + } + + public ProductCreate terminationDate(Date terminationDate) { + this.terminationDate = terminationDate; + return this; + } + + /** + * Is the date when the product was terminated + * @return terminationDate + **/ + @Schema(description = "Is the date when the product was terminated") + @NotNull + + @Valid + public Date getTerminationDate() { + return terminationDate; + } + + public void setTerminationDate(Date terminationDate) { + this.terminationDate = terminationDate; + } + + public ProductCreate agreement(List<AgreementItemRef> agreement) { + this.agreement = agreement; + return this; + } + + public ProductCreate addAgreementItem(AgreementItemRef agreementItem) { + if (this.agreement == null) { + this.agreement = new ArrayList<AgreementItemRef>(); + } + this.agreement.add(agreementItem); + return this; + } + + /** + * Get agreement + * @return agreement + **/ + @Schema(description = "") + @NotNull + @Valid + public List<AgreementItemRef> getAgreement() { + return agreement; + } + + public void setAgreement(List<AgreementItemRef> agreement) { + this.agreement = agreement; + } + + public ProductCreate billingAccount(BillingAccountRef billingAccount) { + this.billingAccount = billingAccount; + return this; + } + + /** + * Get billingAccount + * @return billingAccount + **/ + @Schema(description = "") + @NotNull + + @Valid + public BillingAccountRef getBillingAccount() { + return billingAccount; + } + + public void setBillingAccount(BillingAccountRef billingAccount) { + this.billingAccount = billingAccount; + } + + public ProductCreate place(List<RelatedPlaceRefOrValue> place) { + this.place = place; + return this; + } + + public ProductCreate addPlaceItem(RelatedPlaceRefOrValue placeItem) { + if (this.place == null) { + this.place = new ArrayList<RelatedPlaceRefOrValue>(); + } + this.place.add(placeItem); + return this; + } + + /** + * Get place + * @return place + **/ + @Schema(description = "") + @NotNull + @Valid + public List<RelatedPlaceRefOrValue> getPlace() { + return place; + } + + public void setPlace(List<RelatedPlaceRefOrValue> place) { + this.place = place; + } + + public ProductCreate product(List<ProductRefOrValue> product) { + this.product = product; + return this; + } + + public ProductCreate addProductItem(ProductRefOrValue productItem) { + if (this.product == null) { + this.product = new ArrayList<ProductRefOrValue>(); + } + this.product.add(productItem); + return this; + } + + /** + * Get product + * @return product + **/ + @Schema(description = "") + @NotNull + @Valid + public List<ProductRefOrValue> getProduct() { + return product; + } + + public void setProduct(List<ProductRefOrValue> product) { + this.product = product; + } + + public ProductCreate productCharacteristic(List<Characteristic> productCharacteristic) { + this.productCharacteristic = productCharacteristic; + return this; + } + + public ProductCreate addProductCharacteristicItem(Characteristic productCharacteristicItem) { + if (this.productCharacteristic == null) { + this.productCharacteristic = new ArrayList<Characteristic>(); + } + this.productCharacteristic.add(productCharacteristicItem); + return this; + } + + /** + * Get productCharacteristic + * @return productCharacteristic + **/ + @Schema(description = "") + @NotNull + @Valid + public List<Characteristic> getProductCharacteristic() { + return productCharacteristic; + } + + public void setProductCharacteristic(List<Characteristic> productCharacteristic) { + this.productCharacteristic = productCharacteristic; + } + + public ProductCreate productOffering(ProductOfferingRef productOffering) { + this.productOffering = productOffering; + return this; + } + + /** + * Get productOffering + * @return productOffering + **/ + @Schema(description = "") + @NotNull + + @Valid + public ProductOfferingRef getProductOffering() { + return productOffering; + } + + public void setProductOffering(ProductOfferingRef productOffering) { + this.productOffering = productOffering; + } + + public ProductCreate productOrderItem(List<RelatedProductOrderItem> productOrderItem) { + this.productOrderItem = productOrderItem; + return this; + } + + public ProductCreate addProductOrderItemItem(RelatedProductOrderItem productOrderItemItem) { + if (this.productOrderItem == null) { + this.productOrderItem = new ArrayList<RelatedProductOrderItem>(); + } + this.productOrderItem.add(productOrderItemItem); + return this; + } + + /** + * Get productOrderItem + * @return productOrderItem + **/ + @Schema(description = "") + @NotNull + @Valid + public List<RelatedProductOrderItem> getProductOrderItem() { + return productOrderItem; + } + + public void setProductOrderItem(List<RelatedProductOrderItem> productOrderItem) { + this.productOrderItem = productOrderItem; + } + + public ProductCreate productPrice(List<ProductPrice> productPrice) { + this.productPrice = productPrice; + return this; + } + + public ProductCreate addProductPriceItem(ProductPrice productPriceItem) { + if (this.productPrice == null) { + this.productPrice = new ArrayList<ProductPrice>(); + } + this.productPrice.add(productPriceItem); + return this; + } + + /** + * Get productPrice + * @return productPrice + **/ + @Schema(description = "") + @NotNull + @Valid + public List<ProductPrice> getProductPrice() { + return productPrice; + } + + public void setProductPrice(List<ProductPrice> productPrice) { + this.productPrice = productPrice; + } + + public ProductCreate productRelationship(List<ProductRelationship> productRelationship) { + this.productRelationship = productRelationship; + return this; + } + + public ProductCreate addProductRelationshipItem(ProductRelationship productRelationshipItem) { + if (this.productRelationship == null) { + this.productRelationship = new ArrayList<ProductRelationship>(); + } + this.productRelationship.add(productRelationshipItem); + return this; + } + + /** + * Get productRelationship + * @return productRelationship + **/ + @Schema(description = "") + @NotNull + @Valid + public List<ProductRelationship> getProductRelationship() { + return productRelationship; + } + + public void setProductRelationship(List<ProductRelationship> productRelationship) { + this.productRelationship = productRelationship; + } + + public ProductCreate productSpecification(ProductSpecificationRef productSpecification) { + this.productSpecification = productSpecification; + return this; + } + + /** + * Get productSpecification + * @return productSpecification + **/ + @Schema(description = "") + @NotNull + + @Valid + public ProductSpecificationRef getProductSpecification() { + return productSpecification; + } + + public void setProductSpecification(ProductSpecificationRef productSpecification) { + this.productSpecification = productSpecification; + } + + public ProductCreate productTerm(List<ProductTerm> productTerm) { + this.productTerm = productTerm; + return this; + } + + public ProductCreate addProductTermItem(ProductTerm productTermItem) { + if (this.productTerm == null) { + this.productTerm = new ArrayList<ProductTerm>(); + } + this.productTerm.add(productTermItem); + return this; + } + + /** + * Get productTerm + * @return productTerm + **/ + @Schema(description = "") + @NotNull + @Valid + public List<ProductTerm> getProductTerm() { + return productTerm; + } + + public void setProductTerm(List<ProductTerm> productTerm) { + this.productTerm = productTerm; + } + + public ProductCreate realizingResource(List<ResourceRef> realizingResource) { + this.realizingResource = realizingResource; + return this; + } + + public ProductCreate addRealizingResourceItem(ResourceRef realizingResourceItem) { + if (this.realizingResource == null) { + this.realizingResource = new ArrayList<ResourceRef>(); + } + this.realizingResource.add(realizingResourceItem); + return this; + } + + /** + * Get realizingResource + * @return realizingResource + **/ + @Schema(description = "") + @NotNull + @Valid + public List<ResourceRef> getRealizingResource() { + return realizingResource; + } + + public void setRealizingResource(List<ResourceRef> realizingResource) { + this.realizingResource = realizingResource; + } + + public ProductCreate realizingService(List<ServiceRef> realizingService) { + this.realizingService = realizingService; + return this; + } + + public ProductCreate addRealizingServiceItem(ServiceRef realizingServiceItem) { + if (this.realizingService == null) { + this.realizingService = new ArrayList<ServiceRef>(); + } + this.realizingService.add(realizingServiceItem); + return this; + } + + /** + * Get realizingService + * @return realizingService + **/ + @Schema(description = "") + @NotNull + @Valid + public List<ServiceRef> getRealizingService() { + return realizingService; + } + + public void setRealizingService(List<ServiceRef> realizingService) { + this.realizingService = realizingService; + } + + public ProductCreate relatedParty(List<RelatedParty> relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public ProductCreate addRelatedPartyItem(RelatedParty relatedPartyItem) { + if (this.relatedParty == null) { + this.relatedParty = new ArrayList<RelatedParty>(); + } + this.relatedParty.add(relatedPartyItem); + return this; + } + + /** + * Get relatedParty + * @return relatedParty + **/ + @Schema(description = "") + @NotNull + @Valid + public List<RelatedParty> getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List<RelatedParty> relatedParty) { + this.relatedParty = relatedParty; + } + + public ProductCreate status(ProductStatusType status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @Schema(required = true, description = "") + @NotNull + + @Valid + public ProductStatusType getStatus() { + return status; + } + + public void setStatus(ProductStatusType status) { + this.status = status; + } + + public ProductCreate _atBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return _atBaseType + **/ + @Schema(description = "When sub-classing, this defines the super-class") + @NotNull + + public String getAtBaseType() { + return _atBaseType; + } + + public void setAtBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; + } + + public ProductCreate _atSchemaLocation(String _atSchemaLocation) { + this._atSchemaLocation = _atSchemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return _atSchemaLocation + **/ + @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") + @NotNull + + public String getAtSchemaLocation() { + return _atSchemaLocation; + } + + public void setAtSchemaLocation(String _atSchemaLocation) { + this._atSchemaLocation = _atSchemaLocation; + } + + public ProductCreate _atType(String _atType) { + this._atType = _atType; + return this; + } + + /** + * When sub-classing, this defines the sub-class entity name + * @return _atType + **/ + @Schema(description = "When sub-classing, this defines the sub-class entity name") + @NotNull + + public String getAtType() { + return _atType; + } + + public void setAtType(String _atType) { + this._atType = _atType; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductCreate productCreate = (ProductCreate) o; + return Objects.equals(this.description, productCreate.description) && + Objects.equals(this.isBundle, productCreate.isBundle) && + Objects.equals(this.isCustomerVisible, productCreate.isCustomerVisible) && + Objects.equals(this.name, productCreate.name) && + Objects.equals(this.orderDate, productCreate.orderDate) && + Objects.equals(this.productSerialNumber, productCreate.productSerialNumber) && + Objects.equals(this.startDate, productCreate.startDate) && + Objects.equals(this.terminationDate, productCreate.terminationDate) && + Objects.equals(this.agreement, productCreate.agreement) && + Objects.equals(this.billingAccount, productCreate.billingAccount) && + Objects.equals(this.place, productCreate.place) && + Objects.equals(this.product, productCreate.product) && + Objects.equals(this.productCharacteristic, productCreate.productCharacteristic) && + Objects.equals(this.productOffering, productCreate.productOffering) && + Objects.equals(this.productOrderItem, productCreate.productOrderItem) && + Objects.equals(this.productPrice, productCreate.productPrice) && + Objects.equals(this.productRelationship, productCreate.productRelationship) && + Objects.equals(this.productSpecification, productCreate.productSpecification) && + Objects.equals(this.productTerm, productCreate.productTerm) && + Objects.equals(this.realizingResource, productCreate.realizingResource) && + Objects.equals(this.realizingService, productCreate.realizingService) && + Objects.equals(this.relatedParty, productCreate.relatedParty) && + Objects.equals(this.status, productCreate.status) && + Objects.equals(this._atBaseType, productCreate._atBaseType) && + Objects.equals(this._atSchemaLocation, productCreate._atSchemaLocation) && + Objects.equals(this._atType, productCreate._atType); + } + + @Override + public int hashCode() { + return Objects.hash(description, isBundle, isCustomerVisible, name, orderDate, productSerialNumber, startDate, terminationDate, agreement, billingAccount, place, product, productCharacteristic, productOffering, productOrderItem, productPrice, productRelationship, productSpecification, productTerm, realizingResource, realizingService, relatedParty, status, _atBaseType, _atSchemaLocation, _atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductCreate {\n"); + + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" isBundle: ").append(toIndentedString(isBundle)).append("\n"); + sb.append(" isCustomerVisible: ").append(toIndentedString(isCustomerVisible)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" orderDate: ").append(toIndentedString(orderDate)).append("\n"); + sb.append(" productSerialNumber: ").append(toIndentedString(productSerialNumber)).append("\n"); + sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); + sb.append(" terminationDate: ").append(toIndentedString(terminationDate)).append("\n"); + sb.append(" agreement: ").append(toIndentedString(agreement)).append("\n"); + sb.append(" billingAccount: ").append(toIndentedString(billingAccount)).append("\n"); + sb.append(" place: ").append(toIndentedString(place)).append("\n"); + sb.append(" product: ").append(toIndentedString(product)).append("\n"); + sb.append(" productCharacteristic: ").append(toIndentedString(productCharacteristic)).append("\n"); + sb.append(" productOffering: ").append(toIndentedString(productOffering)).append("\n"); + sb.append(" productOrderItem: ").append(toIndentedString(productOrderItem)).append("\n"); + sb.append(" productPrice: ").append(toIndentedString(productPrice)).append("\n"); + sb.append(" productRelationship: ").append(toIndentedString(productRelationship)).append("\n"); + sb.append(" productSpecification: ").append(toIndentedString(productSpecification)).append("\n"); + sb.append(" productTerm: ").append(toIndentedString(productTerm)).append("\n"); + sb.append(" realizingResource: ").append(toIndentedString(realizingResource)).append("\n"); + sb.append(" realizingService: ").append(toIndentedString(realizingService)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" _atBaseType: ").append(toIndentedString(_atBaseType)).append("\n"); + sb.append(" _atSchemaLocation: ").append(toIndentedString(_atSchemaLocation)).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(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/pim637/model/ProductCreateEvent.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductCreateEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..74731e4281f8abc8e9f7ffeb892e033f717f09fe --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductCreateEvent.java @@ -0,0 +1,359 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Date; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * The notification data structure + */ +@Schema(description = "The notification data structure") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class ProductCreateEvent { + @JsonProperty("id") + private String id = null; + + @JsonProperty("href") + private String href = null; + + @JsonProperty("eventId") + private String eventId = null; + + @JsonProperty("eventTime") + private Date eventTime = null; + + @JsonProperty("eventType") + private String eventType = null; + + @JsonProperty("correlationId") + private String correlationId = null; + + @JsonProperty("domain") + private String domain = null; + + @JsonProperty("title") + private String title = null; + + @JsonProperty("description") + private String description = null; + + @JsonProperty("priority") + private String priority = null; + + @JsonProperty("timeOcurred") + private Date timeOcurred = null; + + @JsonProperty("event") + private ProductCreateEventPayload event = null; + + public ProductCreateEvent id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the Process flow + * @return id + **/ + @Schema(description = "Identifier of the Process flow") + @NotNull + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ProductCreateEvent href(String href) { + this.href = href; + return this; + } + + /** + * Reference of the ProcessFlow + * @return href + **/ + @Schema(description = "Reference of the ProcessFlow") + @NotNull + + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public ProductCreateEvent eventId(String eventId) { + this.eventId = eventId; + return this; + } + + /** + * The identifier of the notification. + * @return eventId + **/ + @Schema(description = "The identifier of the notification.") + @NotNull + + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + public ProductCreateEvent eventTime(Date eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * Time of the event occurrence. + * @return eventTime + **/ + @Schema(description = "Time of the event occurrence.") + @NotNull + + @Valid + public Date getEventTime() { + return eventTime; + } + + public void setEventTime(Date eventTime) { + this.eventTime = eventTime; + } + + public ProductCreateEvent eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The type of the notification. + * @return eventType + **/ + @Schema(description = "The type of the notification.") + @NotNull + + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public ProductCreateEvent correlationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * The correlation id for this event. + * @return correlationId + **/ + @Schema(description = "The correlation id for this event.") + @NotNull + + public String getCorrelationId() { + return correlationId; + } + + public void setCorrelationId(String correlationId) { + this.correlationId = correlationId; + } + + public ProductCreateEvent domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain of the event. + * @return domain + **/ + @Schema(description = "The domain of the event.") + @NotNull + + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public ProductCreateEvent title(String title) { + this.title = title; + return this; + } + + /** + * The title of the event. + * @return title + **/ + @Schema(description = "The title of the event.") + @NotNull + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public ProductCreateEvent description(String description) { + this.description = description; + return this; + } + + /** + * An explnatory of the event. + * @return description + **/ + @Schema(description = "An explnatory of the event.") + @NotNull + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ProductCreateEvent priority(String priority) { + this.priority = priority; + return this; + } + + /** + * A priority. + * @return priority + **/ + @Schema(description = "A priority.") + @NotNull + + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public ProductCreateEvent timeOcurred(Date timeOcurred) { + this.timeOcurred = timeOcurred; + return this; + } + + /** + * The time the event occured. + * @return timeOcurred + **/ + @Schema(description = "The time the event occured.") + @NotNull + + @Valid + public Date getTimeOcurred() { + return timeOcurred; + } + + public void setTimeOcurred(Date timeOcurred) { + this.timeOcurred = timeOcurred; + } + + public ProductCreateEvent event(ProductCreateEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + **/ + @Schema(description = "") + @NotNull + + @Valid + public ProductCreateEventPayload getEvent() { + return event; + } + + public void setEvent(ProductCreateEventPayload event) { + this.event = event; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductCreateEvent productCreateEvent = (ProductCreateEvent) o; + return Objects.equals(this.id, productCreateEvent.id) && + Objects.equals(this.href, productCreateEvent.href) && + Objects.equals(this.eventId, productCreateEvent.eventId) && + Objects.equals(this.eventTime, productCreateEvent.eventTime) && + Objects.equals(this.eventType, productCreateEvent.eventType) && + Objects.equals(this.correlationId, productCreateEvent.correlationId) && + Objects.equals(this.domain, productCreateEvent.domain) && + Objects.equals(this.title, productCreateEvent.title) && + Objects.equals(this.description, productCreateEvent.description) && + Objects.equals(this.priority, productCreateEvent.priority) && + Objects.equals(this.timeOcurred, productCreateEvent.timeOcurred) && + Objects.equals(this.event, productCreateEvent.event); + } + + @Override + public int hashCode() { + return Objects.hash(id, href, eventId, eventTime, eventType, correlationId, domain, title, description, priority, timeOcurred, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductCreateEvent {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).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(" 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(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/pim637/model/ProductCreateEventPayload.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductCreateEventPayload.java new file mode 100644 index 0000000000000000000000000000000000000000..e292e83fcf4c0212ad78aead0e4f777c28d03d1b --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductCreateEventPayload.java @@ -0,0 +1,81 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * The event data structure + */ +@Schema(description = "The event data structure") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class ProductCreateEventPayload { + @JsonProperty("product") + private Product product = null; + + public ProductCreateEventPayload product(Product product) { + this.product = product; + return this; + } + + /** + * Get product + * @return product + **/ + @Schema(description = "") + @NotNull + + @Valid + public Product getProduct() { + return product; + } + + public void setProduct(Product product) { + this.product = product; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductCreateEventPayload productCreateEventPayload = (ProductCreateEventPayload) o; + return Objects.equals(this.product, productCreateEventPayload.product); + } + + @Override + public int hashCode() { + return Objects.hash(product); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductCreateEventPayload {\n"); + + sb.append(" product: ").append(toIndentedString(product)).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/pim637/model/ProductDeleteEvent.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductDeleteEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..6637c5ca12bb718ad4ed99305489bf908f08da8a --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductDeleteEvent.java @@ -0,0 +1,359 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Date; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * The notification data structure + */ +@Schema(description = "The notification data structure") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class ProductDeleteEvent { + @JsonProperty("id") + private String id = null; + + @JsonProperty("href") + private String href = null; + + @JsonProperty("eventId") + private String eventId = null; + + @JsonProperty("eventTime") + private Date eventTime = null; + + @JsonProperty("eventType") + private String eventType = null; + + @JsonProperty("correlationId") + private String correlationId = null; + + @JsonProperty("domain") + private String domain = null; + + @JsonProperty("title") + private String title = null; + + @JsonProperty("description") + private String description = null; + + @JsonProperty("priority") + private String priority = null; + + @JsonProperty("timeOcurred") + private Date timeOcurred = null; + + @JsonProperty("event") + private ProductDeleteEventPayload event = null; + + public ProductDeleteEvent id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the Process flow + * @return id + **/ + @Schema(description = "Identifier of the Process flow") + @NotNull + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ProductDeleteEvent href(String href) { + this.href = href; + return this; + } + + /** + * Reference of the ProcessFlow + * @return href + **/ + @Schema(description = "Reference of the ProcessFlow") + @NotNull + + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public ProductDeleteEvent eventId(String eventId) { + this.eventId = eventId; + return this; + } + + /** + * The identifier of the notification. + * @return eventId + **/ + @Schema(description = "The identifier of the notification.") + @NotNull + + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + public ProductDeleteEvent eventTime(Date eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * Time of the event occurrence. + * @return eventTime + **/ + @Schema(description = "Time of the event occurrence.") + @NotNull + + @Valid + public Date getEventTime() { + return eventTime; + } + + public void setEventTime(Date eventTime) { + this.eventTime = eventTime; + } + + public ProductDeleteEvent eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The type of the notification. + * @return eventType + **/ + @Schema(description = "The type of the notification.") + @NotNull + + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public ProductDeleteEvent correlationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * The correlation id for this event. + * @return correlationId + **/ + @Schema(description = "The correlation id for this event.") + @NotNull + + public String getCorrelationId() { + return correlationId; + } + + public void setCorrelationId(String correlationId) { + this.correlationId = correlationId; + } + + public ProductDeleteEvent domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain of the event. + * @return domain + **/ + @Schema(description = "The domain of the event.") + @NotNull + + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public ProductDeleteEvent title(String title) { + this.title = title; + return this; + } + + /** + * The title of the event. + * @return title + **/ + @Schema(description = "The title of the event.") + @NotNull + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public ProductDeleteEvent description(String description) { + this.description = description; + return this; + } + + /** + * An explnatory of the event. + * @return description + **/ + @Schema(description = "An explnatory of the event.") + @NotNull + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ProductDeleteEvent priority(String priority) { + this.priority = priority; + return this; + } + + /** + * A priority. + * @return priority + **/ + @Schema(description = "A priority.") + @NotNull + + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public ProductDeleteEvent timeOcurred(Date timeOcurred) { + this.timeOcurred = timeOcurred; + return this; + } + + /** + * The time the event occured. + * @return timeOcurred + **/ + @Schema(description = "The time the event occured.") + @NotNull + + @Valid + public Date getTimeOcurred() { + return timeOcurred; + } + + public void setTimeOcurred(Date timeOcurred) { + this.timeOcurred = timeOcurred; + } + + public ProductDeleteEvent event(ProductDeleteEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + **/ + @Schema(description = "") + @NotNull + + @Valid + public ProductDeleteEventPayload getEvent() { + return event; + } + + public void setEvent(ProductDeleteEventPayload event) { + this.event = event; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductDeleteEvent productDeleteEvent = (ProductDeleteEvent) o; + return Objects.equals(this.id, productDeleteEvent.id) && + Objects.equals(this.href, productDeleteEvent.href) && + Objects.equals(this.eventId, productDeleteEvent.eventId) && + Objects.equals(this.eventTime, productDeleteEvent.eventTime) && + Objects.equals(this.eventType, productDeleteEvent.eventType) && + Objects.equals(this.correlationId, productDeleteEvent.correlationId) && + Objects.equals(this.domain, productDeleteEvent.domain) && + Objects.equals(this.title, productDeleteEvent.title) && + Objects.equals(this.description, productDeleteEvent.description) && + Objects.equals(this.priority, productDeleteEvent.priority) && + Objects.equals(this.timeOcurred, productDeleteEvent.timeOcurred) && + Objects.equals(this.event, productDeleteEvent.event); + } + + @Override + public int hashCode() { + return Objects.hash(id, href, eventId, eventTime, eventType, correlationId, domain, title, description, priority, timeOcurred, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductDeleteEvent {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).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(" 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(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/pim637/model/ProductDeleteEventPayload.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductDeleteEventPayload.java new file mode 100644 index 0000000000000000000000000000000000000000..fbe073e74da567fa7cedcf72502ed1b3b91be0bc --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductDeleteEventPayload.java @@ -0,0 +1,81 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * The event data structure + */ +@Schema(description = "The event data structure") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class ProductDeleteEventPayload { + @JsonProperty("product") + private Product product = null; + + public ProductDeleteEventPayload product(Product product) { + this.product = product; + return this; + } + + /** + * Get product + * @return product + **/ + @Schema(description = "") + @NotNull + + @Valid + public Product getProduct() { + return product; + } + + public void setProduct(Product product) { + this.product = product; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductDeleteEventPayload productDeleteEventPayload = (ProductDeleteEventPayload) o; + return Objects.equals(this.product, productDeleteEventPayload.product); + } + + @Override + public int hashCode() { + return Objects.hash(product); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductDeleteEventPayload {\n"); + + sb.append(" product: ").append(toIndentedString(product)).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/po622/model/ProductPrice.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductPrice.java similarity index 69% rename from src/main/java/org/etsi/osl/tmf/po622/model/ProductPrice.java rename to src/main/java/org/etsi/osl/tmf/pim637/model/ProductPrice.java index 58f6b58d781a484245c61ca0fb069e5b48133b01..b871aa6db1af9eed1ee245c9454da4044b097a52 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductPrice.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductPrice.java @@ -1,33 +1,20 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; +package org.etsi.osl.tmf.pim637.model; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; import java.util.Objects; - +import java.util.Set; import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; +import org.etsi.osl.tmf.pcm620.model.ProductOfferingPriceRef; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OneToOne; import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; @@ -36,13 +23,13 @@ import jakarta.validation.constraints.NotNull; */ @Schema(description = "An amount, usually of money, that represents the actual price paid by a Customer for a purchase, a rent or a lease of a Product. The price is valid for a defined period of time.") @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductPrice { +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + +@Entity(name = "ProdPrice637") +public class ProductPrice extends BaseRootNamedEntity { @JsonProperty("description") private String description = null; - @JsonProperty("name") - private String name = null; @JsonProperty("priceType") private String priceType = null; @@ -54,26 +41,24 @@ public class ProductPrice { private String unitOfMeasure = null; @JsonProperty("billingAccount") + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "billing_acc_refuuid", referencedColumnName = "uuid") private BillingAccountRef billingAccount = null; @JsonProperty("price") + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "price_uuid", referencedColumnName = "uuid") private Price price = null; @JsonProperty("productOfferingPrice") + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "prodoffprice_refuuid", referencedColumnName = "uuid") private ProductOfferingPriceRef productOfferingPrice = null; @JsonProperty("productPriceAlteration") @Valid - private List<PriceAlteration> productPriceAlteration = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + private Set<PriceAlteration> productPriceAlteration = new HashSet<>(); public ProductPrice description(String description) { this.description = description; @@ -83,9 +68,10 @@ public class ProductPrice { /** * A narrative that explains in detail the semantics of this product price. * @return description - **/ + **/ @Schema(description = "A narrative that explains in detail the semantics of this product price.") - + @NotNull + public String getDescription() { return description; } @@ -102,9 +88,10 @@ public class ProductPrice { /** * A short descriptive name such as \"Subscription price\". * @return name - **/ + **/ @Schema(description = "A short descriptive name such as \"Subscription price\".") - + @NotNull + public String getName() { return name; } @@ -121,8 +108,8 @@ public class ProductPrice { /** * A category that describes the price, such as recurring, discount, allowance, penalty, and so forth. * @return priceType - **/ - @Schema(description = "A category that describes the price, such as recurring, discount, allowance, penalty, and so forth.") + **/ + @Schema(required = true, description = "A category that describes the price, such as recurring, discount, allowance, penalty, and so forth.") @NotNull public String getPriceType() { @@ -141,9 +128,10 @@ public class ProductPrice { /** * Could be month, week... * @return recurringChargePeriod - **/ + **/ @Schema(description = "Could be month, week...") - + @NotNull + public String getRecurringChargePeriod() { return recurringChargePeriod; } @@ -160,9 +148,10 @@ public class ProductPrice { /** * Could be minutes, GB... * @return unitOfMeasure - **/ + **/ @Schema(description = "Could be minutes, GB...") - + @NotNull + public String getUnitOfMeasure() { return unitOfMeasure; } @@ -179,9 +168,10 @@ public class ProductPrice { /** * Get billingAccount * @return billingAccount - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public BillingAccountRef getBillingAccount() { return billingAccount; @@ -199,8 +189,8 @@ public class ProductPrice { /** * Get price * @return price - **/ - @Schema(description = "") + **/ + @Schema(required = true, description = "") @NotNull @Valid @@ -220,9 +210,10 @@ public class ProductPrice { /** * Get productOfferingPrice * @return productOfferingPrice - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public ProductOfferingPriceRef getProductOfferingPrice() { return productOfferingPrice; @@ -232,14 +223,14 @@ public class ProductPrice { this.productOfferingPrice = productOfferingPrice; } - public ProductPrice productPriceAlteration(List<PriceAlteration> productPriceAlteration) { + public ProductPrice productPriceAlteration(Set<PriceAlteration> productPriceAlteration) { this.productPriceAlteration = productPriceAlteration; return this; } public ProductPrice addProductPriceAlterationItem(PriceAlteration productPriceAlterationItem) { if (this.productPriceAlteration == null) { - this.productPriceAlteration = new ArrayList<>(); + this.productPriceAlteration = new HashSet<PriceAlteration>(); } this.productPriceAlteration.add(productPriceAlterationItem); return this; @@ -248,73 +239,19 @@ public class ProductPrice { /** * Get productPriceAlteration * @return productPriceAlteration - **/ + **/ @Schema(description = "") - @Valid - public List<PriceAlteration> getProductPriceAlteration() { + @NotNull + @Valid + public Set<PriceAlteration> getProductPriceAlteration() { return productPriceAlteration; } - public void setProductPriceAlteration(List<PriceAlteration> productPriceAlteration) { + public void setProductPriceAlteration(Set<PriceAlteration> productPriceAlteration) { this.productPriceAlteration = productPriceAlteration; } - public ProductPrice baseType(String baseType) { - this.baseType = baseType; - return this; - } - - /** - * When sub-classing, this defines the super-class - * @return baseType - **/ - @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { - return baseType; - } - - public void setAtBaseType(String baseType) { - this.baseType = baseType; - } - - public ProductPrice schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - public String getAtSchemaLocation() { - return schemaLocation; - } - - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - public ProductPrice type(String type) { - this.type = type; - return this; - } - - /** - * When sub-classing, this defines the sub-class entity name - * @return type - **/ - @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { - return type; - } - - public void setAtType(String type) { - this.type = type; - } + @Override @@ -337,12 +274,12 @@ public class ProductPrice { Objects.equals(this.productPriceAlteration, productPrice.productPriceAlteration) && Objects.equals(this.baseType, productPrice.baseType) && Objects.equals(this.schemaLocation, productPrice.schemaLocation) && - Objects.equals(this.type, productPrice.type); + Objects.equals(this.baseType, productPrice.baseType); } @Override public int hashCode() { - return Objects.hash(description, name, priceType, recurringChargePeriod, unitOfMeasure, billingAccount, price, productOfferingPrice, productPriceAlteration, baseType, schemaLocation, type); + return Objects.hash(description, name, priceType, recurringChargePeriod, unitOfMeasure, billingAccount, price, productOfferingPrice, productPriceAlteration, baseType, schemaLocation, baseType); } @Override @@ -359,9 +296,9 @@ public class ProductPrice { sb.append(" price: ").append(toIndentedString(price)).append("\n"); sb.append(" productOfferingPrice: ").append(toIndentedString(productOfferingPrice)).append("\n"); sb.append(" productPriceAlteration: ").append(toIndentedString(productPriceAlteration)).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(" _atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" _atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" _atType: ").append(toIndentedString(baseType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductRef.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRef.java similarity index 54% rename from src/main/java/org/etsi/osl/tmf/po622/model/ProductRef.java rename to src/main/java/org/etsi/osl/tmf/pim637/model/ProductRef.java index 92d6d9cd96796c22a37f4fd2ce577fb14806c7ff..41860d3606a81fca3f9afa7ead7e55fc4859fc13 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductRef.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRef.java @@ -1,56 +1,25 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; +package org.etsi.osl.tmf.pim637.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; /** * ProductRef */ @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductRef { +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + +@Entity(name = "ProductRef637") +public class ProductRef extends BaseRootNamedEntity { @JsonProperty("id") private String id = null; - @JsonProperty("href") - private String href = null; - - @JsonProperty("name") - private String name = null; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; @JsonProperty("@referredType") private String _atReferredType = null; @@ -63,8 +32,8 @@ public class ProductRef { /** * Unique identifier of a related entity. * @return id - **/ - @Schema(description = "Unique identifier of a related entity.") + **/ + @Schema(required = true, description = "Unique identifier of a related entity.") @NotNull public String getId() { @@ -83,9 +52,10 @@ public class ProductRef { /** * Reference of the related entity. * @return href - **/ + **/ @Schema(description = "Reference of the related entity.") - + @NotNull + public String getHref() { return href; } @@ -102,9 +72,10 @@ public class ProductRef { /** * Name of the related entity. * @return name - **/ + **/ @Schema(description = "Name of the related entity.") - + @NotNull + public String getName() { return name; } @@ -113,62 +84,8 @@ public class ProductRef { this.name = name; } - public ProductRef baseType(String baseType) { - this.baseType = baseType; - return this; - } - - /** - * When sub-classing, this defines the super-class - * @return baseType - **/ - @Schema(description = "When sub-classing, this defines the super-class") - public String getAtBaseType() { - return baseType; - } - public void setAtBaseType(String baseType) { - this.baseType = baseType; - } - - public ProductRef schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - public String getAtSchemaLocation() { - return schemaLocation; - } - - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - public ProductRef type(String type) { - this.type = type; - return this; - } - - /** - * When sub-classing, this defines the sub-class entity name - * @return type - **/ - @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { - return type; - } - - public void setAtType(String type) { - this.type = type; - } public ProductRef _atReferredType(String _atReferredType) { this._atReferredType = _atReferredType; @@ -178,9 +95,10 @@ public class ProductRef { /** * The actual type of the target instance when needed for disambiguation. * @return _atReferredType - **/ + **/ @Schema(description = "The actual type of the target instance when needed for disambiguation.") - + @NotNull + public String getAtReferredType() { return _atReferredType; } @@ -221,9 +139,9 @@ public class ProductRef { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" href: ").append(toIndentedString(href)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).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(" _atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" _atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" _atType: ").append(toIndentedString(type)).append("\n"); sb.append(" _atReferredType: ").append(toIndentedString(_atReferredType)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRefOrValue.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRefOrValue.java new file mode 100644 index 0000000000000000000000000000000000000000..c95f059d0594f6e09ab2cb752ff06aa4a65acb27 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRefOrValue.java @@ -0,0 +1,83 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.service.Characteristic; +import org.etsi.osl.tmf.common.model.service.ResourceRef; +import org.etsi.osl.tmf.common.model.service.ServiceRef; +import org.etsi.osl.tmf.pcm620.model.ProductOfferingRef; +import org.etsi.osl.tmf.pcm620.model.ProductSpecificationRef; +import org.etsi.osl.tmf.po622.model.AgreementItemRef; +import org.etsi.osl.tmf.po622.model.RelatedProductOrderItem; +import org.etsi.osl.tmf.prm669.model.RelatedParty; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * A product to be created defined by value or existing defined by reference. The polymorphic + * attributes @type, @schemaLocation & @referredType are related to the product entity and not + * the RelatedProductRefOrValue class itself + */ +@Schema( + description = "A product to be created defined by value or existing defined by reference. The polymorphic attributes @type, @schemaLocation & @referredType are related to the product entity and not the RelatedProductRefOrValue class itself") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", + date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + +@Entity(name = "ProdRefOrVal637") +@JsonIgnoreProperties({"uuid"}) +public class ProductRefOrValue extends Product { + + + @Schema(description = "Unique identifier of the product") + @NotNull + + public String getId() { + if (id == null) { + return super.getId(); + } + return this.id; + } + + public void setId(String id) { + this.id = id; + } + + public Characteristic findCharacteristicByName(String aName) { + for (Characteristic c : productCharacteristic) { + if (c.getName().equals(aName)) { + return c; + } + } + + return null; + } + + public Object getRealizingServiceById(@NotNull String id) { + for (ServiceRef sr : realizingService) { + if ( sr.getId().equals(id)) { + return sr; + } + } + return null; + } + + public Object getRealizingResourceById(@NotNull String id) { + for (ResourceRef sr : realizingResource) { + if ( sr.getId().equals(id)) { + return sr; + } + } + return null; + } + + + +} diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductRelationship.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRelationship.java similarity index 54% rename from src/main/java/org/etsi/osl/tmf/po622/model/ProductRelationship.java rename to src/main/java/org/etsi/osl/tmf/pim637/model/ProductRelationship.java index 309c363c0e25411a3456f91e810dce8a6c05eead..331b8fb5070609e14630fdcdb3207301d1033ea1 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductRelationship.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRelationship.java @@ -1,31 +1,15 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; +package org.etsi.osl.tmf.pim637.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.OneToOne; import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; @@ -34,22 +18,18 @@ import jakarta.validation.constraints.NotNull; */ @Schema(description = "Linked products to the one instantiate, such as [bundled] if the product is a bundle and you want to describe the bundled products inside this bundle; [reliesOn] if the product needs another already owned product to rely on (e.g. an option on an already owned mobile access product) [targets] or [isTargeted] (depending on the way of expressing the link) for any other kind of links that may be useful") @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductRelationship { +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + +@Entity(name = "ProdRel637") +public class ProductRelationship extends BaseRootEntity { @JsonProperty("relationshipType") private String relationshipType = null; @JsonProperty("product") + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "prod_refuuid", referencedColumnName = "uuid") private ProductRefOrValue product = null; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; public ProductRelationship relationshipType(String relationshipType) { this.relationshipType = relationshipType; @@ -59,8 +39,8 @@ public class ProductRelationship { /** * Type of the product relationship, such as [bundled] if the product is a bundle and you want to describe the bundled products inside this bundle; [reliesOn] if the product needs another already owned product to rely on (e.g. an option on an already owned mobile access product) [targets] or [isTargeted] (depending on the way of expressing the link) for any other kind of links that may be useful * @return relationshipType - **/ - @Schema(description = "Type of the product relationship, such as [bundled] if the product is a bundle and you want to describe the bundled products inside this bundle; [reliesOn] if the product needs another already owned product to rely on (e.g. an option on an already owned mobile access product) [targets] or [isTargeted] (depending on the way of expressing the link) for any other kind of links that may be useful") + **/ + @Schema(required = true, description = "Type of the product relationship, such as [bundled] if the product is a bundle and you want to describe the bundled products inside this bundle; [reliesOn] if the product needs another already owned product to rely on (e.g. an option on an already owned mobile access product) [targets] or [isTargeted] (depending on the way of expressing the link) for any other kind of links that may be useful") @NotNull public String getRelationshipType() { @@ -79,8 +59,8 @@ public class ProductRelationship { /** * Get product * @return product - **/ - @Schema(description = "") + **/ + @Schema(required = true, description = "") @NotNull @Valid @@ -92,62 +72,7 @@ public class ProductRelationship { this.product = product; } - public ProductRelationship baseType(String baseType) { - this.baseType = baseType; - return this; - } - - /** - * When sub-classing, this defines the super-class - * @return baseType - **/ - @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { - return baseType; - } - - public void setAtBaseType(String baseType) { - this.baseType = baseType; - } - - public ProductRelationship schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - public String getAtSchemaLocation() { - return schemaLocation; - } - - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - public ProductRelationship type(String type) { - this.type = type; - return this; - } - - /** - * When sub-classing, this defines the sub-class entity name - * @return type - **/ - @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { - return type; - } - - public void setAtType(String type) { - this.type = type; - } + @Override @@ -178,9 +103,9 @@ public class ProductRelationship { sb.append(" relationshipType: ").append(toIndentedString(relationshipType)).append("\n"); sb.append(" product: ").append(toIndentedString(product)).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(" _atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" _atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" _atType: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductStateChangeEvent.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductStateChangeEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..a5aa7f6af06ea4e8d869fdd2da77fcb3a77a252b --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductStateChangeEvent.java @@ -0,0 +1,359 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Date; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * The notification data structure + */ +@Schema(description = "The notification data structure") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class ProductStateChangeEvent { + @JsonProperty("id") + private String id = null; + + @JsonProperty("href") + private String href = null; + + @JsonProperty("eventId") + private String eventId = null; + + @JsonProperty("eventTime") + private Date eventTime = null; + + @JsonProperty("eventType") + private String eventType = null; + + @JsonProperty("correlationId") + private String correlationId = null; + + @JsonProperty("domain") + private String domain = null; + + @JsonProperty("title") + private String title = null; + + @JsonProperty("description") + private String description = null; + + @JsonProperty("priority") + private String priority = null; + + @JsonProperty("timeOcurred") + private Date timeOcurred = null; + + @JsonProperty("event") + private ProductStateChangeEventPayload event = null; + + public ProductStateChangeEvent id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the Process flow + * @return id + **/ + @Schema(description = "Identifier of the Process flow") + @NotNull + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ProductStateChangeEvent href(String href) { + this.href = href; + return this; + } + + /** + * Reference of the ProcessFlow + * @return href + **/ + @Schema(description = "Reference of the ProcessFlow") + @NotNull + + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public ProductStateChangeEvent eventId(String eventId) { + this.eventId = eventId; + return this; + } + + /** + * The identifier of the notification. + * @return eventId + **/ + @Schema(description = "The identifier of the notification.") + @NotNull + + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + public ProductStateChangeEvent eventTime(Date eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * Time of the event occurrence. + * @return eventTime + **/ + @Schema(description = "Time of the event occurrence.") + @NotNull + + @Valid + public Date getEventTime() { + return eventTime; + } + + public void setEventTime(Date eventTime) { + this.eventTime = eventTime; + } + + public ProductStateChangeEvent eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * The type of the notification. + * @return eventType + **/ + @Schema(description = "The type of the notification.") + @NotNull + + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public ProductStateChangeEvent correlationId(String correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * The correlation id for this event. + * @return correlationId + **/ + @Schema(description = "The correlation id for this event.") + @NotNull + + public String getCorrelationId() { + return correlationId; + } + + public void setCorrelationId(String correlationId) { + this.correlationId = correlationId; + } + + public ProductStateChangeEvent domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain of the event. + * @return domain + **/ + @Schema(description = "The domain of the event.") + @NotNull + + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public ProductStateChangeEvent title(String title) { + this.title = title; + return this; + } + + /** + * The title of the event. + * @return title + **/ + @Schema(description = "The title of the event.") + @NotNull + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public ProductStateChangeEvent description(String description) { + this.description = description; + return this; + } + + /** + * An explnatory of the event. + * @return description + **/ + @Schema(description = "An explnatory of the event.") + @NotNull + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ProductStateChangeEvent priority(String priority) { + this.priority = priority; + return this; + } + + /** + * A priority. + * @return priority + **/ + @Schema(description = "A priority.") + @NotNull + + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public ProductStateChangeEvent timeOcurred(Date timeOcurred) { + this.timeOcurred = timeOcurred; + return this; + } + + /** + * The time the event occured. + * @return timeOcurred + **/ + @Schema(description = "The time the event occured.") + @NotNull + + @Valid + public Date getTimeOcurred() { + return timeOcurred; + } + + public void setTimeOcurred(Date timeOcurred) { + this.timeOcurred = timeOcurred; + } + + public ProductStateChangeEvent event(ProductStateChangeEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + **/ + @Schema(description = "") + @NotNull + + @Valid + public ProductStateChangeEventPayload getEvent() { + return event; + } + + public void setEvent(ProductStateChangeEventPayload event) { + this.event = event; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductStateChangeEvent productStateChangeEvent = (ProductStateChangeEvent) o; + return Objects.equals(this.id, productStateChangeEvent.id) && + Objects.equals(this.href, productStateChangeEvent.href) && + Objects.equals(this.eventId, productStateChangeEvent.eventId) && + Objects.equals(this.eventTime, productStateChangeEvent.eventTime) && + Objects.equals(this.eventType, productStateChangeEvent.eventType) && + Objects.equals(this.correlationId, productStateChangeEvent.correlationId) && + Objects.equals(this.domain, productStateChangeEvent.domain) && + Objects.equals(this.title, productStateChangeEvent.title) && + Objects.equals(this.description, productStateChangeEvent.description) && + Objects.equals(this.priority, productStateChangeEvent.priority) && + Objects.equals(this.timeOcurred, productStateChangeEvent.timeOcurred) && + Objects.equals(this.event, productStateChangeEvent.event); + } + + @Override + public int hashCode() { + return Objects.hash(id, href, eventId, eventTime, eventType, correlationId, domain, title, description, priority, timeOcurred, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductStateChangeEvent {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).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(" 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(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/pim637/model/ProductStateChangeEventPayload.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductStateChangeEventPayload.java new file mode 100644 index 0000000000000000000000000000000000000000..a492a3f7a49db34af09a948afd38d280f77316c7 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductStateChangeEventPayload.java @@ -0,0 +1,81 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * The event data structure + */ +@Schema(description = "The event data structure") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class ProductStateChangeEventPayload { + @JsonProperty("product") + private Product product = null; + + public ProductStateChangeEventPayload product(Product product) { + this.product = product; + return this; + } + + /** + * Get product + * @return product + **/ + @Schema(description = "") + @NotNull + + @Valid + public Product getProduct() { + return product; + } + + public void setProduct(Product product) { + this.product = product; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductStateChangeEventPayload productStateChangeEventPayload = (ProductStateChangeEventPayload) o; + return Objects.equals(this.product, productStateChangeEventPayload.product); + } + + @Override + public int hashCode() { + return Objects.hash(product); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductStateChangeEventPayload {\n"); + + sb.append(" product: ").append(toIndentedString(product)).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/pim637/model/ProductStatusType.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductStatusType.java new file mode 100644 index 0000000000000000000000000000000000000000..616f74176af27154a9e12ee791aedee55a2fb4f9 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductStatusType.java @@ -0,0 +1,40 @@ +package org.etsi.osl.tmf.pim637.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Possible values for the status of the product + */ +public enum ProductStatusType { + CREATED("CREATED"), + PENDINGACTIVE("PENDINGACTIVE"), + CANCELLED("CANCELLED"), + ACTIVE("ACTIVE"), + PENDINGTERMINATE("PENDINGTERMINATE"), + TERMINATED("TERMINATED"), + SUSPENDED("SUSPENDED"), + ABORTED_("ABORTED_ "); + + private String value; + + ProductStatusType(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ProductStatusType fromValue(String text) { + for (ProductStatusType b : ProductStatusType.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductTerm.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductTerm.java similarity index 57% rename from src/main/java/org/etsi/osl/tmf/po622/model/ProductTerm.java rename to src/main/java/org/etsi/osl/tmf/pim637/model/ProductTerm.java index b43c08941c5fb2b816d01bad7edbc5b845e2edd5..4207102702166c26b6f10723ed14afdea2f89436 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductTerm.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductTerm.java @@ -1,45 +1,27 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; +package org.etsi.osl.tmf.pim637.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.etsi.osl.tmf.common.model.Quantity; import org.etsi.osl.tmf.common.model.TimePeriod; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.Valid; - +import jakarta.validation.constraints.NotNull; /** * Description of a productTerm linked to this product. This represent a commitment with a duration */ @Schema(description = "Description of a productTerm linked to this product. This represent a commitment with a duration") @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductTerm { +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + +@Entity(name = "ProdTerm637") +public class ProductTerm extends BaseRootNamedEntity { @JsonProperty("description") private String description = null; - @JsonProperty("name") - private String name = null; @JsonProperty("duration") private Quantity duration = null; @@ -47,15 +29,6 @@ public class ProductTerm { @JsonProperty("validFor") private TimePeriod validFor = null; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; - public ProductTerm description(String description) { this.description = description; return this; @@ -64,9 +37,10 @@ public class ProductTerm { /** * Description of the productTerm * @return description - **/ + **/ @Schema(description = "Description of the productTerm") - + @NotNull + public String getDescription() { return description; } @@ -83,9 +57,10 @@ public class ProductTerm { /** * Name of the productTerm * @return name - **/ + **/ @Schema(description = "Name of the productTerm") - + @NotNull + public String getName() { return name; } @@ -102,9 +77,10 @@ public class ProductTerm { /** * Get duration * @return duration - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public Quantity getDuration() { return duration; @@ -122,9 +98,10 @@ public class ProductTerm { /** * Get validFor * @return validFor - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public TimePeriod getValidFor() { return validFor; @@ -134,62 +111,7 @@ public class ProductTerm { this.validFor = validFor; } - public ProductTerm baseType(String baseType) { - this.baseType = baseType; - return this; - } - - /** - * When sub-classing, this defines the super-class - * @return baseType - **/ - @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { - return baseType; - } - - public void setAtBaseType(String baseType) { - this.baseType = baseType; - } - - public ProductTerm schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - public String getAtSchemaLocation() { - return schemaLocation; - } - - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - public ProductTerm type(String type) { - this.type = type; - return this; - } - - /** - * When sub-classing, this defines the sub-class entity name - * @return type - **/ - @Schema(description = "When sub-classing, this defines the sub-class entity name") - public String getAtType() { - return type; - } - - public void setAtType(String type) { - this.type = type; - } @Override @@ -224,9 +146,9 @@ public class ProductTerm { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" validFor: ").append(toIndentedString(validFor)).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(" _atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" _atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" _atType: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductRefOrValue.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductUpdate.java similarity index 59% rename from src/main/java/org/etsi/osl/tmf/po622/model/ProductRefOrValue.java rename to src/main/java/org/etsi/osl/tmf/pim637/model/ProductUpdate.java index c77a6ed7d9376834d228c4e10263436d31d12a96..aff9c7cb50fa722e19ef0dcd5dae6c05b1ad2023 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductRefOrValue.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductUpdate.java @@ -1,50 +1,32 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; +package org.etsi.osl.tmf.pim637.model; -import java.time.OffsetDateTime; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.service.Characteristic; import org.etsi.osl.tmf.common.model.service.ResourceRef; import org.etsi.osl.tmf.common.model.service.ServiceRef; +import org.etsi.osl.tmf.pcm620.model.ProductOfferingRef; +import org.etsi.osl.tmf.pcm620.model.ProductSpecificationRef; +import org.etsi.osl.tmf.po622.model.AgreementItemRef; +import org.etsi.osl.tmf.po622.model.RelatedProductOrderItem; import org.etsi.osl.tmf.prm669.model.RelatedParty; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; /** - * A product to be created defined by value or existing defined by reference. The polymorphic attributes @type, @schemaLocation & @referredType are related to the product entity and not the RelatedProductRefOrValue class itself + * A product offering procured by a customer or other interested party playing a party role. A product is realized as one or more service(s) and / or resource(s). Skipped properties: id,href */ -@Schema(description = "A product to be created defined by value or existing defined by reference. The polymorphic attributes @type, @schemaLocation & @referredType are related to the product entity and not the RelatedProductRefOrValue class itself") +@Schema(description = "A product offering procured by a customer or other interested party playing a party role. A product is realized as one or more service(s) and / or resource(s). Skipped properties: id,href") @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductRefOrValue { - @JsonProperty("id") - private String id = null; +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") - @JsonProperty("href") - private String href = null; +public class ProductUpdate { @JsonProperty("description") private String description = null; @@ -58,16 +40,16 @@ public class ProductRefOrValue { private String name = null; @JsonProperty("orderDate") - private OffsetDateTime orderDate = null; + private Date orderDate = null; @JsonProperty("productSerialNumber") private String productSerialNumber = null; @JsonProperty("startDate") - private OffsetDateTime startDate = null; + private Date startDate = null; @JsonProperty("terminationDate") - private OffsetDateTime terminationDate = null; + private Date terminationDate = null; @JsonProperty("agreement") @Valid @@ -126,56 +108,15 @@ public class ProductRefOrValue { private ProductStatusType status = null; @JsonProperty("@baseType") - private String baseType = null; + private String _atBaseType = null; @JsonProperty("@schemaLocation") - private String schemaLocation = null; + private String _atSchemaLocation = null; @JsonProperty("@type") - private String type = null; - - @JsonProperty("@referredType") - private String _atReferredType = null; - - public ProductRefOrValue id(String id) { - this.id = id; - return this; - } - - /** - * Unique identifier of the product - * @return id - **/ - @Schema(description = "Unique identifier of the product") - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public ProductRefOrValue href(String href) { - this.href = href; - return this; - } + private String _atType = null; - /** - * Reference of the product - * @return href - **/ - @Schema(description = "Reference of the product") - - public String getHref() { - return href; - } - - public void setHref(String href) { - this.href = href; - } - - public ProductRefOrValue description(String description) { + public ProductUpdate description(String description) { this.description = description; return this; } @@ -183,9 +124,10 @@ public class ProductRefOrValue { /** * Is the description of the product. It could be copied from the description of the Product Offering. * @return description - **/ + **/ @Schema(description = "Is the description of the product. It could be copied from the description of the Product Offering.") - + @NotNull + public String getDescription() { return description; } @@ -194,7 +136,7 @@ public class ProductRefOrValue { this.description = description; } - public ProductRefOrValue isBundle(Boolean isBundle) { + public ProductUpdate isBundle(Boolean isBundle) { this.isBundle = isBundle; return this; } @@ -202,9 +144,10 @@ public class ProductRefOrValue { /** * If true, the product is a ProductBundle which is an instantiation of a BundledProductOffering. If false, the product is a ProductComponent which is an instantiation of a SimpleProductOffering. * @return isBundle - **/ + **/ @Schema(description = "If true, the product is a ProductBundle which is an instantiation of a BundledProductOffering. If false, the product is a ProductComponent which is an instantiation of a SimpleProductOffering.") - + @NotNull + public Boolean isIsBundle() { return isBundle; } @@ -213,7 +156,7 @@ public class ProductRefOrValue { this.isBundle = isBundle; } - public ProductRefOrValue isCustomerVisible(Boolean isCustomerVisible) { + public ProductUpdate isCustomerVisible(Boolean isCustomerVisible) { this.isCustomerVisible = isCustomerVisible; return this; } @@ -221,9 +164,10 @@ public class ProductRefOrValue { /** * If true, the product is visible by the customer. * @return isCustomerVisible - **/ + **/ @Schema(description = "If true, the product is visible by the customer.") - + @NotNull + public Boolean isIsCustomerVisible() { return isCustomerVisible; } @@ -232,7 +176,7 @@ public class ProductRefOrValue { this.isCustomerVisible = isCustomerVisible; } - public ProductRefOrValue name(String name) { + public ProductUpdate name(String name) { this.name = name; return this; } @@ -240,9 +184,10 @@ public class ProductRefOrValue { /** * Name of the product. It could be the same as the name of the product offering * @return name - **/ + **/ @Schema(description = "Name of the product. It could be the same as the name of the product offering") - + @NotNull + public String getName() { return name; } @@ -251,7 +196,7 @@ public class ProductRefOrValue { this.name = name; } - public ProductRefOrValue orderDate(OffsetDateTime orderDate) { + public ProductUpdate orderDate(Date orderDate) { this.orderDate = orderDate; return this; } @@ -259,19 +204,20 @@ public class ProductRefOrValue { /** * Is the date when the product was ordered * @return orderDate - **/ + **/ @Schema(description = "Is the date when the product was ordered") - + @NotNull + @Valid - public OffsetDateTime getOrderDate() { + public Date getOrderDate() { return orderDate; } - public void setOrderDate(OffsetDateTime orderDate) { + public void setOrderDate(Date orderDate) { this.orderDate = orderDate; } - public ProductRefOrValue productSerialNumber(String productSerialNumber) { + public ProductUpdate productSerialNumber(String productSerialNumber) { this.productSerialNumber = productSerialNumber; return this; } @@ -279,9 +225,10 @@ public class ProductRefOrValue { /** * Is the serial number for the product. This is typically applicable to tangible products e.g. Broadband Router. * @return productSerialNumber - **/ + **/ @Schema(description = "Is the serial number for the product. This is typically applicable to tangible products e.g. Broadband Router.") - + @NotNull + public String getProductSerialNumber() { return productSerialNumber; } @@ -290,7 +237,7 @@ public class ProductRefOrValue { this.productSerialNumber = productSerialNumber; } - public ProductRefOrValue startDate(OffsetDateTime startDate) { + public ProductUpdate startDate(Date startDate) { this.startDate = startDate; return this; } @@ -298,19 +245,20 @@ public class ProductRefOrValue { /** * Is the date from which the product starts * @return startDate - **/ + **/ @Schema(description = "Is the date from which the product starts") - + @NotNull + @Valid - public OffsetDateTime getStartDate() { + public Date getStartDate() { return startDate; } - public void setStartDate(OffsetDateTime startDate) { + public void setStartDate(Date startDate) { this.startDate = startDate; } - public ProductRefOrValue terminationDate(OffsetDateTime terminationDate) { + public ProductUpdate terminationDate(Date terminationDate) { this.terminationDate = terminationDate; return this; } @@ -318,26 +266,27 @@ public class ProductRefOrValue { /** * Is the date when the product was terminated * @return terminationDate - **/ + **/ @Schema(description = "Is the date when the product was terminated") - + @NotNull + @Valid - public OffsetDateTime getTerminationDate() { + public Date getTerminationDate() { return terminationDate; } - public void setTerminationDate(OffsetDateTime terminationDate) { + public void setTerminationDate(Date terminationDate) { this.terminationDate = terminationDate; } - public ProductRefOrValue agreement(List<AgreementItemRef> agreement) { + public ProductUpdate agreement(List<AgreementItemRef> agreement) { this.agreement = agreement; return this; } - public ProductRefOrValue addAgreementItem(AgreementItemRef agreementItem) { + public ProductUpdate addAgreementItem(AgreementItemRef agreementItem) { if (this.agreement == null) { - this.agreement = new ArrayList<>(); + this.agreement = new ArrayList<AgreementItemRef>(); } this.agreement.add(agreementItem); return this; @@ -346,9 +295,10 @@ public class ProductRefOrValue { /** * Get agreement * @return agreement - **/ + **/ @Schema(description = "") - @Valid + @NotNull + @Valid public List<AgreementItemRef> getAgreement() { return agreement; } @@ -357,7 +307,7 @@ public class ProductRefOrValue { this.agreement = agreement; } - public ProductRefOrValue billingAccount(BillingAccountRef billingAccount) { + public ProductUpdate billingAccount(BillingAccountRef billingAccount) { this.billingAccount = billingAccount; return this; } @@ -365,9 +315,10 @@ public class ProductRefOrValue { /** * Get billingAccount * @return billingAccount - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public BillingAccountRef getBillingAccount() { return billingAccount; @@ -377,14 +328,14 @@ public class ProductRefOrValue { this.billingAccount = billingAccount; } - public ProductRefOrValue place(List<RelatedPlaceRefOrValue> place) { + public ProductUpdate place(List<RelatedPlaceRefOrValue> place) { this.place = place; return this; } - public ProductRefOrValue addPlaceItem(RelatedPlaceRefOrValue placeItem) { + public ProductUpdate addPlaceItem(RelatedPlaceRefOrValue placeItem) { if (this.place == null) { - this.place = new ArrayList<>(); + this.place = new ArrayList<RelatedPlaceRefOrValue>(); } this.place.add(placeItem); return this; @@ -393,9 +344,10 @@ public class ProductRefOrValue { /** * Get place * @return place - **/ + **/ @Schema(description = "") - @Valid + @NotNull + @Valid public List<RelatedPlaceRefOrValue> getPlace() { return place; } @@ -404,14 +356,14 @@ public class ProductRefOrValue { this.place = place; } - public ProductRefOrValue product(List<ProductRefOrValue> product) { + public ProductUpdate product(List<ProductRefOrValue> product) { this.product = product; return this; } - public ProductRefOrValue addProductItem(ProductRefOrValue productItem) { + public ProductUpdate addProductItem(ProductRefOrValue productItem) { if (this.product == null) { - this.product = new ArrayList<>(); + this.product = new ArrayList<ProductRefOrValue>(); } this.product.add(productItem); return this; @@ -420,9 +372,10 @@ public class ProductRefOrValue { /** * Get product * @return product - **/ + **/ @Schema(description = "") - @Valid + @NotNull + @Valid public List<ProductRefOrValue> getProduct() { return product; } @@ -431,14 +384,14 @@ public class ProductRefOrValue { this.product = product; } - public ProductRefOrValue productCharacteristic(List<Characteristic> productCharacteristic) { + public ProductUpdate productCharacteristic(List<Characteristic> productCharacteristic) { this.productCharacteristic = productCharacteristic; return this; } - public ProductRefOrValue addProductCharacteristicItem(Characteristic productCharacteristicItem) { + public ProductUpdate addProductCharacteristicItem(Characteristic productCharacteristicItem) { if (this.productCharacteristic == null) { - this.productCharacteristic = new ArrayList<>(); + this.productCharacteristic = new ArrayList<Characteristic>(); } this.productCharacteristic.add(productCharacteristicItem); return this; @@ -447,9 +400,10 @@ public class ProductRefOrValue { /** * Get productCharacteristic * @return productCharacteristic - **/ + **/ @Schema(description = "") - @Valid + @NotNull + @Valid public List<Characteristic> getProductCharacteristic() { return productCharacteristic; } @@ -458,7 +412,7 @@ public class ProductRefOrValue { this.productCharacteristic = productCharacteristic; } - public ProductRefOrValue productOffering(ProductOfferingRef productOffering) { + public ProductUpdate productOffering(ProductOfferingRef productOffering) { this.productOffering = productOffering; return this; } @@ -466,9 +420,10 @@ public class ProductRefOrValue { /** * Get productOffering * @return productOffering - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public ProductOfferingRef getProductOffering() { return productOffering; @@ -478,14 +433,14 @@ public class ProductRefOrValue { this.productOffering = productOffering; } - public ProductRefOrValue productOrderItem(List<RelatedProductOrderItem> productOrderItem) { + public ProductUpdate productOrderItem(List<RelatedProductOrderItem> productOrderItem) { this.productOrderItem = productOrderItem; return this; } - public ProductRefOrValue addProductOrderItemItem(RelatedProductOrderItem productOrderItemItem) { + public ProductUpdate addProductOrderItemItem(RelatedProductOrderItem productOrderItemItem) { if (this.productOrderItem == null) { - this.productOrderItem = new ArrayList<>(); + this.productOrderItem = new ArrayList<RelatedProductOrderItem>(); } this.productOrderItem.add(productOrderItemItem); return this; @@ -494,9 +449,10 @@ public class ProductRefOrValue { /** * Get productOrderItem * @return productOrderItem - **/ + **/ @Schema(description = "") - @Valid + @NotNull + @Valid public List<RelatedProductOrderItem> getProductOrderItem() { return productOrderItem; } @@ -505,14 +461,14 @@ public class ProductRefOrValue { this.productOrderItem = productOrderItem; } - public ProductRefOrValue productPrice(List<ProductPrice> productPrice) { + public ProductUpdate productPrice(List<ProductPrice> productPrice) { this.productPrice = productPrice; return this; } - public ProductRefOrValue addProductPriceItem(ProductPrice productPriceItem) { + public ProductUpdate addProductPriceItem(ProductPrice productPriceItem) { if (this.productPrice == null) { - this.productPrice = new ArrayList<>(); + this.productPrice = new ArrayList<ProductPrice>(); } this.productPrice.add(productPriceItem); return this; @@ -521,9 +477,10 @@ public class ProductRefOrValue { /** * Get productPrice * @return productPrice - **/ + **/ @Schema(description = "") - @Valid + @NotNull + @Valid public List<ProductPrice> getProductPrice() { return productPrice; } @@ -532,14 +489,14 @@ public class ProductRefOrValue { this.productPrice = productPrice; } - public ProductRefOrValue productRelationship(List<ProductRelationship> productRelationship) { + public ProductUpdate productRelationship(List<ProductRelationship> productRelationship) { this.productRelationship = productRelationship; return this; } - public ProductRefOrValue addProductRelationshipItem(ProductRelationship productRelationshipItem) { + public ProductUpdate addProductRelationshipItem(ProductRelationship productRelationshipItem) { if (this.productRelationship == null) { - this.productRelationship = new ArrayList<>(); + this.productRelationship = new ArrayList<ProductRelationship>(); } this.productRelationship.add(productRelationshipItem); return this; @@ -548,9 +505,10 @@ public class ProductRefOrValue { /** * Get productRelationship * @return productRelationship - **/ + **/ @Schema(description = "") - @Valid + @NotNull + @Valid public List<ProductRelationship> getProductRelationship() { return productRelationship; } @@ -559,7 +517,7 @@ public class ProductRefOrValue { this.productRelationship = productRelationship; } - public ProductRefOrValue productSpecification(ProductSpecificationRef productSpecification) { + public ProductUpdate productSpecification(ProductSpecificationRef productSpecification) { this.productSpecification = productSpecification; return this; } @@ -567,9 +525,10 @@ public class ProductRefOrValue { /** * Get productSpecification * @return productSpecification - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public ProductSpecificationRef getProductSpecification() { return productSpecification; @@ -579,14 +538,14 @@ public class ProductRefOrValue { this.productSpecification = productSpecification; } - public ProductRefOrValue productTerm(List<ProductTerm> productTerm) { + public ProductUpdate productTerm(List<ProductTerm> productTerm) { this.productTerm = productTerm; return this; } - public ProductRefOrValue addProductTermItem(ProductTerm productTermItem) { + public ProductUpdate addProductTermItem(ProductTerm productTermItem) { if (this.productTerm == null) { - this.productTerm = new ArrayList<>(); + this.productTerm = new ArrayList<ProductTerm>(); } this.productTerm.add(productTermItem); return this; @@ -595,9 +554,10 @@ public class ProductRefOrValue { /** * Get productTerm * @return productTerm - **/ + **/ @Schema(description = "") - @Valid + @NotNull + @Valid public List<ProductTerm> getProductTerm() { return productTerm; } @@ -606,14 +566,14 @@ public class ProductRefOrValue { this.productTerm = productTerm; } - public ProductRefOrValue realizingResource(List<ResourceRef> realizingResource) { + public ProductUpdate realizingResource(List<ResourceRef> realizingResource) { this.realizingResource = realizingResource; return this; } - public ProductRefOrValue addRealizingResourceItem(ResourceRef realizingResourceItem) { + public ProductUpdate addRealizingResourceItem(ResourceRef realizingResourceItem) { if (this.realizingResource == null) { - this.realizingResource = new ArrayList<>(); + this.realizingResource = new ArrayList<ResourceRef>(); } this.realizingResource.add(realizingResourceItem); return this; @@ -622,9 +582,10 @@ public class ProductRefOrValue { /** * Get realizingResource * @return realizingResource - **/ + **/ @Schema(description = "") - @Valid + @NotNull + @Valid public List<ResourceRef> getRealizingResource() { return realizingResource; } @@ -633,14 +594,14 @@ public class ProductRefOrValue { this.realizingResource = realizingResource; } - public ProductRefOrValue realizingService(List<ServiceRef> realizingService) { + public ProductUpdate realizingService(List<ServiceRef> realizingService) { this.realizingService = realizingService; return this; } - public ProductRefOrValue addRealizingServiceItem(ServiceRef realizingServiceItem) { + public ProductUpdate addRealizingServiceItem(ServiceRef realizingServiceItem) { if (this.realizingService == null) { - this.realizingService = new ArrayList<>(); + this.realizingService = new ArrayList<ServiceRef>(); } this.realizingService.add(realizingServiceItem); return this; @@ -649,9 +610,10 @@ public class ProductRefOrValue { /** * Get realizingService * @return realizingService - **/ + **/ @Schema(description = "") - @Valid + @NotNull + @Valid public List<ServiceRef> getRealizingService() { return realizingService; } @@ -660,14 +622,14 @@ public class ProductRefOrValue { this.realizingService = realizingService; } - public ProductRefOrValue relatedParty(List<RelatedParty> relatedParty) { + public ProductUpdate relatedParty(List<RelatedParty> relatedParty) { this.relatedParty = relatedParty; return this; } - public ProductRefOrValue addRelatedPartyItem(RelatedParty relatedPartyItem) { + public ProductUpdate addRelatedPartyItem(RelatedParty relatedPartyItem) { if (this.relatedParty == null) { - this.relatedParty = new ArrayList<>(); + this.relatedParty = new ArrayList<RelatedParty>(); } this.relatedParty.add(relatedPartyItem); return this; @@ -676,9 +638,10 @@ public class ProductRefOrValue { /** * Get relatedParty * @return relatedParty - **/ + **/ @Schema(description = "") - @Valid + @NotNull + @Valid public List<RelatedParty> getRelatedParty() { return relatedParty; } @@ -687,7 +650,7 @@ public class ProductRefOrValue { this.relatedParty = relatedParty; } - public ProductRefOrValue status(ProductStatusType status) { + public ProductUpdate status(ProductStatusType status) { this.status = status; return this; } @@ -695,9 +658,10 @@ public class ProductRefOrValue { /** * Get status * @return status - **/ + **/ @Schema(description = "") - + @NotNull + @Valid public ProductStatusType getStatus() { return status; @@ -707,80 +671,64 @@ public class ProductRefOrValue { this.status = status; } - public ProductRefOrValue baseType(String baseType) { - this.baseType = baseType; + public ProductUpdate _atBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; return this; } /** * When sub-classing, this defines the super-class - * @return baseType - **/ + * @return _atBaseType + **/ @Schema(description = "When sub-classing, this defines the super-class") - + @NotNull + public String getAtBaseType() { - return baseType; + return _atBaseType; } - public void setAtBaseType(String baseType) { - this.baseType = baseType; + public void setAtBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; } - public ProductRefOrValue schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; + public ProductUpdate _atSchemaLocation(String _atSchemaLocation) { + this._atSchemaLocation = _atSchemaLocation; return this; } /** * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ + * @return _atSchemaLocation + **/ @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - + @NotNull + public String getAtSchemaLocation() { - return schemaLocation; + return _atSchemaLocation; } - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; + public void setAtSchemaLocation(String _atSchemaLocation) { + this._atSchemaLocation = _atSchemaLocation; } - public ProductRefOrValue type(String type) { - this.type = type; + public ProductUpdate _atType(String _atType) { + this._atType = _atType; return this; } /** * When sub-classing, this defines the sub-class entity name - * @return type - **/ + * @return _atType + **/ @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { - return type; - } + @NotNull - public void setAtType(String type) { - this.type = type; - } - - public ProductRefOrValue _atReferredType(String _atReferredType) { - this._atReferredType = _atReferredType; - return this; - } - - /** - * The actual type of the target instance when needed for disambiguation. - * @return _atReferredType - **/ - @Schema(description = "The actual type of the target instance when needed for disambiguation.") - - public String getAtReferredType() { - return _atReferredType; + public String getAtType() { + return _atType; } - public void setAtReferredType(String _atReferredType) { - this._atReferredType = _atReferredType; + public void setAtType(String _atType) { + this._atType = _atType; } @@ -792,50 +740,45 @@ public class ProductRefOrValue { if (o == null || getClass() != o.getClass()) { return false; } - ProductRefOrValue productRefOrValue = (ProductRefOrValue) o; - return Objects.equals(this.id, productRefOrValue.id) && - Objects.equals(this.href, productRefOrValue.href) && - Objects.equals(this.description, productRefOrValue.description) && - Objects.equals(this.isBundle, productRefOrValue.isBundle) && - Objects.equals(this.isCustomerVisible, productRefOrValue.isCustomerVisible) && - Objects.equals(this.name, productRefOrValue.name) && - Objects.equals(this.orderDate, productRefOrValue.orderDate) && - Objects.equals(this.productSerialNumber, productRefOrValue.productSerialNumber) && - Objects.equals(this.startDate, productRefOrValue.startDate) && - Objects.equals(this.terminationDate, productRefOrValue.terminationDate) && - Objects.equals(this.agreement, productRefOrValue.agreement) && - Objects.equals(this.billingAccount, productRefOrValue.billingAccount) && - Objects.equals(this.place, productRefOrValue.place) && - Objects.equals(this.product, productRefOrValue.product) && - Objects.equals(this.productCharacteristic, productRefOrValue.productCharacteristic) && - Objects.equals(this.productOffering, productRefOrValue.productOffering) && - Objects.equals(this.productOrderItem, productRefOrValue.productOrderItem) && - Objects.equals(this.productPrice, productRefOrValue.productPrice) && - Objects.equals(this.productRelationship, productRefOrValue.productRelationship) && - Objects.equals(this.productSpecification, productRefOrValue.productSpecification) && - Objects.equals(this.productTerm, productRefOrValue.productTerm) && - Objects.equals(this.realizingResource, productRefOrValue.realizingResource) && - Objects.equals(this.realizingService, productRefOrValue.realizingService) && - Objects.equals(this.relatedParty, productRefOrValue.relatedParty) && - Objects.equals(this.status, productRefOrValue.status) && - Objects.equals(this.baseType, productRefOrValue.baseType) && - Objects.equals(this.schemaLocation, productRefOrValue.schemaLocation) && - Objects.equals(this.type, productRefOrValue.type) && - Objects.equals(this._atReferredType, productRefOrValue._atReferredType); + ProductUpdate productUpdate = (ProductUpdate) o; + return Objects.equals(this.description, productUpdate.description) && + Objects.equals(this.isBundle, productUpdate.isBundle) && + Objects.equals(this.isCustomerVisible, productUpdate.isCustomerVisible) && + Objects.equals(this.name, productUpdate.name) && + Objects.equals(this.orderDate, productUpdate.orderDate) && + Objects.equals(this.productSerialNumber, productUpdate.productSerialNumber) && + Objects.equals(this.startDate, productUpdate.startDate) && + Objects.equals(this.terminationDate, productUpdate.terminationDate) && + Objects.equals(this.agreement, productUpdate.agreement) && + Objects.equals(this.billingAccount, productUpdate.billingAccount) && + Objects.equals(this.place, productUpdate.place) && + Objects.equals(this.product, productUpdate.product) && + Objects.equals(this.productCharacteristic, productUpdate.productCharacteristic) && + Objects.equals(this.productOffering, productUpdate.productOffering) && + Objects.equals(this.productOrderItem, productUpdate.productOrderItem) && + Objects.equals(this.productPrice, productUpdate.productPrice) && + Objects.equals(this.productRelationship, productUpdate.productRelationship) && + Objects.equals(this.productSpecification, productUpdate.productSpecification) && + Objects.equals(this.productTerm, productUpdate.productTerm) && + Objects.equals(this.realizingResource, productUpdate.realizingResource) && + Objects.equals(this.realizingService, productUpdate.realizingService) && + Objects.equals(this.relatedParty, productUpdate.relatedParty) && + Objects.equals(this.status, productUpdate.status) && + Objects.equals(this._atBaseType, productUpdate._atBaseType) && + Objects.equals(this._atSchemaLocation, productUpdate._atSchemaLocation) && + Objects.equals(this._atType, productUpdate._atType); } @Override public int hashCode() { - return Objects.hash(id, href, description, isBundle, isCustomerVisible, name, orderDate, productSerialNumber, startDate, terminationDate, agreement, billingAccount, place, product, productCharacteristic, productOffering, productOrderItem, productPrice, productRelationship, productSpecification, productTerm, realizingResource, realizingService, relatedParty, status, baseType, schemaLocation, type, _atReferredType); + return Objects.hash(description, isBundle, isCustomerVisible, name, orderDate, productSerialNumber, startDate, terminationDate, agreement, billingAccount, place, product, productCharacteristic, productOffering, productOrderItem, productPrice, productRelationship, productSpecification, productTerm, realizingResource, realizingService, relatedParty, status, _atBaseType, _atSchemaLocation, _atType); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ProductRefOrValue {\n"); + sb.append("class ProductUpdate {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" isBundle: ").append(toIndentedString(isBundle)).append("\n"); sb.append(" isCustomerVisible: ").append(toIndentedString(isCustomerVisible)).append("\n"); @@ -859,10 +802,9 @@ public class ProductRefOrValue { sb.append(" realizingService: ").append(toIndentedString(realizingService)).append("\n"); sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" baseType: ").append(toIndentedString(baseType)).append("\n"); - sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" _atReferredType: ").append(toIndentedString(_atReferredType)).append("\n"); + sb.append(" _atBaseType: ").append(toIndentedString(_atBaseType)).append("\n"); + sb.append(" _atSchemaLocation: ").append(toIndentedString(_atSchemaLocation)).append("\n"); + sb.append(" _atType: ").append(toIndentedString(_atType)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/RelatedPlaceRefOrValue.java b/src/main/java/org/etsi/osl/tmf/pim637/model/RelatedPlaceRefOrValue.java similarity index 60% rename from src/main/java/org/etsi/osl/tmf/po622/model/RelatedPlaceRefOrValue.java rename to src/main/java/org/etsi/osl/tmf/pim637/model/RelatedPlaceRefOrValue.java index 36ef6140ce63b69f063dac3326baf0fc4e330319..ccdae2577800303eb0ab94568502f92ce399e113 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/RelatedPlaceRefOrValue.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/RelatedPlaceRefOrValue.java @@ -1,31 +1,11 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; +package org.etsi.osl.tmf.pim637.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; /** @@ -33,29 +13,17 @@ import jakarta.validation.constraints.NotNull; */ @Schema(description = "Related Entity reference. A related place defines a place described by reference or by value linked to a specific entity. The polymorphic attributes @type, @schemaLocation & @referredType are related to the place entity and not the RelatedPlaceRefOrValue class itself") @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class RelatedPlaceRefOrValue { +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + +@Entity(name = "RelPlaceROrV637") +public class RelatedPlaceRefOrValue extends BaseRootNamedEntity { @JsonProperty("id") private String id = null; - @JsonProperty("href") - private String href = null; - - @JsonProperty("name") - private String name = null; @JsonProperty("role") private String role = null; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; - @JsonProperty("@referredType") private String _atReferredType = null; @@ -67,9 +35,10 @@ public class RelatedPlaceRefOrValue { /** * Unique identifier of the place * @return id - **/ + **/ @Schema(description = "Unique identifier of the place") - + @NotNull + public String getId() { return id; } @@ -86,9 +55,10 @@ public class RelatedPlaceRefOrValue { /** * Unique reference of the place * @return href - **/ + **/ @Schema(description = "Unique reference of the place") - + @NotNull + public String getHref() { return href; } @@ -105,9 +75,10 @@ public class RelatedPlaceRefOrValue { /** * A user-friendly name for the place, such as [Paris Store], [London Store], [Main Home] * @return name - **/ + **/ @Schema(description = "A user-friendly name for the place, such as [Paris Store], [London Store], [Main Home]") - + @NotNull + public String getName() { return name; } @@ -124,8 +95,8 @@ public class RelatedPlaceRefOrValue { /** * Get role * @return role - **/ - @Schema(description = "") + **/ + @Schema(required = true, description = "") @NotNull public String getRole() { @@ -136,74 +107,15 @@ public class RelatedPlaceRefOrValue { this.role = role; } - public RelatedPlaceRefOrValue baseType(String baseType) { - this.baseType = baseType; - return this; - } - - /** - * When sub-classing, this defines the super-class - * @return baseType - **/ - @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { - return baseType; - } - - public void setAtBaseType(String baseType) { - this.baseType = baseType; - } - - public RelatedPlaceRefOrValue schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - public String getAtSchemaLocation() { - return schemaLocation; - } - - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - public RelatedPlaceRefOrValue type(String type) { - this.type = type; - return this; - } - - /** - * When sub-classing, this defines the sub-class entity name - * @return type - **/ - @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { - return type; - } - - public void setAtType(String type) { - this.type = type; - } - - public RelatedPlaceRefOrValue _atReferredType(String _atReferredType) { - this._atReferredType = _atReferredType; - return this; - } /** * The actual type of the target instance when needed for disambiguation. * @return _atReferredType - **/ + **/ @Schema(description = "The actual type of the target instance when needed for disambiguation.") - + @NotNull + public String getAtReferredType() { return _atReferredType; } @@ -246,9 +158,9 @@ public class RelatedPlaceRefOrValue { sb.append(" href: ").append(toIndentedString(href)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" role: ").append(toIndentedString(role)).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(" _atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" _atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" _atType: ").append(toIndentedString(type)).append("\n"); sb.append(" _atReferredType: ").append(toIndentedString(_atReferredType)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/TargetProductSchema.java b/src/main/java/org/etsi/osl/tmf/pim637/model/TargetProductSchema.java new file mode 100644 index 0000000000000000000000000000000000000000..c0659e59482c6bc65814294b46cae1aa99d396e6 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/TargetProductSchema.java @@ -0,0 +1,129 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +/** + * The reference object to the schema and type of target product which is described by product specification + */ +@Schema(description = "The reference object to the schema and type of target product which is described by product specification") +@Validated +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class TargetProductSchema { + @JsonProperty("@baseType") + private String _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = null; + + public TargetProductSchema _atBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return _atBaseType + **/ + @Schema(description = "When sub-classing, this defines the super-class") + @NotNull + + public String getAtBaseType() { + return _atBaseType; + } + + public void setAtBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; + } + + public TargetProductSchema _atSchemaLocation(String _atSchemaLocation) { + this._atSchemaLocation = _atSchemaLocation; + return this; + } + + /** + * This field provides a link to the schema describing the target product + * @return _atSchemaLocation + **/ + @Schema(required = true, description = "This field provides a link to the schema describing the target product") + @NotNull + + public String getAtSchemaLocation() { + return _atSchemaLocation; + } + + public void setAtSchemaLocation(String _atSchemaLocation) { + this._atSchemaLocation = _atSchemaLocation; + } + + public TargetProductSchema _atType(String _atType) { + this._atType = _atType; + return this; + } + + /** + * Class type of the target product + * @return _atType + **/ + @Schema(required = true, description = "Class type of the target product") + @NotNull + + public String getAtType() { + return _atType; + } + + public void setAtType(String _atType) { + this._atType = _atType; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TargetProductSchema targetProductSchema = (TargetProductSchema) o; + return Objects.equals(this._atBaseType, targetProductSchema._atBaseType) && + Objects.equals(this._atSchemaLocation, targetProductSchema._atSchemaLocation) && + Objects.equals(this._atType, targetProductSchema._atType); + } + + @Override + public int hashCode() { + return Objects.hash(_atBaseType, _atSchemaLocation, _atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TargetProductSchema {\n"); + + sb.append(" _atBaseType: ").append(toIndentedString(_atBaseType)).append("\n"); + sb.append(" _atSchemaLocation: ").append(toIndentedString(_atSchemaLocation)).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(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/pm628/model/AddressableMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/AddressableMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..a4608fb12ac519993e45620e69bc7de33edd04ec --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/AddressableMVO.java @@ -0,0 +1,78 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * Base schema for addressable entities + */ + +@Schema(name = "Addressable_MVO", description = "Base schema for addressable entities") +@JsonTypeName("Addressable_MVO") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class AddressableMVO { + + private String id; + + public AddressableMVO id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + 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; + } + AddressableMVO addressableMVO = (AddressableMVO) o; + return Objects.equals(this.id, addressableMVO.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddressableMVO {\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/pm628/model/AdministrativeState.java b/src/main/java/org/etsi/osl/tmf/pm628/model/AdministrativeState.java new file mode 100644 index 0000000000000000000000000000000000000000..7881c0ca95b983a11fd104896c95fe081c0b0a6d --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/AdministrativeState.java @@ -0,0 +1,45 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import javax.annotation.Generated; + +/** + * This is enumeration for Administrative state + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public enum AdministrativeState { + + LOCKED("locked"), + + UNLOCKED("unlocked"); + + private String value; + + AdministrativeState(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static AdministrativeState fromValue(String value) { + for (AdministrativeState b : AdministrativeState.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/AttachmentRefFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/AttachmentRefFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..1990d07ee4860dcd944310c83686a17801a39537 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/AttachmentRefFVO.java @@ -0,0 +1,289 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * AttachmentRefFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class AttachmentRefFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("description") + private String description; + + @JsonProperty("url") + private String url; + + public AttachmentRefFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public AttachmentRefFVO(String type) { + this.type = type; + } + + public AttachmentRefFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @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 type) { + this.type = type; + } + + public AttachmentRefFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public AttachmentRefFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public AttachmentRefFVO 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 AttachmentRefFVO id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AttachmentRefFVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public AttachmentRefFVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public AttachmentRefFVO description(String description) { + this.description = description; + return this; + } + + /** + * A narrative text describing the content of the attachment + * @return description + */ + + @Schema(name = "description", description = "A narrative text describing the content of the attachment", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public AttachmentRefFVO url(String url) { + this.url = url; + return this; + } + + /** + * Link to the attachment media/content + * @return url + */ + + @Schema(name = "url", description = "Link to the attachment media/content", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("url") + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttachmentRefFVO attachmentRefFVO = (AttachmentRefFVO) o; + return Objects.equals(this.type, attachmentRefFVO.type) && + Objects.equals(this.baseType, attachmentRefFVO.baseType) && + Objects.equals(this.schemaLocation, attachmentRefFVO.schemaLocation) && + Objects.equals(this.href, attachmentRefFVO.href) && + Objects.equals(this.id, attachmentRefFVO.id) && + Objects.equals(this.name, attachmentRefFVO.name) && + Objects.equals(this.referredType, attachmentRefFVO.referredType) && + Objects.equals(this.description, attachmentRefFVO.description) && + Objects.equals(this.url, attachmentRefFVO.url); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, name, referredType, description, url); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AttachmentRefFVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).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/pm628/model/AttachmentRefMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/AttachmentRefMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..3c2edba24f354dd1bad006568b490ae0ce5ff33a --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/AttachmentRefMVO.java @@ -0,0 +1,289 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * AttachmentRefMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class AttachmentRefMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("description") + private String description; + + @JsonProperty("url") + private String url; + + public AttachmentRefMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public AttachmentRefMVO(String type) { + this.type = type; + } + + public AttachmentRefMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public AttachmentRefMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @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 baseType) { + this.baseType = baseType; + } + + public AttachmentRefMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public AttachmentRefMVO 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 AttachmentRefMVO id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the referred entity. + * @return id + */ + + @Schema(name = "id", description = "The identifier of the referred entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public AttachmentRefMVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public AttachmentRefMVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public AttachmentRefMVO description(String description) { + this.description = description; + return this; + } + + /** + * A narrative text describing the content of the attachment + * @return description + */ + + @Schema(name = "description", description = "A narrative text describing the content of the attachment", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public AttachmentRefMVO url(String url) { + this.url = url; + return this; + } + + /** + * Link to the attachment media/content + * @return url + */ + + @Schema(name = "url", description = "Link to the attachment media/content", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("url") + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttachmentRefMVO attachmentRefMVO = (AttachmentRefMVO) o; + return Objects.equals(this.type, attachmentRefMVO.type) && + Objects.equals(this.baseType, attachmentRefMVO.baseType) && + Objects.equals(this.schemaLocation, attachmentRefMVO.schemaLocation) && + Objects.equals(this.href, attachmentRefMVO.href) && + Objects.equals(this.id, attachmentRefMVO.id) && + Objects.equals(this.name, attachmentRefMVO.name) && + Objects.equals(this.referredType, attachmentRefMVO.referredType) && + Objects.equals(this.description, attachmentRefMVO.description) && + Objects.equals(this.url, attachmentRefMVO.url); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, name, referredType, description, url); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AttachmentRefMVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).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/pm628/model/BaseEvent.java b/src/main/java/org/etsi/osl/tmf/pm628/model/BaseEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..7e789e9a9f843d9357faad3504ee7029fd3b35c5 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/BaseEvent.java @@ -0,0 +1,429 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * BaseEvent + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class BaseEvent { + + private String atType; + + private String atBaseType; + + private String atSchemaLocation; + + private String href; + + private String id; + + private Object event; + + private String eventId; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime eventTime; + + private String eventType; + + private String correlationId; + + private String domain; + + private String title; + + private String description; + + private String priority; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime timeOcurred; + + public BaseEvent() { + super(); + } + + /** + * Constructor with only required parameters + */ + public BaseEvent(String atType) { + this.atType = atType; + } + + public BaseEvent 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) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public BaseEvent 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 BaseEvent 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 BaseEvent 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 BaseEvent id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public BaseEvent event(Object event) { + this.event = event; + return this; + } + + /** + * The event linked to the involved resource object + * @return event + */ + + @Schema(name = "event", description = "The event linked to the involved resource object", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("event") + 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) + @JsonProperty("eventId") + 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) + @JsonProperty("eventTime") + 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) + @JsonProperty("eventType") + 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) + @JsonProperty("correlationId") + 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) + @JsonProperty("domain") + 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) + @JsonProperty("title") + 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) + @JsonProperty("description") + 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) + @JsonProperty("priority") + 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 occurred. + * @return timeOcurred + */ + @Valid + @Schema(name = "timeOcurred", description = "The time the event occurred.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("timeOcurred") + public OffsetDateTime getTimeOcurred() { + return timeOcurred; + } + + public void setTimeOcurred(OffsetDateTime timeOcurred) { + this.timeOcurred = timeOcurred; + } + + @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.atType, baseEvent.atType) && + Objects.equals(this.atBaseType, baseEvent.atBaseType) && + Objects.equals(this.atSchemaLocation, baseEvent.atSchemaLocation) && + Objects.equals(this.href, baseEvent.href) && + Objects.equals(this.id, baseEvent.id) && + 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); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation, href, id, event, eventId, eventTime, eventType, correlationId, domain, title, description, priority, timeOcurred); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BaseEvent {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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/pm628/model/Characteristic.java b/src/main/java/org/etsi/osl/tmf/pm628/model/Characteristic.java new file mode 100644 index 0000000000000000000000000000000000000000..5c4f887b8a8ac3be6a036d3504ddb1eff3d23ffa --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/Characteristic.java @@ -0,0 +1,143 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.*; +import jakarta.validation.Valid; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Characteristic + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_Characteristic") +public class Characteristic extends BaseRootNamedEntity { + + @JsonProperty("valueType") + private String valueType; + + @JsonProperty("characteristicRelationship") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_char_char_rel", + joinColumns = @JoinColumn(name = "char_uuid"), + inverseJoinColumns = @JoinColumn(name = "char_rel_uuid") + ) + private List<CharacteristicRelationship> characteristicRelationship = new ArrayList<>(); + + public Characteristic() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Characteristic(String type) { + this.type = type; + } + + public Characteristic valueType(String valueType) { + this.valueType = valueType; + return this; + } + + /** + * Data type of the value of the characteristic + * @return valueType + */ + + @Schema(name = "valueType", description = "Data type of the value of the characteristic", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("valueType") + public String getValueType() { + return valueType; + } + + public void setValueType(String valueType) { + this.valueType = valueType; + } + + public Characteristic characteristicRelationship(List<CharacteristicRelationship> characteristicRelationship) { + this.characteristicRelationship = characteristicRelationship; + return this; + } + + public Characteristic addCharacteristicRelationshipItem(CharacteristicRelationship characteristicRelationshipItem) { + if (this.characteristicRelationship == null) { + this.characteristicRelationship = new ArrayList<>(); + } + this.characteristicRelationship.add(characteristicRelationshipItem); + return this; + } + + /** + * Collection of characteristic relationships + * @return characteristicRelationship + */ + @Valid + @Schema(name = "characteristicRelationship", description = "Collection of characteristic relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("characteristicRelationship") + public List<CharacteristicRelationship> getCharacteristicRelationship() { + return characteristicRelationship; + } + + public void setCharacteristicRelationship(List<CharacteristicRelationship> characteristicRelationship) { + this.characteristicRelationship = characteristicRelationship; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Characteristic characteristic = (Characteristic) o; + return Objects.equals(this.type, characteristic.type) && + Objects.equals(this.baseType, characteristic.baseType) && + Objects.equals(this.schemaLocation, characteristic.schemaLocation) && + Objects.equals(this.uuid, characteristic.uuid) && + Objects.equals(this.name, characteristic.name) && + Objects.equals(this.valueType, characteristic.valueType) && + Objects.equals(this.characteristicRelationship, characteristic.characteristicRelationship); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, uuid, name, valueType, characteristicRelationship); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Characteristic {\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(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" valueType: ").append(toIndentedString(valueType)).append("\n"); + sb.append(" characteristicRelationship: ").append(toIndentedString(characteristicRelationship)).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 "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/CharacteristicFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/CharacteristicFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..912ae241e0e93e133e62a7c02a27aadaa6acd02e --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/CharacteristicFVO.java @@ -0,0 +1,226 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * CharacteristicFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class CharacteristicFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("name") + private String name; + + @JsonProperty("valueType") + private String valueType; + + @JsonProperty("characteristicRelationship") + @Valid + private List<CharacteristicRelationshipFVO> characteristicRelationship = new ArrayList<>(); + + public CharacteristicFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public CharacteristicFVO(String type) { + this.type = type; + } + + public CharacteristicFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public CharacteristicFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public CharacteristicFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public CharacteristicFVO name(String name) { + this.name = name; + return this; + } + + /** + * Name of the characteristic + * @return name + */ + + @Schema(name = "name", description = "Name of the characteristic", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CharacteristicFVO valueType(String valueType) { + this.valueType = valueType; + return this; + } + + /** + * Data type of the value of the characteristic + * @return valueType + */ + + @Schema(name = "valueType", description = "Data type of the value of the characteristic", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("valueType") + public String getValueType() { + return valueType; + } + + public void setValueType(String valueType) { + this.valueType = valueType; + } + + public CharacteristicFVO characteristicRelationship(List<CharacteristicRelationshipFVO> characteristicRelationship) { + this.characteristicRelationship = characteristicRelationship; + return this; + } + + public CharacteristicFVO addCharacteristicRelationshipItem(CharacteristicRelationshipFVO characteristicRelationshipItem) { + if (this.characteristicRelationship == null) { + this.characteristicRelationship = new ArrayList<>(); + } + this.characteristicRelationship.add(characteristicRelationshipItem); + return this; + } + + /** + * Collection of characteristic relationships + * @return characteristicRelationship + */ + @Valid + @Schema(name = "characteristicRelationship", description = "Collection of characteristic relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("characteristicRelationship") + public List<CharacteristicRelationshipFVO> getCharacteristicRelationship() { + return characteristicRelationship; + } + + public void setCharacteristicRelationship(List<CharacteristicRelationshipFVO> characteristicRelationship) { + this.characteristicRelationship = characteristicRelationship; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CharacteristicFVO characteristicFVO = (CharacteristicFVO) o; + return Objects.equals(this.type, characteristicFVO.type) && + Objects.equals(this.baseType, characteristicFVO.baseType) && + Objects.equals(this.schemaLocation, characteristicFVO.schemaLocation) && + Objects.equals(this.name, characteristicFVO.name) && + Objects.equals(this.valueType, characteristicFVO.valueType) && + Objects.equals(this.characteristicRelationship, characteristicFVO.characteristicRelationship); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, name, valueType, characteristicRelationship); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CharacteristicFVO {\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(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" valueType: ").append(toIndentedString(valueType)).append("\n"); + sb.append(" characteristicRelationship: ").append(toIndentedString(characteristicRelationship)).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/pm628/model/CharacteristicMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/CharacteristicMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..bccda463e27d2bea6fd6767b507597576a19d5ad --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/CharacteristicMVO.java @@ -0,0 +1,251 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * CharacteristicMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class CharacteristicMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("valueType") + private String valueType; + + @JsonProperty("characteristicRelationship") + @Valid + private List<CharacteristicRelationshipMVO> characteristicRelationship = new ArrayList<>(); + + public CharacteristicMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public CharacteristicMVO(String type) { + this.type = type; + } + + public CharacteristicMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public CharacteristicMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public CharacteristicMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public CharacteristicMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Unique identifier of the characteristic + * @return id + */ + + @Schema(name = "uuid", description = "Unique identifier of the characteristic", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public CharacteristicMVO name(String name) { + this.name = name; + return this; + } + + /** + * Name of the characteristic + * @return name + */ + + @Schema(name = "name", description = "Name of the characteristic", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CharacteristicMVO valueType(String valueType) { + this.valueType = valueType; + return this; + } + + /** + * Data type of the value of the characteristic + * @return valueType + */ + + @Schema(name = "valueType", description = "Data type of the value of the characteristic", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("valueType") + public String getValueType() { + return valueType; + } + + public void setValueType(String valueType) { + this.valueType = valueType; + } + + public CharacteristicMVO characteristicRelationship(List<CharacteristicRelationshipMVO> characteristicRelationship) { + this.characteristicRelationship = characteristicRelationship; + return this; + } + + public CharacteristicMVO addCharacteristicRelationshipItem(CharacteristicRelationshipMVO characteristicRelationshipItem) { + if (this.characteristicRelationship == null) { + this.characteristicRelationship = new ArrayList<>(); + } + this.characteristicRelationship.add(characteristicRelationshipItem); + return this; + } + + /** + * Collection of characteristic relationships + * @return characteristicRelationship + */ + @Valid + @Schema(name = "characteristicRelationship", description = "Collection of characteristic relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("characteristicRelationship") + public List<CharacteristicRelationshipMVO> getCharacteristicRelationship() { + return characteristicRelationship; + } + + public void setCharacteristicRelationship(List<CharacteristicRelationshipMVO> characteristicRelationship) { + this.characteristicRelationship = characteristicRelationship; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CharacteristicMVO characteristicMVO = (CharacteristicMVO) o; + return Objects.equals(this.type, characteristicMVO.type) && + Objects.equals(this.baseType, characteristicMVO.baseType) && + Objects.equals(this.schemaLocation, characteristicMVO.schemaLocation) && + Objects.equals(this.uuid, characteristicMVO.uuid) && + Objects.equals(this.name, characteristicMVO.name) && + Objects.equals(this.valueType, characteristicMVO.valueType) && + Objects.equals(this.characteristicRelationship, characteristicMVO.characteristicRelationship); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, uuid, name, valueType, characteristicRelationship); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CharacteristicMVO {\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(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" valueType: ").append(toIndentedString(valueType)).append("\n"); + sb.append(" characteristicRelationship: ").append(toIndentedString(characteristicRelationship)).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/pm628/model/CharacteristicRelationship.java b/src/main/java/org/etsi/osl/tmf/pm628/model/CharacteristicRelationship.java new file mode 100644 index 0000000000000000000000000000000000000000..de47f79c2483b53b8903dabe15b7bdf79af69a06 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/CharacteristicRelationship.java @@ -0,0 +1,103 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootEntity; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * CharacteristicRelationship + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_CharRel") +public class CharacteristicRelationship extends BaseRootEntity { + + @JsonProperty("relationshipType") + private String relationshipType; + + public CharacteristicRelationship() { + super(); + } + + /** + * Constructor with only required parameters + */ + public CharacteristicRelationship(String type) { + this.type = type; + } + + public CharacteristicRelationship type(String type) { + this.type = type; + return this; + } + + public CharacteristicRelationship relationshipType(String relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + /** + * The type of relationship + * @return relationshipType + */ + + @Schema(name = "relationshipType", description = "The type of relationship", requiredMode = Schema.RequiredMode.NOT_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; + } + CharacteristicRelationship characteristicRelationship = (CharacteristicRelationship) o; + return Objects.equals(this.type, characteristicRelationship.type) && + Objects.equals(this.baseType, characteristicRelationship.baseType) && + Objects.equals(this.schemaLocation, characteristicRelationship.schemaLocation) && + Objects.equals(this.uuid, characteristicRelationship.uuid) && + Objects.equals(this.relationshipType, characteristicRelationship.relationshipType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, uuid, relationshipType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CharacteristicRelationship {\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(" id: ").append(toIndentedString(uuid)).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 "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/CharacteristicRelationshipFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/CharacteristicRelationshipFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..c34c4542c7780f5e3df8b1e32cd59213539cfa68 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/CharacteristicRelationshipFVO.java @@ -0,0 +1,191 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * CharacteristicRelationshipFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class CharacteristicRelationshipFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("relationshipType") + private String relationshipType; + + public CharacteristicRelationshipFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public CharacteristicRelationshipFVO(String type, String uuid, String relationshipType) { + this.type = type; + this.uuid = uuid; + this.relationshipType = relationshipType; + } + + public CharacteristicRelationshipFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public CharacteristicRelationshipFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public CharacteristicRelationshipFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public CharacteristicRelationshipFVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Unique identifier of the characteristic + * @return id + */ + @NotNull + @Schema(name = "uuid", description = "Unique identifier of the characteristic", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public CharacteristicRelationshipFVO relationshipType(String relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + /** + * The type of relationship + * @return relationshipType + */ + @NotNull + @Schema(name = "relationshipType", description = "The 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; + } + CharacteristicRelationshipFVO characteristicRelationshipFVO = (CharacteristicRelationshipFVO) o; + return Objects.equals(this.type, characteristicRelationshipFVO.type) && + Objects.equals(this.baseType, characteristicRelationshipFVO.baseType) && + Objects.equals(this.schemaLocation, characteristicRelationshipFVO.schemaLocation) && + Objects.equals(this.uuid, characteristicRelationshipFVO.uuid) && + Objects.equals(this.relationshipType, characteristicRelationshipFVO.relationshipType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, uuid, relationshipType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CharacteristicRelationshipFVO {\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(" id: ").append(toIndentedString(uuid)).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/pm628/model/CharacteristicRelationshipMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/CharacteristicRelationshipMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..7e9848ca0f28110d53a4aaa4d9c6d597531b1e3e --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/CharacteristicRelationshipMVO.java @@ -0,0 +1,189 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * CharacteristicRelationshipMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class CharacteristicRelationshipMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("relationshipType") + private String relationshipType; + + public CharacteristicRelationshipMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public CharacteristicRelationshipMVO(String type) { + this.type = type; + } + + public CharacteristicRelationshipMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public CharacteristicRelationshipMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public CharacteristicRelationshipMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public CharacteristicRelationshipMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Unique identifier of the characteristic + * @return id + */ + + @Schema(name = "uuid", description = "Unique identifier of the characteristic", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public CharacteristicRelationshipMVO relationshipType(String relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + /** + * The type of relationship + * @return relationshipType + */ + + @Schema(name = "relationshipType", description = "The type of relationship", requiredMode = Schema.RequiredMode.NOT_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; + } + CharacteristicRelationshipMVO characteristicRelationshipMVO = (CharacteristicRelationshipMVO) o; + return Objects.equals(this.type, characteristicRelationshipMVO.type) && + Objects.equals(this.baseType, characteristicRelationshipMVO.baseType) && + Objects.equals(this.schemaLocation, characteristicRelationshipMVO.schemaLocation) && + Objects.equals(this.uuid, characteristicRelationshipMVO.uuid) && + Objects.equals(this.relationshipType, characteristicRelationshipMVO.relationshipType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, uuid, relationshipType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CharacteristicRelationshipMVO {\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(" id: ").append(toIndentedString(uuid)).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/pm628/model/CollectionType.java b/src/main/java/org/etsi/osl/tmf/pm628/model/CollectionType.java new file mode 100644 index 0000000000000000000000000000000000000000..fd78965924ac5bc357a3ceada60ae34c037a8d11 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/CollectionType.java @@ -0,0 +1,51 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import javax.annotation.Generated; + +/** + * This is enumeration for CollectionType state + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public enum CollectionType { + + CUMULATIVE("cumulative"), + + DELTA("delta"), + + DISCRETE_EVENT("discrete_event"), + + GAUGE("gauge"), + + STATUS_INSPECTION("status_inspection"); + + private String value; + + CollectionType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CollectionType fromValue(String value) { + for (CollectionType b : CollectionType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/CompressionEnumType.java b/src/main/java/org/etsi/osl/tmf/pm628/model/CompressionEnumType.java new file mode 100644 index 0000000000000000000000000000000000000000..67a3f638db78db3ce30f04d022741bd03e694aac --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/CompressionEnumType.java @@ -0,0 +1,49 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import javax.annotation.Generated; + +/** + * Enumeration of supported compressions. All extensions allowed. + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public enum CompressionEnumType { + + NO_COMPRESSION("no_compression"), + + GZIP("gzip"), + + VENDOR_EXT("vendor_ext"), + + MINOR_EXT("minor_ext"); + + private String value; + + CompressionEnumType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static CompressionEnumType fromValue(String value) { + for (CompressionEnumType b : CompressionEnumType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/CompressionType.java b/src/main/java/org/etsi/osl/tmf/pm628/model/CompressionType.java new file mode 100644 index 0000000000000000000000000000000000000000..c3818df3b6ed4f4270218e866af9f124331a5a8b --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/CompressionType.java @@ -0,0 +1,80 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Embeddable; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * File compression type. + */ + +@Schema(name = "CompressionType", description = "File compression type.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Embeddable +public class CompressionType { + + @JsonProperty("compressionEnumType") + private CompressionEnumType compressionEnumType; + + public CompressionType compressionEnumType(CompressionEnumType compressionEnumType) { + this.compressionEnumType = compressionEnumType; + return this; + } + + /** + * Get compressionEnumType + * @return compressionEnumType + */ + @Valid + @Schema(name = "compressionEnumType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("compressionEnumType") + public CompressionEnumType getCompressionEnumType() { + return compressionEnumType; + } + + public void setCompressionEnumType(CompressionEnumType compressionEnumType) { + this.compressionEnumType = compressionEnumType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompressionType compressionType = (CompressionType) o; + return Objects.equals(this.compressionEnumType, compressionType.compressionEnumType); + } + + @Override + public int hashCode() { + return Objects.hash(compressionEnumType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CompressionType {\n"); + sb.append(" compressionEnumType: ").append(toIndentedString(compressionEnumType)).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/pm628/model/DataAccessEndpoint.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataAccessEndpoint.java new file mode 100644 index 0000000000000000000000000000000000000000..df95ffda51e7ce2132c5fd6a6ec0b81fc6870562 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataAccessEndpoint.java @@ -0,0 +1,315 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.validation.Valid; +import org.etsi.osl.tmf.common.model.AttachmentRef; +import org.etsi.osl.tmf.common.model.TimePeriod; +import org.etsi.osl.tmf.common.model.service.Note; +import org.etsi.osl.tmf.rcm634.model.ResourceSpecificationRef; +import org.etsi.osl.tmf.ri639.model.ResourceAdministrativeStateType; +import org.etsi.osl.tmf.ri639.model.ResourceOperationalStateType; +import org.etsi.osl.tmf.ri639.model.ResourceUsageStateType; + +import javax.annotation.Generated; +import java.net.URI; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Objects; + +/** + * DataAccessEndpoint + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_DAE") +public class DataAccessEndpoint extends LogicalResource { + + @JsonProperty("uri") + private URI uri; + + @Embedded + @JsonProperty("uriQueryFilter") + private DataFilterMap uriQueryFilter; + + @JsonProperty("apiType") + private String apiType; + + public DataAccessEndpoint() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DataAccessEndpoint(String atType) { + super(atType); + } + + public DataAccessEndpoint uri(URI uri) { + this.uri = uri; + return this; + } + + /** + * URI for using the data access API + * @return uri + */ + @Valid + @Schema(name = "uri", description = "URI for using the data access API", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uri") + public URI getUri() { + return uri; + } + + public void setUri(URI uri) { + this.uri = uri; + } + + public DataAccessEndpoint uriQueryFilter(DataFilterMap uriQueryFilter) { + this.uriQueryFilter = uriQueryFilter; + return this; + } + + /** + * Get uriQueryFilter + * @return uriQueryFilter + */ + @Valid + @Schema(name = "uriQueryFilter", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uriQueryFilter") + public DataFilterMap getUriQueryFilter() { + return uriQueryFilter; + } + + public void setUriQueryFilter(DataFilterMap uriQueryFilter) { + this.uriQueryFilter = uriQueryFilter; + } + + public DataAccessEndpoint apiType(String apiType) { + this.apiType = apiType; + return this; + } + + /** + * Get apiType + * @return apiType + */ + + @Schema(name = "apiType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("apiType") + public String getApiType() { + return apiType; + } + + public void setApiType(String apiType) { + this.apiType = apiType; + } + + + public DataAccessEndpoint value(String value) { + super.value(value); + return this; + } + + public DataAccessEndpoint category(String category) { + super.category(category); + return this; + } + + public DataAccessEndpoint description(String description) { + super.description(description); + return this; + } + + public DataAccessEndpoint name(String name) { + super.name(name); + return this; + } + + public DataAccessEndpoint endOperatingDate(OffsetDateTime endOperatingDate) { + super.endOperatingDate(endOperatingDate); + return this; + } + + public DataAccessEndpoint administrativeState(ResourceAdministrativeStateType administrativeState) { + super.administrativeState(administrativeState); + return this; + } + + public DataAccessEndpoint operationalState(ResourceOperationalStateType operationalState) { + super.operationalState(operationalState); + return this; + } + + public DataAccessEndpoint resourceStatus(ResourceStatusType resourceStatus) { + super.resourceStatus(resourceStatus); + return this; + } + + public DataAccessEndpoint usageState(ResourceUsageStateType usageState) { + super.usageState(usageState); + return this; + } + + public DataAccessEndpoint validFor(TimePeriod validFor) { + super.validFor(validFor); + return this; + } + + public DataAccessEndpoint note(List<Note> note) { + super.note(note); + return this; + } + + public DataAccessEndpoint addNoteItem(Note noteItem) { + super.addNoteItem(noteItem); + return this; + } + + public DataAccessEndpoint resourceOrderItem(List<RelatedResourceOrderItem> resourceOrderItem) { + super.resourceOrderItem(resourceOrderItem); + return this; + } + + public DataAccessEndpoint addResourceOrderItemItem(RelatedResourceOrderItem resourceOrderItemItem) { + super.addResourceOrderItemItem(resourceOrderItemItem); + return this; + } + + public DataAccessEndpoint place(List<RelatedPlaceRef> place) { + super.place(place); + return this; + } + + public DataAccessEndpoint addPlaceItem(RelatedPlaceRef placeItem) { + super.addPlaceItem(placeItem); + return this; + } + + public DataAccessEndpoint relatedParty(List<RelatedPartyRefOrPartyRoleRef> relatedParty) { + super.relatedParty(relatedParty); + return this; + } + + public DataAccessEndpoint addRelatedPartyItem(RelatedPartyRefOrPartyRoleRef relatedPartyItem) { + super.addRelatedPartyItem(relatedPartyItem); + return this; + } + + public DataAccessEndpoint resourceRelationship(List<ResourceRelationship> resourceRelationship) { + super.resourceRelationship(resourceRelationship); + return this; + } + + public DataAccessEndpoint addResourceRelationshipItem(ResourceRelationship resourceRelationshipItem) { + super.addResourceRelationshipItem(resourceRelationshipItem); + return this; + } + + public DataAccessEndpoint resourceCharacteristic(List<Characteristic> resourceCharacteristic) { + super.resourceCharacteristic(resourceCharacteristic); + return this; + } + + public DataAccessEndpoint addResourceCharacteristicItem(Characteristic resourceCharacteristicItem) { + super.addResourceCharacteristicItem(resourceCharacteristicItem); + return this; + } + + public DataAccessEndpoint attachment(List<AttachmentRef> attachment) { + super.attachment(attachment); + return this; + } + + public DataAccessEndpoint addAttachmentItem(AttachmentRef attachmentItem) { + super.addAttachmentItem(attachmentItem); + return this; + } + + public DataAccessEndpoint resourceSpecification(ResourceSpecificationRef resourceSpecification) { + super.resourceSpecification(resourceSpecification); + return this; + } + + public DataAccessEndpoint startOperatingDate(OffsetDateTime startOperatingDate) { + super.startOperatingDate(startOperatingDate); + return this; + } + + public DataAccessEndpoint resourceVersion(String resourceVersion) { + super.resourceVersion(resourceVersion); + return this; + } + + public DataAccessEndpoint activationFeature(List<Feature> activationFeature) { + super.activationFeature(activationFeature); + return this; + } + + public DataAccessEndpoint addActivationFeatureItem(Feature activationFeatureItem) { + super.addActivationFeatureItem(activationFeatureItem); + return this; + } + + public DataAccessEndpoint intent(IntentRef intent) { + super.intent(intent); + return this; + } + + public DataAccessEndpoint externalIdentifier(List<ExternalIdentifier> externalIdentifier) { + super.externalIdentifier(externalIdentifier); + return this; + } + + public DataAccessEndpoint addExternalIdentifierItem(ExternalIdentifier externalIdentifierItem) { + super.addExternalIdentifierItem(externalIdentifierItem); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataAccessEndpoint dataAccessEndpoint = (DataAccessEndpoint) o; + return Objects.equals(this.uri, dataAccessEndpoint.uri) && + Objects.equals(this.uriQueryFilter, dataAccessEndpoint.uriQueryFilter) && + Objects.equals(this.apiType, dataAccessEndpoint.apiType) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(uri, uriQueryFilter, apiType, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataAccessEndpoint {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" uri: ").append(toIndentedString(uri)).append("\n"); + sb.append(" uriQueryFilter: ").append(toIndentedString(uriQueryFilter)).append("\n"); + sb.append(" apiType: ").append(toIndentedString(apiType)).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/pm628/model/DataAccessEndpointFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataAccessEndpointFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..3637fc798523038489315b0a2e1343cd8b692da0 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataAccessEndpointFVO.java @@ -0,0 +1,333 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import org.etsi.osl.tmf.common.model.TimePeriod; +import org.etsi.osl.tmf.ri639.model.ResourceAdministrativeStateType; +import org.etsi.osl.tmf.ri639.model.ResourceOperationalStateType; +import org.etsi.osl.tmf.ri639.model.ResourceUsageStateType; + +import javax.annotation.Generated; +import java.net.URI; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Objects; + +/** + * DataAccessEndpointFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DataAccessEndpointFVO extends LogicalResourceFVO { + + @JsonProperty("uri") + private URI uri; + + @JsonProperty("uriQueryFilter") + private DataFilterMapFVO uriQueryFilter; + + @JsonProperty("apiType") + private String apiType; + + public DataAccessEndpointFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DataAccessEndpointFVO(String atType) { + super(atType); + } + + public DataAccessEndpointFVO uri(URI uri) { + this.uri = uri; + return this; + } + + /** + * URI for using the data access API + * @return uri + */ + @Valid + @Schema(name = "uri", description = "URI for using the data access API", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uri") + public URI getUri() { + return uri; + } + + public void setUri(URI uri) { + this.uri = uri; + } + + public DataAccessEndpointFVO uriQueryFilter(DataFilterMapFVO uriQueryFilter) { + this.uriQueryFilter = uriQueryFilter; + return this; + } + + /** + * Get uriQueryFilter + * @return uriQueryFilter + */ + @Valid + @Schema(name = "uriQueryFilter", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uriQueryFilter") + public DataFilterMapFVO getUriQueryFilter() { + return uriQueryFilter; + } + + public void setUriQueryFilter(DataFilterMapFVO uriQueryFilter) { + this.uriQueryFilter = uriQueryFilter; + } + + public DataAccessEndpointFVO apiType(String apiType) { + this.apiType = apiType; + return this; + } + + /** + * Get apiType + * @return apiType + */ + + @Schema(name = "apiType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("apiType") + public String getApiType() { + return apiType; + } + + public void setApiType(String apiType) { + this.apiType = apiType; + } + + + public DataAccessEndpointFVO value(String value) { + super.value(value); + return this; + } + + public DataAccessEndpointFVO type(String type) { + super.type(type); + return this; + } + + public DataAccessEndpointFVO baseType(String baseType) { + super.baseType(baseType); + return this; + } + + public DataAccessEndpointFVO schemaLocation(String schemaLocation) { + super.schemaLocation(schemaLocation); + return this; + } + + public DataAccessEndpointFVO href(String href) { + super.href(href); + return this; + } + + public DataAccessEndpointFVO uuid(String uuid) { + super.uuid(uuid); + return this; + } + + public DataAccessEndpointFVO category(String category) { + super.category(category); + return this; + } + + public DataAccessEndpointFVO description(String description) { + super.description(description); + return this; + } + + public DataAccessEndpointFVO name(String name) { + super.name(name); + return this; + } + + public DataAccessEndpointFVO endOperatingDate(OffsetDateTime endOperatingDate) { + super.endOperatingDate(endOperatingDate); + return this; + } + + public DataAccessEndpointFVO administrativeState(ResourceAdministrativeStateType administrativeState) { + super.administrativeState(administrativeState); + return this; + } + + public DataAccessEndpointFVO operationalState(ResourceOperationalStateType operationalState) { + super.operationalState(operationalState); + return this; + } + + public DataAccessEndpointFVO resourceStatus(ResourceStatusType resourceStatus) { + super.resourceStatus(resourceStatus); + return this; + } + + public DataAccessEndpointFVO usageState(ResourceUsageStateType usageState) { + super.usageState(usageState); + return this; + } + + public DataAccessEndpointFVO validFor(TimePeriod validFor) { + super.validFor(validFor); + return this; + } + + public DataAccessEndpointFVO note(List<NoteFVO> note) { + super.note(note); + return this; + } + + public DataAccessEndpointFVO addNoteItem(NoteFVO noteItem) { + super.addNoteItem(noteItem); + return this; + } + + public DataAccessEndpointFVO resourceOrderItem(List<RelatedResourceOrderItemFVO> resourceOrderItem) { + super.resourceOrderItem(resourceOrderItem); + return this; + } + + public DataAccessEndpointFVO addResourceOrderItemItem(RelatedResourceOrderItemFVO resourceOrderItemItem) { + super.addResourceOrderItemItem(resourceOrderItemItem); + return this; + } + + public DataAccessEndpointFVO place(List<RelatedPlaceRefFVO> place) { + super.place(place); + return this; + } + + public DataAccessEndpointFVO addPlaceItem(RelatedPlaceRefFVO placeItem) { + super.addPlaceItem(placeItem); + return this; + } + + public DataAccessEndpointFVO relatedParty(List<RelatedPartyRefOrPartyRoleRefFVO> relatedParty) { + super.relatedParty(relatedParty); + return this; + } + + public DataAccessEndpointFVO addRelatedPartyItem(RelatedPartyRefOrPartyRoleRefFVO relatedPartyItem) { + super.addRelatedPartyItem(relatedPartyItem); + return this; + } + + public DataAccessEndpointFVO resourceRelationship(List<ResourceRelationshipFVO> resourceRelationship) { + super.resourceRelationship(resourceRelationship); + return this; + } + + public DataAccessEndpointFVO addResourceRelationshipItem(ResourceRelationshipFVO resourceRelationshipItem) { + super.addResourceRelationshipItem(resourceRelationshipItem); + return this; + } + + public DataAccessEndpointFVO resourceCharacteristic(List<CharacteristicFVO> resourceCharacteristic) { + super.resourceCharacteristic(resourceCharacteristic); + return this; + } + + public DataAccessEndpointFVO addResourceCharacteristicItem(CharacteristicFVO resourceCharacteristicItem) { + super.addResourceCharacteristicItem(resourceCharacteristicItem); + return this; + } + + public DataAccessEndpointFVO attachment(List<AttachmentRefFVO> attachment) { + super.attachment(attachment); + return this; + } + + public DataAccessEndpointFVO addAttachmentItem(AttachmentRefFVO attachmentItem) { + super.addAttachmentItem(attachmentItem); + return this; + } + + public DataAccessEndpointFVO resourceSpecification(ResourceSpecificationRefFVO resourceSpecification) { + super.resourceSpecification(resourceSpecification); + return this; + } + + public DataAccessEndpointFVO startOperatingDate(OffsetDateTime startOperatingDate) { + super.startOperatingDate(startOperatingDate); + return this; + } + + public DataAccessEndpointFVO resourceVersion(String resourceVersion) { + super.resourceVersion(resourceVersion); + return this; + } + + public DataAccessEndpointFVO activationFeature(List<FeatureFVO> activationFeature) { + super.activationFeature(activationFeature); + return this; + } + + public DataAccessEndpointFVO addActivationFeatureItem(FeatureFVO activationFeatureItem) { + super.addActivationFeatureItem(activationFeatureItem); + return this; + } + + public DataAccessEndpointFVO intent(IntentRefFVO intent) { + super.intent(intent); + return this; + } + + public DataAccessEndpointFVO externalIdentifier(List<ExternalIdentifierFVO> externalIdentifier) { + super.externalIdentifier(externalIdentifier); + return this; + } + + public DataAccessEndpointFVO addExternalIdentifierItem(ExternalIdentifierFVO externalIdentifierItem) { + super.addExternalIdentifierItem(externalIdentifierItem); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataAccessEndpointFVO dataAccessEndpointFVO = (DataAccessEndpointFVO) o; + return Objects.equals(this.uri, dataAccessEndpointFVO.uri) && + Objects.equals(this.uriQueryFilter, dataAccessEndpointFVO.uriQueryFilter) && + Objects.equals(this.apiType, dataAccessEndpointFVO.apiType) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(uri, uriQueryFilter, apiType, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataAccessEndpointFVO {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" uri: ").append(toIndentedString(uri)).append("\n"); + sb.append(" uriQueryFilter: ").append(toIndentedString(uriQueryFilter)).append("\n"); + sb.append(" apiType: ").append(toIndentedString(apiType)).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/pm628/model/DataAccessEndpointMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataAccessEndpointMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..0cd9a0424d227f3fd52400f54d4c577eeb520a62 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataAccessEndpointMVO.java @@ -0,0 +1,333 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import org.etsi.osl.tmf.common.model.TimePeriod; +import org.etsi.osl.tmf.ri639.model.ResourceAdministrativeStateType; +import org.etsi.osl.tmf.ri639.model.ResourceOperationalStateType; +import org.etsi.osl.tmf.ri639.model.ResourceUsageStateType; + +import javax.annotation.Generated; +import java.net.URI; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Objects; + +/** + * DataAccessEndpointMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DataAccessEndpointMVO extends LogicalResourceMVO { + + @JsonProperty("uri") + private URI uri; + + @JsonProperty("uriQueryFilter") + private DataFilterMapMVO uriQueryFilter; + + @JsonProperty("apiType") + private String apiType; + + public DataAccessEndpointMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DataAccessEndpointMVO(String atType) { + super(atType); + } + + public DataAccessEndpointMVO uri(URI uri) { + this.uri = uri; + return this; + } + + /** + * URI for using the data access API + * @return uri + */ + @Valid + @Schema(name = "uri", description = "URI for using the data access API", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uri") + public URI getUri() { + return uri; + } + + public void setUri(URI uri) { + this.uri = uri; + } + + public DataAccessEndpointMVO uriQueryFilter(DataFilterMapMVO uriQueryFilter) { + this.uriQueryFilter = uriQueryFilter; + return this; + } + + /** + * Get uriQueryFilter + * @return uriQueryFilter + */ + @Valid + @Schema(name = "uriQueryFilter", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uriQueryFilter") + public DataFilterMapMVO getUriQueryFilter() { + return uriQueryFilter; + } + + public void setUriQueryFilter(DataFilterMapMVO uriQueryFilter) { + this.uriQueryFilter = uriQueryFilter; + } + + public DataAccessEndpointMVO apiType(String apiType) { + this.apiType = apiType; + return this; + } + + /** + * Get apiType + * @return apiType + */ + + @Schema(name = "apiType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("apiType") + public String getApiType() { + return apiType; + } + + public void setApiType(String apiType) { + this.apiType = apiType; + } + + + public DataAccessEndpointMVO value(String value) { + super.value(value); + return this; + } + + public DataAccessEndpointMVO type(String type) { + super.type(type); + return this; + } + + public DataAccessEndpointMVO baseType(String baseType) { + super.baseType(baseType); + return this; + } + + public DataAccessEndpointMVO schemaLocation(String schemaLocation) { + super.schemaLocation(schemaLocation); + return this; + } + + public DataAccessEndpointMVO href(String href) { + super.href(href); + return this; + } + + public DataAccessEndpointMVO uuid(String uuid) { + super.uuid(uuid); + return this; + } + + public DataAccessEndpointMVO category(String category) { + super.category(category); + return this; + } + + public DataAccessEndpointMVO description(String description) { + super.description(description); + return this; + } + + public DataAccessEndpointMVO name(String name) { + super.name(name); + return this; + } + + public DataAccessEndpointMVO endOperatingDate(OffsetDateTime endOperatingDate) { + super.endOperatingDate(endOperatingDate); + return this; + } + + public DataAccessEndpointMVO administrativeState(ResourceAdministrativeStateType administrativeState) { + super.administrativeState(administrativeState); + return this; + } + + public DataAccessEndpointMVO operationalState(ResourceOperationalStateType operationalState) { + super.operationalState(operationalState); + return this; + } + + public DataAccessEndpointMVO resourceStatus(ResourceStatusType resourceStatus) { + super.resourceStatus(resourceStatus); + return this; + } + + public DataAccessEndpointMVO usageState(ResourceUsageStateType usageState) { + super.usageState(usageState); + return this; + } + + public DataAccessEndpointMVO validFor(TimePeriod validFor) { + super.validFor(validFor); + return this; + } + + public DataAccessEndpointMVO note(List<NoteMVO> note) { + super.note(note); + return this; + } + + public DataAccessEndpointMVO addNoteItem(NoteMVO noteItem) { + super.addNoteItem(noteItem); + return this; + } + + public DataAccessEndpointMVO resourceOrderItem(List<RelatedResourceOrderItemMVO> resourceOrderItem) { + super.resourceOrderItem(resourceOrderItem); + return this; + } + + public DataAccessEndpointMVO addResourceOrderItemItem(RelatedResourceOrderItemMVO resourceOrderItemItem) { + super.addResourceOrderItemItem(resourceOrderItemItem); + return this; + } + + public DataAccessEndpointMVO place(List<RelatedPlaceRefMVO> place) { + super.place(place); + return this; + } + + public DataAccessEndpointMVO addPlaceItem(RelatedPlaceRefMVO placeItem) { + super.addPlaceItem(placeItem); + return this; + } + + public DataAccessEndpointMVO relatedParty(List<RelatedPartyRefOrPartyRoleRefMVO> relatedParty) { + super.relatedParty(relatedParty); + return this; + } + + public DataAccessEndpointMVO addRelatedPartyItem(RelatedPartyRefOrPartyRoleRefMVO relatedPartyItem) { + super.addRelatedPartyItem(relatedPartyItem); + return this; + } + + public DataAccessEndpointMVO resourceRelationship(List<ResourceRelationshipMVO> resourceRelationship) { + super.resourceRelationship(resourceRelationship); + return this; + } + + public DataAccessEndpointMVO addResourceRelationshipItem(ResourceRelationshipMVO resourceRelationshipItem) { + super.addResourceRelationshipItem(resourceRelationshipItem); + return this; + } + + public DataAccessEndpointMVO resourceCharacteristic(List<CharacteristicMVO> resourceCharacteristic) { + super.resourceCharacteristic(resourceCharacteristic); + return this; + } + + public DataAccessEndpointMVO addResourceCharacteristicItem(CharacteristicMVO resourceCharacteristicItem) { + super.addResourceCharacteristicItem(resourceCharacteristicItem); + return this; + } + + public DataAccessEndpointMVO attachment(List<AttachmentRefMVO> attachment) { + super.attachment(attachment); + return this; + } + + public DataAccessEndpointMVO addAttachmentItem(AttachmentRefMVO attachmentItem) { + super.addAttachmentItem(attachmentItem); + return this; + } + + public DataAccessEndpointMVO resourceSpecification(ResourceSpecificationRefMVO resourceSpecification) { + super.resourceSpecification(resourceSpecification); + return this; + } + + public DataAccessEndpointMVO startOperatingDate(OffsetDateTime startOperatingDate) { + super.startOperatingDate(startOperatingDate); + return this; + } + + public DataAccessEndpointMVO resourceVersion(String resourceVersion) { + super.resourceVersion(resourceVersion); + return this; + } + + public DataAccessEndpointMVO activationFeature(List<FeatureMVO> activationFeature) { + super.activationFeature(activationFeature); + return this; + } + + public DataAccessEndpointMVO addActivationFeatureItem(FeatureMVO activationFeatureItem) { + super.addActivationFeatureItem(activationFeatureItem); + return this; + } + + public DataAccessEndpointMVO intent(IntentRefMVO intent) { + super.intent(intent); + return this; + } + + public DataAccessEndpointMVO externalIdentifier(List<ExternalIdentifierMVO> externalIdentifier) { + super.externalIdentifier(externalIdentifier); + return this; + } + + public DataAccessEndpointMVO addExternalIdentifierItem(ExternalIdentifierMVO externalIdentifierItem) { + super.addExternalIdentifierItem(externalIdentifierItem); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataAccessEndpointMVO dataAccessEndpointMVO = (DataAccessEndpointMVO) o; + return Objects.equals(this.uri, dataAccessEndpointMVO.uri) && + Objects.equals(this.uriQueryFilter, dataAccessEndpointMVO.uriQueryFilter) && + Objects.equals(this.apiType, dataAccessEndpointMVO.apiType) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(uri, uriQueryFilter, apiType, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataAccessEndpointMVO {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" uri: ").append(toIndentedString(uri)).append("\n"); + sb.append(" uriQueryFilter: ").append(toIndentedString(uriQueryFilter)).append("\n"); + sb.append(" apiType: ").append(toIndentedString(apiType)).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/pm628/model/DataAccessEndpointMapper.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataAccessEndpointMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..7e076d909e03b51a747dee783af28b11466b9bb8 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataAccessEndpointMapper.java @@ -0,0 +1,25 @@ +package org.etsi.osl.tmf.pm628.model; + +import org.mapstruct.*; + +@Mapper( + nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT, + nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, + collectionMappingStrategy = CollectionMappingStrategy.ACCESSOR_ONLY, // Collection- or map-typed properties of the target bean to be updated will be cleared and then populated with the values from the corresponding source collection or map + uses = { + PartyRefOrPartyRoleRefMapper.class, + ResourceRefOrValueMapper.class + } +) +public interface DataAccessEndpointMapper { + + DataAccessEndpoint createDataAccessEndpoint(DataAccessEndpointFVO dataAccessEndpointFVO); + + @Mapping(target = "type", ignore = true) + @Mapping(target = "baseType", ignore = true) + @Mapping(target = "schemaLocation", ignore = true) + @Mapping(target = "href", ignore = true) + @Mapping(target = "uuid", ignore = true) + @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE) + DataAccessEndpoint updateDataAccessEndpoint(DataAccessEndpointMVO dataAccessEndpointMVO, @MappingTarget DataAccessEndpoint dataAccessEndpoint); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterAttribute.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterAttribute.java new file mode 100644 index 0000000000000000000000000000000000000000..5eab513025f9bf18b4d06835853d7a2ec9d8b560 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterAttribute.java @@ -0,0 +1,89 @@ +package org.etsi.osl.tmf.pm628.model; + +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 javax.annotation.Generated; +import java.util.Objects; + +/** + * give an attribute used for filtering + */ + +@Schema(name = "DataFilterAttribute", description = "give an attribute used for filtering") +@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 = DataFilterAttributeStringArray.class, name = "DataFilterAttributeStringArray") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DataFilterAttribute { + + @JsonProperty("valueType") + private String valueType; + + public DataFilterAttribute valueType(String valueType) { + this.valueType = valueType; + return this; + } + + /** + * Data type of the value of the attribute + * @return valueType + */ + + @Schema(name = "valueType", description = "Data type of the value of the attribute", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("valueType") + public String getValueType() { + return valueType; + } + + public void setValueType(String valueType) { + this.valueType = valueType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataFilterAttribute dataFilterAttribute = (DataFilterAttribute) o; + return Objects.equals(this.valueType, dataFilterAttribute.valueType); + } + + @Override + public int hashCode() { + return Objects.hash(valueType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataFilterAttribute {\n"); + sb.append(" valueType: ").append(toIndentedString(valueType)).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/pm628/model/DataFilterAttributeStringArray.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterAttributeStringArray.java new file mode 100644 index 0000000000000000000000000000000000000000..12cc0dd0b435d91b105adc7ce15902f6518b769c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterAttributeStringArray.java @@ -0,0 +1,99 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Embeddable; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * DataFilterAttributeStringArray + */ + +@Embeddable +@JsonIgnoreProperties(ignoreUnknown = true) +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DataFilterAttributeStringArray extends DataFilterAttribute { + + @JsonProperty("value") + @Valid + private List<String> value = new ArrayList<>(); + + public DataFilterAttributeStringArray value(List<String> value) { + this.value = value; + return this; + } + + public DataFilterAttributeStringArray addValueItem(String valueItem) { + if (this.value == null) { + this.value = new ArrayList<>(); + } + this.value.add(valueItem); + return this; + } + + /** + * an array of field names + * @return value + */ + + @Schema(name = "value", example = "[\"Dallas\",\"Houston\",\"Paris\"]", description = "an array of field names", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("value") + public List<String> getValue() { + return value; + } + + public void setValue(List<String> value) { + this.value = value; + } + + + public DataFilterAttributeStringArray valueType(String valueType) { + super.valueType(valueType); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataFilterAttributeStringArray dataFilterAttributeStringArray = (DataFilterAttributeStringArray) o; + return Objects.equals(this.value, dataFilterAttributeStringArray.value) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(value, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataFilterAttributeStringArray {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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/pm628/model/DataFilterMap.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterMap.java new file mode 100644 index 0000000000000000000000000000000000000000..5084ad58fb82072506afc6bd1691bff16b394e73 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterMap.java @@ -0,0 +1,181 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.*; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * DataFilterMap + */ + +@Embeddable +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DataFilterMap { + + @JsonProperty("@type") + @Column(name = "dfm_type") + private String type; + + @JsonProperty("@baseType") + @Column(name = "dfm_base_type") + private String baseType; + + @JsonProperty("@schemaLocation") + @Column(name = "dfm_schema_location") + private String schemaLocation; + + @ElementCollection(targetClass = DataFilterMapItem.class) + @JsonProperty("mappings") + private List<@Valid DataFilterMapItem> mappings = new ArrayList<>(); + + public DataFilterMap() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DataFilterMap(String type) { + this.type = type; + } + + public DataFilterMap type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public DataFilterMap baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public DataFilterMap schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + + public DataFilterMap mappings(List<@Valid DataFilterMapItem> mappings) { + this.mappings = mappings; + return this; + } + + public DataFilterMap addMappingsItem(DataFilterMapItem mappingsItem) { + if (this.mappings == null) { + this.mappings = new ArrayList<>(); + } + this.mappings.add(mappingsItem); + return this; + } + + /** + * Get mappings + * @return mappings + */ + @Valid + @Schema(name = "mappings", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("mappings") + public List<@Valid DataFilterMapItem> getMappings() { + return mappings; + } + + public void setMappings(List<@Valid DataFilterMapItem> mappings) { + this.mappings = mappings; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataFilterMap dataFilterMap = (DataFilterMap) o; + return Objects.equals(this.type, dataFilterMap.type) && + Objects.equals(this.baseType, dataFilterMap.baseType) && + Objects.equals(this.schemaLocation, dataFilterMap.schemaLocation) && + Objects.equals(this.mappings, dataFilterMap.mappings); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, mappings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataFilterMap {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" mappings: ").append(toIndentedString(mappings)).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/pm628/model/DataFilterMapFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterMapFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..66a26463c316db30b1fc3a415526ec5ec5b8b575 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterMapFVO.java @@ -0,0 +1,176 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * DataFilterMapFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DataFilterMapFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("mappings") + @Valid + private List<@Valid DataFilterMapItemFVO> mappings = new ArrayList<>(); + + public DataFilterMapFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DataFilterMapFVO(String type) { + this.type = type; + } + + public DataFilterMapFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public DataFilterMapFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public DataFilterMapFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public DataFilterMapFVO mappings(List<@Valid DataFilterMapItemFVO> mappings) { + this.mappings = mappings; + return this; + } + + public DataFilterMapFVO addMappingsItem(DataFilterMapItemFVO mappingsItem) { + if (this.mappings == null) { + this.mappings = new ArrayList<>(); + } + this.mappings.add(mappingsItem); + return this; + } + + /** + * Get mappings + * @return mappings + */ + @Valid + @Schema(name = "mappings", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("mappings") + public List<@Valid DataFilterMapItemFVO> getMappings() { + return mappings; + } + + public void setMappings(List<@Valid DataFilterMapItemFVO> mappings) { + this.mappings = mappings; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataFilterMapFVO dataFilterMapFVO = (DataFilterMapFVO) o; + return Objects.equals(this.type, dataFilterMapFVO.type) && + Objects.equals(this.baseType, dataFilterMapFVO.baseType) && + Objects.equals(this.schemaLocation, dataFilterMapFVO.schemaLocation) && + Objects.equals(this.mappings, dataFilterMapFVO.mappings); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, mappings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataFilterMapFVO {\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(" mappings: ").append(toIndentedString(mappings)).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/pm628/model/DataFilterMapItem.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterMapItem.java new file mode 100644 index 0000000000000000000000000000000000000000..cb84be04f03a552a8f9468ef297509474aeb5621 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterMapItem.java @@ -0,0 +1,107 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.*; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * definition of a field used for filtering template with the associated attributes. + */ + +@Embeddable +@Schema(name = "DataFilterMapItem", description = "definition of a field used for filtering template with the associated attributes.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DataFilterMapItem { + + @Embedded + @JsonProperty("filterTemplate") + private DataFilterTemplate filterTemplate; + + @Embedded + @JsonProperty("stringArray") + private DataFilterAttributeStringArray stringArray; + + public DataFilterMapItem filterTemplate(DataFilterTemplate filterTemplate) { + this.filterTemplate = filterTemplate; + return this; + } + + /** + * Get filterTemplate + * @return filterTemplate + */ + @Valid + @Schema(name = "filterTemplate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("filterTemplate") + public DataFilterTemplate getFilterTemplate() { + return filterTemplate; + } + + public void setFilterTemplate(DataFilterTemplate filterTemplate) { + this.filterTemplate = filterTemplate; + } + + public DataFilterMapItem stringArray(DataFilterAttributeStringArray stringArray) { + this.stringArray = stringArray; + return this; + } + + /** + * Get stringArray + * @return stringArray + */ + @Valid + @Schema(name = "stringArray", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("stringArray") + public DataFilterAttributeStringArray getStringArray() { + return stringArray; + } + + public void setStringArray(DataFilterAttributeStringArray stringArray) { + this.stringArray = stringArray; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataFilterMapItem dataFilterMapItem = (DataFilterMapItem) o; + return Objects.equals(this.filterTemplate, dataFilterMapItem.filterTemplate) && + Objects.equals(this.stringArray, dataFilterMapItem.stringArray); + } + + @Override + public int hashCode() { + return Objects.hash(filterTemplate, stringArray); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataFilterMapItem {\n"); + sb.append(" filterTemplate: ").append(toIndentedString(filterTemplate)).append("\n"); + sb.append(" stringArray: ").append(toIndentedString(stringArray)).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/pm628/model/DataFilterMapItemFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterMapItemFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..90fb5e91b24caf46c642e3434756ca481e210643 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterMapItemFVO.java @@ -0,0 +1,105 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * definition of a field used for filtering template with the associated attributes. + */ + +@Schema(name = "DataFilterMapItem_FVO", description = "definition of a field used for filtering template with the associated attributes.") +@JsonTypeName("DataFilterMapItem_FVO") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DataFilterMapItemFVO { + + @JsonProperty("filterTemplate") + private DataFilterTemplateFVO filterTemplate; + + @JsonProperty("stringArray") + private DataFilterAttributeStringArray stringArray; + + public DataFilterMapItemFVO filterTemplate(DataFilterTemplateFVO filterTemplate) { + this.filterTemplate = filterTemplate; + return this; + } + + /** + * Get filterTemplate + * @return filterTemplate + */ + @Valid + @Schema(name = "filterTemplate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("filterTemplate") + public DataFilterTemplateFVO getFilterTemplate() { + return filterTemplate; + } + + public void setFilterTemplate(DataFilterTemplateFVO filterTemplate) { + this.filterTemplate = filterTemplate; + } + + public DataFilterMapItemFVO stringArray(DataFilterAttributeStringArray stringArray) { + this.stringArray = stringArray; + return this; + } + + /** + * Get stringArray + * @return stringArray + */ + @Valid + @Schema(name = "stringArray", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("stringArray") + public DataFilterAttributeStringArray getStringArray() { + return stringArray; + } + + public void setStringArray(DataFilterAttributeStringArray stringArray) { + this.stringArray = stringArray; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataFilterMapItemFVO dataFilterMapItemFVO = (DataFilterMapItemFVO) o; + return Objects.equals(this.filterTemplate, dataFilterMapItemFVO.filterTemplate) && + Objects.equals(this.stringArray, dataFilterMapItemFVO.stringArray); + } + + @Override + public int hashCode() { + return Objects.hash(filterTemplate, stringArray); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataFilterMapItemFVO {\n"); + sb.append(" filterTemplate: ").append(toIndentedString(filterTemplate)).append("\n"); + sb.append(" stringArray: ").append(toIndentedString(stringArray)).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/pm628/model/DataFilterMapItemMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterMapItemMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..f7d1739955cd66d867172da834e0462d672b1be6 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterMapItemMVO.java @@ -0,0 +1,103 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * definition of a field used for filtering template with the associated attributes. + */ + +@Schema(name = "DataFilterMapItem_MVO", description = "definition of a field used for filtering template with the associated attributes.") +@JsonTypeName("DataFilterMapItem_MVO") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DataFilterMapItemMVO { + + private DataFilterTemplateMVO filterTemplate; + + private DataFilterAttributeStringArray stringArray; + + public DataFilterMapItemMVO filterTemplate(DataFilterTemplateMVO filterTemplate) { + this.filterTemplate = filterTemplate; + return this; + } + + /** + * Get filterTemplate + * @return filterTemplate + */ + @Valid + @Schema(name = "filterTemplate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("filterTemplate") + public DataFilterTemplateMVO getFilterTemplate() { + return filterTemplate; + } + + public void setFilterTemplate(DataFilterTemplateMVO filterTemplate) { + this.filterTemplate = filterTemplate; + } + + public DataFilterMapItemMVO stringArray(DataFilterAttributeStringArray stringArray) { + this.stringArray = stringArray; + return this; + } + + /** + * Get stringArray + * @return stringArray + */ + @Valid + @Schema(name = "stringArray", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("stringArray") + public DataFilterAttributeStringArray getStringArray() { + return stringArray; + } + + public void setStringArray(DataFilterAttributeStringArray stringArray) { + this.stringArray = stringArray; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataFilterMapItemMVO dataFilterMapItemMVO = (DataFilterMapItemMVO) o; + return Objects.equals(this.filterTemplate, dataFilterMapItemMVO.filterTemplate) && + Objects.equals(this.stringArray, dataFilterMapItemMVO.stringArray); + } + + @Override + public int hashCode() { + return Objects.hash(filterTemplate, stringArray); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataFilterMapItemMVO {\n"); + sb.append(" filterTemplate: ").append(toIndentedString(filterTemplate)).append("\n"); + sb.append(" stringArray: ").append(toIndentedString(stringArray)).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/pm628/model/DataFilterMapMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterMapMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..f7eed3d1035aaf84d29c1f4fd1836a65f12ff056 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterMapMVO.java @@ -0,0 +1,176 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * DataFilterMapMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DataFilterMapMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("mappings") + @Valid + private List<@Valid DataFilterMapItemMVO> mappings = new ArrayList<>(); + + public DataFilterMapMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DataFilterMapMVO(String type) { + this.type = type; + } + + public DataFilterMapMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public DataFilterMapMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public DataFilterMapMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public DataFilterMapMVO mappings(List<@Valid DataFilterMapItemMVO> mappings) { + this.mappings = mappings; + return this; + } + + public DataFilterMapMVO addMappingsItem(DataFilterMapItemMVO mappingsItem) { + if (this.mappings == null) { + this.mappings = new ArrayList<>(); + } + this.mappings.add(mappingsItem); + return this; + } + + /** + * Get mappings + * @return mappings + */ + @Valid + @Schema(name = "mappings", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("mappings") + public List<@Valid DataFilterMapItemMVO> getMappings() { + return mappings; + } + + public void setMappings(List<@Valid DataFilterMapItemMVO> mappings) { + this.mappings = mappings; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataFilterMapMVO dataFilterMapMVO = (DataFilterMapMVO) o; + return Objects.equals(this.type, dataFilterMapMVO.type) && + Objects.equals(this.baseType, dataFilterMapMVO.baseType) && + Objects.equals(this.schemaLocation, dataFilterMapMVO.schemaLocation) && + Objects.equals(this.mappings, dataFilterMapMVO.mappings); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, mappings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataFilterMapMVO {\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(" mappings: ").append(toIndentedString(mappings)).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/pm628/model/DataFilterTemplate.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterTemplate.java new file mode 100644 index 0000000000000000000000000000000000000000..5c020282e5cc360a78d67b128c5e7e29740c844f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterTemplate.java @@ -0,0 +1,241 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Embeddable; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * DataFilterTemplate + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Embeddable +public class DataFilterTemplate { + + @JsonProperty("@type") + protected String type; + + @JsonProperty("@baseType") + protected String baseType; + + @JsonProperty("@schemaLocation") + protected String schemaLocation; + + @JsonProperty("id") + protected String id; + + @JsonProperty("href") + protected String href; + + @JsonProperty("name") + protected String name; + + @JsonProperty("description") + protected String description; + + public DataFilterTemplate() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DataFilterTemplate(String type) { + this.type = type; + } + + public DataFilterTemplate type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public DataFilterTemplate baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public DataFilterTemplate schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public DataFilterTemplate id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of this DataFilterTemplate + * @return id + */ + + @Schema(name = "id", example = "6c088cf7f1bc", description = "Unique identifier of this DataFilterTemplate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public DataFilterTemplate href(String href) { + this.href = href; + return this; + } + + /** + * Hyperlink reference to this DataFilterTemplate + * @return href + */ + @Valid + @Schema(name = "href", example = "https://host/dataFilerTemplate/6c088cf7f1bc", description = "Hyperlink reference to this DataFilterTemplate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("href") + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public DataFilterTemplate name(String name) { + this.name = name; + return this; + } + + /** + * Name given to this DataFilterTemplate + * @return name + */ + + @Schema(name = "name", description = "Name given to this DataFilterTemplate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public DataFilterTemplate description(String description) { + this.description = description; + return this; + } + + /** + * Description of this DataFilterTemplate + * @return description + */ + + @Schema(name = "description", description = "Description of this DataFilterTemplate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataFilterTemplate dataFilterTemplate = (DataFilterTemplate) o; + return Objects.equals(this.type, dataFilterTemplate.type) && + Objects.equals(this.baseType, dataFilterTemplate.baseType) && + Objects.equals(this.schemaLocation, dataFilterTemplate.schemaLocation) && + Objects.equals(this.id, dataFilterTemplate.id) && + Objects.equals(this.href, dataFilterTemplate.href) && + Objects.equals(this.name, dataFilterTemplate.name) && + Objects.equals(this.description, dataFilterTemplate.description); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, id, href, name, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataFilterTemplate {\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(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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/pm628/model/DataFilterTemplateFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterTemplateFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..ecd0fc69e2d76cc790f8d045121f3edc951541af --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterTemplateFVO.java @@ -0,0 +1,206 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * DataFilterTemplateFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DataFilterTemplateFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href = null; + + @JsonProperty("name") + private String name; + + @JsonProperty("description") + private String description; + + public DataFilterTemplateFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DataFilterTemplateFVO(String type) { + this.type = type; + } + + public DataFilterTemplateFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public DataFilterTemplateFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public DataFilterTemplateFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + /** + * Unique reference of the entity + * + * @return href + **/ + @Schema(description = "Unique reference of the entity") + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public DataFilterTemplateFVO name(String name) { + this.name = name; + return this; + } + + /** + * Name given to this DataFilterTemplate + * @return name + */ + + @Schema(name = "name", description = "Name given to this DataFilterTemplate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public DataFilterTemplateFVO description(String description) { + this.description = description; + return this; + } + + /** + * Description of this DataFilterTemplate + * @return description + */ + + @Schema(name = "description", description = "Description of this DataFilterTemplate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataFilterTemplateFVO dataFilterTemplateFVO = (DataFilterTemplateFVO) o; + return Objects.equals(this.type, dataFilterTemplateFVO.type) && + Objects.equals(this.baseType, dataFilterTemplateFVO.baseType) && + Objects.equals(this.schemaLocation, dataFilterTemplateFVO.schemaLocation) && + Objects.equals(this.name, dataFilterTemplateFVO.name) && + Objects.equals(this.description, dataFilterTemplateFVO.description); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, name, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataFilterTemplateFVO {\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(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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/pm628/model/DataFilterTemplateMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterTemplateMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..98162e0ca0f2f3fb6b97dea050aa202530a10aed --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DataFilterTemplateMVO.java @@ -0,0 +1,231 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * DataFilterTemplateMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DataFilterTemplateMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + protected String href = null; + + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonProperty("description") + private String description; + + public DataFilterTemplateMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DataFilterTemplateMVO(String type) { + this.type = type; + } + + public DataFilterTemplateMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public DataFilterTemplateMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public DataFilterTemplateMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + /** + * Unique reference of the entity + * + * @return href + **/ + @Schema(description = "Unique reference of the entity") + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public DataFilterTemplateMVO id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of this DataFilterTemplate + * @return id + */ + + @Schema(name = "id", example = "6c088cf7f1bc", description = "Unique identifier of this DataFilterTemplate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public DataFilterTemplateMVO name(String name) { + this.name = name; + return this; + } + + /** + * Name given to this DataFilterTemplate + * @return name + */ + + @Schema(name = "name", description = "Name given to this DataFilterTemplate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public DataFilterTemplateMVO description(String description) { + this.description = description; + return this; + } + + /** + * Description of this DataFilterTemplate + * @return description + */ + + @Schema(name = "description", description = "Description of this DataFilterTemplate", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataFilterTemplateMVO dataFilterTemplateMVO = (DataFilterTemplateMVO) o; + return Objects.equals(this.type, dataFilterTemplateMVO.type) && + Objects.equals(this.baseType, dataFilterTemplateMVO.baseType) && + Objects.equals(this.schemaLocation, dataFilterTemplateMVO.schemaLocation) && + Objects.equals(this.id, dataFilterTemplateMVO.id) && + Objects.equals(this.name, dataFilterTemplateMVO.name) && + Objects.equals(this.description, dataFilterTemplateMVO.description); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, id, name, description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataFilterTemplateMVO {\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(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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/pm628/model/DayOfMonthRecurrence.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DayOfMonthRecurrence.java new file mode 100644 index 0000000000000000000000000000000000000000..ef8d3d59be86689c130feea2c216642e36688059 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DayOfMonthRecurrence.java @@ -0,0 +1,183 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * DayOfMonthRecurrence + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Embeddable +public class DayOfMonthRecurrence { + + @JsonProperty("@type") + @Column(name = "domr_type") + private String type; + + @JsonProperty("@baseType") + @Column(name = "domr_base_type") + private String baseType; + + @JsonProperty("@schemaLocation") + @Column(name = "domr_schema_location") + private String schemaLocation; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dates; + + public DayOfMonthRecurrence() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DayOfMonthRecurrence(String type) { + this.type = type; + } + + public DayOfMonthRecurrence type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public DayOfMonthRecurrence baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public DayOfMonthRecurrence schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public DayOfMonthRecurrence dates(OffsetDateTime dates) { + this.dates = dates; + return this; + } + + /** + * Get dates + * @return dates + */ + @Valid + @Schema(name = "dates", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dates") + public String getDatesString() { + return dates.toString(); + } + + public void setDates(String dates) { + if ( dates!= null ) { + this.dates = OffsetDateTime.parse( dates ); + } + } + + public OffsetDateTime getDates() { + return dates; + } + + public void setDates(OffsetDateTime dates) { + this.dates = dates; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DayOfMonthRecurrence dayOfMonthRecurrence = (DayOfMonthRecurrence) o; + return Objects.equals(this.type, dayOfMonthRecurrence.type) && + Objects.equals(this.baseType, dayOfMonthRecurrence.baseType) && + Objects.equals(this.schemaLocation, dayOfMonthRecurrence.schemaLocation) && + Objects.equals(this.dates, dayOfMonthRecurrence.dates); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, dates); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DayOfMonthRecurrence {\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(" dates: ").append(toIndentedString(dates)).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/pm628/model/DayOfMonthRecurrenceFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DayOfMonthRecurrenceFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..1cee0eb3b27985eb6acbd39e174ac981dd63ac0d --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DayOfMonthRecurrenceFVO.java @@ -0,0 +1,168 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * DayOfMonthRecurrenceFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DayOfMonthRecurrenceFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("dates") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dates; + + public DayOfMonthRecurrenceFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DayOfMonthRecurrenceFVO(String type) { + this.type = type; + } + + public DayOfMonthRecurrenceFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public DayOfMonthRecurrenceFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public DayOfMonthRecurrenceFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public DayOfMonthRecurrenceFVO dates(OffsetDateTime dates) { + this.dates = dates; + return this; + } + + /** + * Get dates + * @return dates + */ + @Valid + @Schema(name = "dates", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dates") + public OffsetDateTime getDates() { + return dates; + } + + public void setDates(OffsetDateTime dates) { + this.dates = dates; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DayOfMonthRecurrenceFVO dayOfMonthRecurrenceFVO = (DayOfMonthRecurrenceFVO) o; + return Objects.equals(this.type, dayOfMonthRecurrenceFVO.type) && + Objects.equals(this.baseType, dayOfMonthRecurrenceFVO.baseType) && + Objects.equals(this.schemaLocation, dayOfMonthRecurrenceFVO.schemaLocation) && + Objects.equals(this.dates, dayOfMonthRecurrenceFVO.dates); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, dates); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DayOfMonthRecurrenceFVO {\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(" dates: ").append(toIndentedString(dates)).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/pm628/model/DayOfMonthRecurrenceMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DayOfMonthRecurrenceMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..0a8506a0cc3df55953a7e7e614158f5a9e72ec42 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DayOfMonthRecurrenceMVO.java @@ -0,0 +1,168 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * DayOfMonthRecurrenceMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DayOfMonthRecurrenceMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("dates") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dates; + + public DayOfMonthRecurrenceMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DayOfMonthRecurrenceMVO(String type) { + this.type = type; + } + + public DayOfMonthRecurrenceMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public DayOfMonthRecurrenceMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public DayOfMonthRecurrenceMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public DayOfMonthRecurrenceMVO dates(OffsetDateTime dates) { + this.dates = dates; + return this; + } + + /** + * Get dates + * @return dates + */ + @Valid + @Schema(name = "dates", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dates") + public OffsetDateTime getDates() { + return dates; + } + + public void setDates(OffsetDateTime dates) { + this.dates = dates; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DayOfMonthRecurrenceMVO dayOfMonthRecurrenceMVO = (DayOfMonthRecurrenceMVO) o; + return Objects.equals(this.type, dayOfMonthRecurrenceMVO.type) && + Objects.equals(this.baseType, dayOfMonthRecurrenceMVO.baseType) && + Objects.equals(this.schemaLocation, dayOfMonthRecurrenceMVO.schemaLocation) && + Objects.equals(this.dates, dayOfMonthRecurrenceMVO.dates); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, dates); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DayOfMonthRecurrenceMVO {\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(" dates: ").append(toIndentedString(dates)).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/pm628/model/DayOfWeekRecurrence.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DayOfWeekRecurrence.java new file mode 100644 index 0000000000000000000000000000000000000000..b8bfefe230ba65796f495f3a3709efa974261ed3 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DayOfWeekRecurrence.java @@ -0,0 +1,183 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * DayOfWeekRecurrence + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Embeddable +public class DayOfWeekRecurrence { + + @JsonProperty("@type") + @Column(name = "dowr_type") + private String type; + + @JsonProperty("@baseType") + @Column(name = "dowr_base_type") + private String baseType; + + @JsonProperty("@schemaLocation") + @Column(name = "dowr_schema_location") + private String schemaLocation; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dates; + + public DayOfWeekRecurrence() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DayOfWeekRecurrence(String type) { + this.type = type; + } + + public DayOfWeekRecurrence type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public DayOfWeekRecurrence baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public DayOfWeekRecurrence schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public DayOfWeekRecurrence dates(OffsetDateTime dates) { + this.dates = dates; + return this; + } + + /** + * Get dates + * @return dates + */ + @Valid + @Schema(name = "dates", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + public OffsetDateTime getDates() { + return dates; + } + + @JsonProperty("dates") + public String getDatesString() { + return dates.toString(); + } + + public void setDates(String dates) { + if ( dates!= null ) { + this.dates = OffsetDateTime.parse( dates ); + } + } + + public void setDates(OffsetDateTime dates) { + this.dates = dates; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DayOfWeekRecurrence dayOfWeekRecurrence = (DayOfWeekRecurrence) o; + return Objects.equals(this.type, dayOfWeekRecurrence.type) && + Objects.equals(this.baseType, dayOfWeekRecurrence.baseType) && + Objects.equals(this.schemaLocation, dayOfWeekRecurrence.schemaLocation) && + Objects.equals(this.dates, dayOfWeekRecurrence.dates); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, dates); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DayOfWeekRecurrence {\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(" dates: ").append(toIndentedString(dates)).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/pm628/model/DayOfWeekRecurrenceFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DayOfWeekRecurrenceFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..33c57949f9ca5281b9793b1ae443bf63e006111e --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DayOfWeekRecurrenceFVO.java @@ -0,0 +1,168 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * DayOfWeekRecurrenceFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DayOfWeekRecurrenceFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("dates") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dates; + + public DayOfWeekRecurrenceFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DayOfWeekRecurrenceFVO(String type) { + this.type = type; + } + + public DayOfWeekRecurrenceFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public DayOfWeekRecurrenceFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public DayOfWeekRecurrenceFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public DayOfWeekRecurrenceFVO dates(OffsetDateTime dates) { + this.dates = dates; + return this; + } + + /** + * Get dates + * @return dates + */ + @Valid + @Schema(name = "dates", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dates") + public OffsetDateTime getDates() { + return dates; + } + + public void setDates(OffsetDateTime dates) { + this.dates = dates; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DayOfWeekRecurrenceFVO dayOfWeekRecurrenceFVO = (DayOfWeekRecurrenceFVO) o; + return Objects.equals(this.type, dayOfWeekRecurrenceFVO.type) && + Objects.equals(this.baseType, dayOfWeekRecurrenceFVO.baseType) && + Objects.equals(this.schemaLocation, dayOfWeekRecurrenceFVO.schemaLocation) && + Objects.equals(this.dates, dayOfWeekRecurrenceFVO.dates); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, dates); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DayOfWeekRecurrenceFVO {\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(" dates: ").append(toIndentedString(dates)).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/pm628/model/DayOfWeekRecurrenceMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/DayOfWeekRecurrenceMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..2ef8783a7073ef822bbe17386bcf1cb44d2db53d --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/DayOfWeekRecurrenceMVO.java @@ -0,0 +1,168 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * DayOfWeekRecurrenceMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class DayOfWeekRecurrenceMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("dates") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime dates; + + public DayOfWeekRecurrenceMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public DayOfWeekRecurrenceMVO(String type) { + this.type = type; + } + + public DayOfWeekRecurrenceMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public DayOfWeekRecurrenceMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public DayOfWeekRecurrenceMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public DayOfWeekRecurrenceMVO dates(OffsetDateTime dates) { + this.dates = dates; + return this; + } + + /** + * Get dates + * @return dates + */ + @Valid + @Schema(name = "dates", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dates") + public OffsetDateTime getDates() { + return dates; + } + + public void setDates(OffsetDateTime dates) { + this.dates = dates; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DayOfWeekRecurrenceMVO dayOfWeekRecurrenceMVO = (DayOfWeekRecurrenceMVO) o; + return Objects.equals(this.type, dayOfWeekRecurrenceMVO.type) && + Objects.equals(this.baseType, dayOfWeekRecurrenceMVO.baseType) && + Objects.equals(this.schemaLocation, dayOfWeekRecurrenceMVO.schemaLocation) && + Objects.equals(this.dates, dayOfWeekRecurrenceMVO.dates); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, dates); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DayOfWeekRecurrenceMVO {\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(" dates: ").append(toIndentedString(dates)).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/pm628/model/Duration.java b/src/main/java/org/etsi/osl/tmf/pm628/model/Duration.java new file mode 100644 index 0000000000000000000000000000000000000000..65323de60503f96817ab4a382d67f9933f3716cf --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/Duration.java @@ -0,0 +1,103 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Embeddable; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * A time interval in a given unit of time + */ + +@Schema(name = "Duration", description = "A time interval in a given unit of time") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Embeddable +public class Duration { + + @JsonProperty("amount") + private Integer amount; + + @JsonProperty("units") + private String units; + + public Duration amount(Integer amount) { + this.amount = amount; + return this; + } + + /** + * Time interval (number of seconds, minutes, hours, etc.) + * @return amount + */ + + @Schema(name = "amount", description = "Time interval (number of seconds, minutes, hours, etc.)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("amount") + public Integer getAmount() { + return amount; + } + + public void setAmount(Integer amount) { + this.amount = amount; + } + + public Duration units(String units) { + this.units = units; + return this; + } + + /** + * Unit of time (seconds, minutes, hours, etc.) + * @return units + */ + + @Schema(name = "units", description = "Unit of time (seconds, minutes, hours, etc.)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("units") + public String getUnits() { + return units; + } + + public void setUnits(String units) { + this.units = units; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Duration duration = (Duration) o; + return Objects.equals(this.amount, duration.amount) && + Objects.equals(this.units, duration.units); + } + + @Override + public int hashCode() { + return Objects.hash(amount, units); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Duration {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" units: ").append(toIndentedString(units)).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 "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/EntityMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/EntityMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..26e3da5fc4ff5e57f8013909e7ce7cd7d59cdbd1 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/EntityMVO.java @@ -0,0 +1,138 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * Base entity schema for use in TMForum Open-APIs. Property. + */ + +@Schema(name = "Entity_MVO", description = "Base entity schema for use in TMForum Open-APIs. Property.") +@JsonTypeName("Entity_MVO") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class EntityMVO { + + private String atType; + + private String atBaseType; + + private String atSchemaLocation; + + public EntityMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EntityMVO(String atType) { + this.atType = atType; + } + + public EntityMVO 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) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public EntityMVO 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 EntityMVO 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; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityMVO entityMVO = (EntityMVO) o; + return Objects.equals(this.atType, entityMVO.atType) && + Objects.equals(this.atBaseType, entityMVO.atBaseType) && + Objects.equals(this.atSchemaLocation, entityMVO.atSchemaLocation); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityMVO {\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/pm628/model/EntityRefFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/EntityRefFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..c516676c0f405746fc7b1b6f476d3df202808eb9 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/EntityRefFVO.java @@ -0,0 +1,233 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * EntityRefFVO + */ + +@JsonTypeName("EntityRef_FVO") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class EntityRefFVO { + + private String atType; + + private String atBaseType; + + private String atSchemaLocation; + + private String href; + + private String id; + + private String name; + + private String _atReferredType; + + public EntityRefFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EntityRefFVO(String atType) { + this.atType = atType; + } + + public EntityRefFVO 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) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public EntityRefFVO 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 EntityRefFVO 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 EntityRefFVO 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 EntityRefFVO id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public EntityRefFVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public EntityRefFVO _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) + @JsonProperty("@referredType") + 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; + } + EntityRefFVO entityRefFVO = (EntityRefFVO) o; + return Objects.equals(this.atType, entityRefFVO.atType) && + Objects.equals(this.atBaseType, entityRefFVO.atBaseType) && + Objects.equals(this.atSchemaLocation, entityRefFVO.atSchemaLocation) && + Objects.equals(this.href, entityRefFVO.href) && + Objects.equals(this.id, entityRefFVO.id) && + Objects.equals(this.name, entityRefFVO.name) && + Objects.equals(this._atReferredType, entityRefFVO._atReferredType); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation, href, id, name, _atReferredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityRefFVO {\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(" href: ").append(toIndentedString(href)).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("}"); + 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/pm628/model/EntityRefMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/EntityRefMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..819eb1285be3badce74aefef57549441ab5c773c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/EntityRefMVO.java @@ -0,0 +1,233 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * EntityRefMVO + */ + +@JsonTypeName("EntityRef_MVO") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class EntityRefMVO { + + private String atType; + + private String atBaseType; + + private String atSchemaLocation; + + private String href; + + private String id; + + private String name; + + private String _atReferredType; + + public EntityRefMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public EntityRefMVO(String atType) { + this.atType = atType; + } + + public EntityRefMVO 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) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public EntityRefMVO 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 EntityRefMVO 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 EntityRefMVO 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 EntityRefMVO id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the referred entity. + * @return id + */ + + @Schema(name = "id", description = "The identifier of the referred entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public EntityRefMVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public EntityRefMVO _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) + @JsonProperty("@referredType") + 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; + } + EntityRefMVO entityRefMVO = (EntityRefMVO) o; + return Objects.equals(this.atType, entityRefMVO.atType) && + Objects.equals(this.atBaseType, entityRefMVO.atBaseType) && + Objects.equals(this.atSchemaLocation, entityRefMVO.atSchemaLocation) && + Objects.equals(this.href, entityRefMVO.href) && + Objects.equals(this.id, entityRefMVO.id) && + Objects.equals(this.name, entityRefMVO.name) && + Objects.equals(this._atReferredType, entityRefMVO._atReferredType); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation, href, id, name, _atReferredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityRefMVO {\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(" href: ").append(toIndentedString(href)).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("}"); + 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/pm628/model/Event.java b/src/main/java/org/etsi/osl/tmf/pm628/model/Event.java new file mode 100644 index 0000000000000000000000000000000000000000..15be3c35973d08528623c61e655332d22b0c7fbc --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/Event.java @@ -0,0 +1,577 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.ri639.model.EntityRef; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +/** + * Event + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class Event { + + @JsonProperty("@type") + protected String type; + + @JsonProperty("@baseType") + protected String baseType; + + @JsonProperty("@schemaLocation") + protected String schemaLocation; + + @JsonProperty("href") + protected String href; + + @JsonProperty("id") + protected String id= UUID.randomUUID().toString(); + + @JsonProperty("correlationId") + protected String correlationId; + + @JsonProperty("domain") + protected String domain; + + @JsonProperty("title") + protected String title; + + @JsonProperty("description") + protected String description; + + @JsonProperty("priority") + protected String priority; + + @JsonProperty("timeOccurred") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + protected OffsetDateTime timeOccurred; + + @JsonProperty("source") + protected EntityRef source; + + @JsonProperty("reportingSystem") + protected EntityRef reportingSystem; + + @JsonProperty("relatedParty") + @Valid + protected List<RelatedPartyRefOrPartyRoleRef> relatedParty = new ArrayList<>(); + + @JsonProperty("analyticCharacteristic") + @Valid + protected List<Characteristic> analyticCharacteristic = new ArrayList<>(); + + @JsonProperty("eventId") + protected String eventId= UUID.randomUUID().toString(); + + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + protected OffsetDateTime eventTime = OffsetDateTime.now(ZoneOffset.UTC); + + @JsonProperty("eventType") + protected String eventType; + + @JsonProperty("event") + protected Object event; + + public Event() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Event(String type) { + this.type = type; + } + + public Event type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Event baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public Event schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public Event 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 Event id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Event 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) + @JsonProperty("correlationId") + public String getCorrelationId() { + return correlationId; + } + + public void setCorrelationId(String correlationId) { + this.correlationId = correlationId; + } + + public Event 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) + @JsonProperty("domain") + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public Event 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) + @JsonProperty("title") + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public Event description(String description) { + this.description = description; + return this; + } + + /** + * An explanation of the event. + * @return description + */ + + @Schema(name = "description", description = "An explanation of the event.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Event priority(String priority) { + this.priority = priority; + return this; + } + + /** + * A priority. + * @return priority + */ + + @Schema(name = "priority", description = "A priority.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("priority") + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public Event timeOccurred(OffsetDateTime timeOccurred) { + this.timeOccurred = timeOccurred; + return this; + } + + /** + * The time the event occurred. + * @return timeOccurred + */ + @Valid + @Schema(name = "timeOccurred", description = "The time the event occurred.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("timeOccurred") + public OffsetDateTime getTimeOccurred() { + return timeOccurred; + } + + public void setTimeOccurred(OffsetDateTime timeOccurred) { + this.timeOccurred = timeOccurred; + } + + public Event source(EntityRef source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @Valid + @Schema(name = "source", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("source") + public EntityRef getSource() { + return source; + } + + public void setSource(EntityRef source) { + this.source = source; + } + + public Event reportingSystem(EntityRef reportingSystem) { + this.reportingSystem = reportingSystem; + return this; + } + + /** + * Get reportingSystem + * @return reportingSystem + */ + @Valid + @Schema(name = "reportingSystem", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("reportingSystem") + public EntityRef getReportingSystem() { + return reportingSystem; + } + + public void setReportingSystem(EntityRef reportingSystem) { + this.reportingSystem = reportingSystem; + } + + public Event relatedParty(List<RelatedPartyRefOrPartyRoleRef> relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public Event addRelatedPartyItem(RelatedPartyRefOrPartyRoleRef relatedPartyItem) { + if (this.relatedParty == null) { + this.relatedParty = new ArrayList<>(); + } + this.relatedParty.add(relatedPartyItem); + return this; + } + + /** + * Collection of related parties + * @return relatedParty + */ + @Valid + @Schema(name = "relatedParty", description = "Collection of related parties", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("relatedParty") + public List<RelatedPartyRefOrPartyRoleRef> getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List<RelatedPartyRefOrPartyRoleRef> relatedParty) { + this.relatedParty = relatedParty; + } + + public Event analyticCharacteristic(List<Characteristic> analyticCharacteristic) { + this.analyticCharacteristic = analyticCharacteristic; + return this; + } + + public Event addAnalyticCharacteristicItem(Characteristic analyticCharacteristicItem) { + if (this.analyticCharacteristic == null) { + this.analyticCharacteristic = new ArrayList<>(); + } + this.analyticCharacteristic.add(analyticCharacteristicItem); + return this; + } + + /** + * Collection of analytic characteristics + * @return analyticCharacteristic + */ + @Valid + @Schema(name = "analyticCharacteristic", description = "Collection of analytic characteristics", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("analyticCharacteristic") + public List<Characteristic> getAnalyticCharacteristic() { + return analyticCharacteristic; + } + + public void setAnalyticCharacteristic(List<Characteristic> analyticCharacteristic) { + this.analyticCharacteristic = analyticCharacteristic; + } + + public Event 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) + @JsonProperty("eventId") + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + public Event 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; + } + + @JsonProperty("eventTime") + public String getEventTimeString() { + return eventTime.toString(); + } + + + public void setEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + } + + public void setEventTime(String eventTime) { + if ( eventTime!= null ) { + this.eventTime = OffsetDateTime.parse( eventTime ); + } +} + + public Event 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) + @JsonProperty("eventType") + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public Event event(Object event) { + this.event = event; + return this; + } + + /** + * The event linked to the involved resource object + * @return event + */ + + @Schema(name = "event", description = "The event linked to the involved resource object", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("event") + public Object getEvent() { + return event; + } + + public void setEvent(Object event) { + this.event = event; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Event event = (Event) o; + return Objects.equals(this.type, event.type) && + Objects.equals(this.baseType, event.baseType) && + Objects.equals(this.schemaLocation, event.schemaLocation) && + Objects.equals(this.href, event.href) && + Objects.equals(this.id, event.id) && + Objects.equals(this.correlationId, event.correlationId) && + Objects.equals(this.domain, event.domain) && + Objects.equals(this.title, event.title) && + Objects.equals(this.description, event.description) && + Objects.equals(this.priority, event.priority) && + Objects.equals(this.timeOccurred, event.timeOccurred) && + Objects.equals(this.source, event.source) && + Objects.equals(this.reportingSystem, event.reportingSystem) && + Objects.equals(this.relatedParty, event.relatedParty) && + Objects.equals(this.analyticCharacteristic, event.analyticCharacteristic) && + Objects.equals(this.eventId, event.eventId) && + Objects.equals(this.eventTime, event.eventTime) && + Objects.equals(this.eventType, event.eventType) && + Objects.equals(this.event, event.event); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, correlationId, domain, title, description, priority, timeOccurred, source, reportingSystem, relatedParty, analyticCharacteristic, eventId, eventTime, eventType, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Event {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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(" timeOccurred: ").append(toIndentedString(timeOccurred)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" reportingSystem: ").append(toIndentedString(reportingSystem)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" analyticCharacteristic: ").append(toIndentedString(analyticCharacteristic)).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(" 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/pm628/model/ExecutionStateType.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ExecutionStateType.java new file mode 100644 index 0000000000000000000000000000000000000000..ec5524948489247d17f49ebff216ff2d2e35912c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ExecutionStateType.java @@ -0,0 +1,55 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import javax.annotation.Generated; + +/** + * Possible values for the state of the execution + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public enum ExecutionStateType { + + ACKNOWLEDGED("acknowledged"), + + REJECTED("rejected"), + + PENDING("pending"), + + INPROGRESS("inProgress"), + + CANCELLED("cancelled"), + + COMPLETED("completed"), + + FAILED("failed"); + + private String value; + + ExecutionStateType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ExecutionStateType fromValue(String value) { + for (ExecutionStateType b : ExecutionStateType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/Extensible.java b/src/main/java/org/etsi/osl/tmf/pm628/model/Extensible.java new file mode 100644 index 0000000000000000000000000000000000000000..d89212b88c0900185a651fe80d48efbeb57a054b --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/Extensible.java @@ -0,0 +1,135 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * 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") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class Extensible { + + private String atType; + + private String atBaseType; + + 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) + @JsonProperty("@type") + 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) + @JsonProperty("@baseType") + 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) + @JsonProperty("@schemaLocation") + 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 "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/ExtensibleFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ExtensibleFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..6301240272bb0935b9251d312c72d5a6ab3be341 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ExtensibleFVO.java @@ -0,0 +1,138 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * 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_FVO", 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") +@JsonTypeName("Extensible_FVO") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ExtensibleFVO { + + private String atType; + + private String atBaseType; + + private String atSchemaLocation; + + public ExtensibleFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ExtensibleFVO(String atType) { + this.atType = atType; + } + + public ExtensibleFVO 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) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public ExtensibleFVO 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 ExtensibleFVO 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; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExtensibleFVO extensibleFVO = (ExtensibleFVO) o; + return Objects.equals(this.atType, extensibleFVO.atType) && + Objects.equals(this.atBaseType, extensibleFVO.atBaseType) && + Objects.equals(this.atSchemaLocation, extensibleFVO.atSchemaLocation); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExtensibleFVO {\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/pm628/model/ExternalIdentifier.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ExternalIdentifier.java new file mode 100644 index 0000000000000000000000000000000000000000..fad2bfc266fc440b34cfb14b2063779f93a9c225 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ExternalIdentifier.java @@ -0,0 +1,222 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * ExternalIdentifier + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Embeddable +public class ExternalIdentifier { + + @JsonProperty("@type") + @Column(name = "ei_type") + protected String type; + + @JsonProperty("@baseType") + @Column(name = "ei_base_type") + protected String baseType; + + @JsonProperty("@schemaLocation") + @Column(name = "ei_schema_location") + protected String schemaLocation; + + @JsonProperty("owner") + @Column(name = "ei_owner") + private String owner; + + @JsonProperty("externalIdentifierType") + @Column(name = "ei_ext_idf_type") + private String externalIdentifierType; + + @JsonProperty("id") + @Column(name = "ei_id") + protected String id; + + public ExternalIdentifier() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ExternalIdentifier(String type) { + this.type = type; + } + + public ExternalIdentifier type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ExternalIdentifier baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ExternalIdentifier schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + 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) + @JsonProperty("owner") + 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) + @JsonProperty("externalIdentifierType") + 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 + */ + + @Schema(name = "id", description = "identification of the entity within the external system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + 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.type, externalIdentifier.type) && + Objects.equals(this.baseType, externalIdentifier.baseType) && + Objects.equals(this.schemaLocation, externalIdentifier.schemaLocation) && + 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(type, baseType, schemaLocation, owner, externalIdentifierType, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalIdentifier {\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(" 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 "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/ExternalIdentifierFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ExternalIdentifierFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..41f01644de26036f1e4ae25f738e53b2bc0e1728 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ExternalIdentifierFVO.java @@ -0,0 +1,189 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * ExternalIdentifierFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ExternalIdentifierFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("owner") + private String owner; + + @JsonProperty("externalIdentifierType") + private String externalIdentifierType; + + public ExternalIdentifierFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ExternalIdentifierFVO(String type) { + this.type = type; + } + + public ExternalIdentifierFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ExternalIdentifierFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ExternalIdentifierFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ExternalIdentifierFVO 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) + @JsonProperty("owner") + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public ExternalIdentifierFVO 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) + @JsonProperty("externalIdentifierType") + public String getExternalIdentifierType() { + return externalIdentifierType; + } + + public void setExternalIdentifierType(String externalIdentifierType) { + this.externalIdentifierType = externalIdentifierType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExternalIdentifierFVO externalIdentifierFVO = (ExternalIdentifierFVO) o; + return Objects.equals(this.type, externalIdentifierFVO.type) && + Objects.equals(this.baseType, externalIdentifierFVO.baseType) && + Objects.equals(this.schemaLocation, externalIdentifierFVO.schemaLocation) && + Objects.equals(this.owner, externalIdentifierFVO.owner) && + Objects.equals(this.externalIdentifierType, externalIdentifierFVO.externalIdentifierType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, owner, externalIdentifierType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalIdentifierFVO {\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(" owner: ").append(toIndentedString(owner)).append("\n"); + sb.append(" externalIdentifierType: ").append(toIndentedString(externalIdentifierType)).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/pm628/model/ExternalIdentifierMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ExternalIdentifierMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..642f5d3c0630a448b478ceeae7fa4493c096a7c4 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ExternalIdentifierMVO.java @@ -0,0 +1,214 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * ExternalIdentifierMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ExternalIdentifierMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("owner") + private String owner; + + @JsonProperty("externalIdentifierType") + private String externalIdentifierType; + + @JsonProperty("id") + private String id; + + public ExternalIdentifierMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ExternalIdentifierMVO(String type) { + this.type = type; + } + + public ExternalIdentifierMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ExternalIdentifierMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ExternalIdentifierMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ExternalIdentifierMVO 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) + @JsonProperty("owner") + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public ExternalIdentifierMVO 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) + @JsonProperty("externalIdentifierType") + public String getExternalIdentifierType() { + return externalIdentifierType; + } + + public void setExternalIdentifierType(String externalIdentifierType) { + this.externalIdentifierType = externalIdentifierType; + } + + public ExternalIdentifierMVO id(String id) { + this.id = id; + return this; + } + + /** + * identification of the entity within the external system. + * @return id + */ + + @Schema(name = "id", description = "identification of the entity within the external system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + 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; + } + ExternalIdentifierMVO externalIdentifierMVO = (ExternalIdentifierMVO) o; + return Objects.equals(this.type, externalIdentifierMVO.type) && + Objects.equals(this.baseType, externalIdentifierMVO.baseType) && + Objects.equals(this.schemaLocation, externalIdentifierMVO.schemaLocation) && + Objects.equals(this.owner, externalIdentifierMVO.owner) && + Objects.equals(this.externalIdentifierType, externalIdentifierMVO.externalIdentifierType) && + Objects.equals(this.id, externalIdentifierMVO.id); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, owner, externalIdentifierType, id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalIdentifierMVO {\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(" 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/pm628/model/Feature.java b/src/main/java/org/etsi/osl/tmf/pm628/model/Feature.java new file mode 100644 index 0000000000000000000000000000000000000000..d03fd8e2983dbd515f575d4904201439260fed24 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/Feature.java @@ -0,0 +1,250 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.*; +import jakarta.validation.Valid; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; +import org.etsi.osl.tmf.ri639.model.FeatureRelationship; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Feature + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_Feature") +public class Feature extends BaseRootNamedEntity { + + @JsonProperty("isBundle") + private Boolean isBundle; + + @JsonProperty("featureRelationship") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_feature_feat_rel", + joinColumns = @JoinColumn(name = "feat_uuid"), + inverseJoinColumns = @JoinColumn(name = "feat_rel_uuid") + ) + private List<FeatureRelationship> featureRelationship = new ArrayList<>(); + + @JsonProperty("featureCharacteristic") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_feature_feat_char", + joinColumns = @JoinColumn(name = "feat_uuid"), + inverseJoinColumns = @JoinColumn(name = "feat_char_uuid") + ) + private List<Characteristic> featureCharacteristic = new ArrayList<>(); + + @JsonProperty("policyConstraint") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_feature_pol_const", + joinColumns = @JoinColumn(name = "feat_uuid"), + inverseJoinColumns = @JoinColumn(name = "pol_const_uuid") + ) + private List<PolicyRef> policyConstraint = new ArrayList<>(); + + @JsonProperty("isEnabled") + private Boolean isEnabled; + + public Feature() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Feature(String type) { + this.type = type; + } + + public Feature isBundle(Boolean isBundle) { + this.isBundle = isBundle; + return this; + } + + /** + * True if this is a feature group. Default is false. + * @return isBundle + */ + + @Schema(name = "isBundle", description = "True if this is a feature group. Default is false.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("isBundle") + public Boolean getIsBundle() { + return isBundle; + } + + public void setIsBundle(Boolean isBundle) { + this.isBundle = isBundle; + } + + public Feature featureRelationship(List<FeatureRelationship> featureRelationship) { + this.featureRelationship = featureRelationship; + return this; + } + + public Feature addFeatureRelationshipItem(FeatureRelationship featureRelationshipItem) { + if (this.featureRelationship == null) { + this.featureRelationship = new ArrayList<>(); + } + this.featureRelationship.add(featureRelationshipItem); + return this; + } + + /** + * Collection of feature relationships + * @return featureRelationship + */ + @Valid + @Schema(name = "featureRelationship", description = "Collection of feature relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("featureRelationship") + public List<FeatureRelationship> getFeatureRelationship() { + return featureRelationship; + } + + public void setFeatureRelationship(List<FeatureRelationship> featureRelationship) { + this.featureRelationship = featureRelationship; + } + + public Feature featureCharacteristic(List<Characteristic> featureCharacteristic) { + this.featureCharacteristic = featureCharacteristic; + return this; + } + + public Feature addFeatureCharacteristicItem(Characteristic featureCharacteristicItem) { + if (this.featureCharacteristic == null) { + this.featureCharacteristic = new ArrayList<>(); + } + this.featureCharacteristic.add(featureCharacteristicItem); + return this; + } + + /** + * This is a list of Characteristics for a particular feature. + * @return featureCharacteristic + */ + @Valid + @Schema(name = "featureCharacteristic", description = "This is a list of Characteristics for a particular feature.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("featureCharacteristic") + public List<Characteristic> getFeatureCharacteristic() { + return featureCharacteristic; + } + + public void setFeatureCharacteristic(List<Characteristic> featureCharacteristic) { + this.featureCharacteristic = featureCharacteristic; + } + + public Feature policyConstraint(List<PolicyRef> policyConstraint) { + this.policyConstraint = policyConstraint; + return this; + } + + public Feature addPolicyConstraintItem(PolicyRef policyConstraintItem) { + if (this.policyConstraint == null) { + this.policyConstraint = new ArrayList<>(); + } + this.policyConstraint.add(policyConstraintItem); + return this; + } + + /** + * Reference to manage a list of feature specification policy constraints + * @return policyConstraint + */ + @Valid + @Schema(name = "policyConstraint", description = "Reference to manage a list of feature specification policy constraints", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("policyConstraint") + public List<PolicyRef> getPolicyConstraint() { + return policyConstraint; + } + + public void setPolicyConstraint(List<PolicyRef> policyConstraint) { + this.policyConstraint = policyConstraint; + } + + public Feature isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + * True if this feature is enabled. Default is true. + * @return isEnabled + */ + + @Schema(name = "isEnabled", description = "True if this feature is enabled. Default is true.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("isEnabled") + public Boolean getIsEnabled() { + return isEnabled; + } + + public void setIsEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Feature feature = (Feature) o; + return Objects.equals(this.type, feature.type) && + Objects.equals(this.baseType, feature.baseType) && + Objects.equals(this.schemaLocation, feature.schemaLocation) && + Objects.equals(this.isBundle, feature.isBundle) && + Objects.equals(this.featureRelationship, feature.featureRelationship) && + Objects.equals(this.featureCharacteristic, feature.featureCharacteristic) && + Objects.equals(this.policyConstraint, feature.policyConstraint) && + Objects.equals(this.isEnabled, feature.isEnabled) && + Objects.equals(this.uuid, feature.uuid) && + Objects.equals(this.name, feature.name); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, isBundle, featureRelationship, featureCharacteristic, policyConstraint, isEnabled, uuid, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Feature {\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(" isBundle: ").append(toIndentedString(isBundle)).append("\n"); + sb.append(" featureRelationship: ").append(toIndentedString(featureRelationship)).append("\n"); + sb.append(" featureCharacteristic: ").append(toIndentedString(featureCharacteristic)).append("\n"); + sb.append(" policyConstraint: ").append(toIndentedString(policyConstraint)).append("\n"); + sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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/pm628/model/FeatureFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/FeatureFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..401bd5c8c9bc464f41ee3257bc9d8e5f103fa358 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/FeatureFVO.java @@ -0,0 +1,319 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * FeatureFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class FeatureFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("isBundle") + private Boolean isBundle; + + @JsonProperty("featureRelationship") + @Valid + private List<FeatureRelationshipFVO> featureRelationship = new ArrayList<>(); + + @JsonProperty("featureCharacteristic") + @Valid + private List<CharacteristicFVO> featureCharacteristic = new ArrayList<>(); + + @JsonProperty("policyConstraint") + @Valid + private List<PolicyRefFVO> policyConstraint = new ArrayList<>(); + + @JsonProperty("isEnabled") + private Boolean isEnabled; + + @JsonProperty("name") + private String name; + + public FeatureFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FeatureFVO(String type) { + this.type = type; + } + + public FeatureFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public FeatureFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public FeatureFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public FeatureFVO isBundle(Boolean isBundle) { + this.isBundle = isBundle; + return this; + } + + /** + * True if this is a feature group. Default is false. + * @return isBundle + */ + + @Schema(name = "isBundle", description = "True if this is a feature group. Default is false.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("isBundle") + public Boolean getIsBundle() { + return isBundle; + } + + public void setIsBundle(Boolean isBundle) { + this.isBundle = isBundle; + } + + public FeatureFVO featureRelationship(List<FeatureRelationshipFVO> featureRelationship) { + this.featureRelationship = featureRelationship; + return this; + } + + public FeatureFVO addFeatureRelationshipItem(FeatureRelationshipFVO featureRelationshipItem) { + if (this.featureRelationship == null) { + this.featureRelationship = new ArrayList<>(); + } + this.featureRelationship.add(featureRelationshipItem); + return this; + } + + /** + * Collection of feature relationships + * @return featureRelationship + */ + @Valid + @Schema(name = "featureRelationship", description = "Collection of feature relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("featureRelationship") + public List<FeatureRelationshipFVO> getFeatureRelationship() { + return featureRelationship; + } + + public void setFeatureRelationship(List<FeatureRelationshipFVO> featureRelationship) { + this.featureRelationship = featureRelationship; + } + + public FeatureFVO featureCharacteristic(List<CharacteristicFVO> featureCharacteristic) { + this.featureCharacteristic = featureCharacteristic; + return this; + } + + public FeatureFVO addFeatureCharacteristicItem(CharacteristicFVO featureCharacteristicItem) { + if (this.featureCharacteristic == null) { + this.featureCharacteristic = new ArrayList<>(); + } + this.featureCharacteristic.add(featureCharacteristicItem); + return this; + } + + /** + * This is a list of Characteristics for a particular feature. + * @return featureCharacteristic + */ + @Valid + @Schema(name = "featureCharacteristic", description = "This is a list of Characteristics for a particular feature.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("featureCharacteristic") + public List<CharacteristicFVO> getFeatureCharacteristic() { + return featureCharacteristic; + } + + public void setFeatureCharacteristic(List<CharacteristicFVO> featureCharacteristic) { + this.featureCharacteristic = featureCharacteristic; + } + + public FeatureFVO policyConstraint(List<PolicyRefFVO> policyConstraint) { + this.policyConstraint = policyConstraint; + return this; + } + + public FeatureFVO addPolicyConstraintItem(PolicyRefFVO policyConstraintItem) { + if (this.policyConstraint == null) { + this.policyConstraint = new ArrayList<>(); + } + this.policyConstraint.add(policyConstraintItem); + return this; + } + + /** + * Reference to manage a list of feature specification policy constraints + * @return policyConstraint + */ + @Valid + @Schema(name = "policyConstraint", description = "Reference to manage a list of feature specification policy constraints", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("policyConstraint") + public List<PolicyRefFVO> getPolicyConstraint() { + return policyConstraint; + } + + public void setPolicyConstraint(List<PolicyRefFVO> policyConstraint) { + this.policyConstraint = policyConstraint; + } + + public FeatureFVO isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + * True if this feature is enabled. Default is true. + * @return isEnabled + */ + + @Schema(name = "isEnabled", description = "True if this feature is enabled. Default is true.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("isEnabled") + public Boolean getIsEnabled() { + return isEnabled; + } + + public void setIsEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + } + + public FeatureFVO name(String name) { + this.name = name; + return this; + } + + /** + * This is the name for the feature. + * @return name + */ + + @Schema(name = "name", description = "This is the name for the feature.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeatureFVO featureFVO = (FeatureFVO) o; + return Objects.equals(this.type, featureFVO.type) && + Objects.equals(this.baseType, featureFVO.baseType) && + Objects.equals(this.schemaLocation, featureFVO.schemaLocation) && + Objects.equals(this.isBundle, featureFVO.isBundle) && + Objects.equals(this.featureRelationship, featureFVO.featureRelationship) && + Objects.equals(this.featureCharacteristic, featureFVO.featureCharacteristic) && + Objects.equals(this.policyConstraint, featureFVO.policyConstraint) && + Objects.equals(this.isEnabled, featureFVO.isEnabled) && + Objects.equals(this.name, featureFVO.name); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, isBundle, featureRelationship, featureCharacteristic, policyConstraint, isEnabled, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeatureFVO {\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(" isBundle: ").append(toIndentedString(isBundle)).append("\n"); + sb.append(" featureRelationship: ").append(toIndentedString(featureRelationship)).append("\n"); + sb.append(" featureCharacteristic: ").append(toIndentedString(featureCharacteristic)).append("\n"); + sb.append(" policyConstraint: ").append(toIndentedString(policyConstraint)).append("\n"); + sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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/pm628/model/FeatureMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/FeatureMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..91dd2e5df985ecacf979932e02b03b7d75fb45cf --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/FeatureMVO.java @@ -0,0 +1,345 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * FeatureMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class FeatureMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("isBundle") + private Boolean isBundle; + + @JsonProperty("featureRelationship") + @Valid + private List<FeatureRelationshipMVO> featureRelationship = new ArrayList<>(); + + @JsonProperty("featureCharacteristic") + @Valid + private List<CharacteristicMVO> featureCharacteristic = new ArrayList<>(); + + @JsonProperty("policyConstraint") + @Valid + private List<PolicyRefMVO> policyConstraint = new ArrayList<>(); + + @JsonProperty("isEnabled") + private Boolean isEnabled; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + public FeatureMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FeatureMVO(String type, String name) { + this.type = type; + this.name = name; + } + + public FeatureMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public FeatureMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public FeatureMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public FeatureMVO isBundle(Boolean isBundle) { + this.isBundle = isBundle; + return this; + } + + /** + * True if this is a feature group. Default is false. + * @return isBundle + */ + + @Schema(name = "isBundle", description = "True if this is a feature group. Default is false.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("isBundle") + public Boolean getIsBundle() { + return isBundle; + } + + public void setIsBundle(Boolean isBundle) { + this.isBundle = isBundle; + } + + public FeatureMVO featureRelationship(List<FeatureRelationshipMVO> featureRelationship) { + this.featureRelationship = featureRelationship; + return this; + } + + public FeatureMVO addFeatureRelationshipItem(FeatureRelationshipMVO featureRelationshipItem) { + if (this.featureRelationship == null) { + this.featureRelationship = new ArrayList<>(); + } + this.featureRelationship.add(featureRelationshipItem); + return this; + } + + /** + * Collection of feature relationships + * @return featureRelationship + */ + @Valid + @Schema(name = "featureRelationship", description = "Collection of feature relationships", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("featureRelationship") + public List<FeatureRelationshipMVO> getFeatureRelationship() { + return featureRelationship; + } + + public void setFeatureRelationship(List<FeatureRelationshipMVO> featureRelationship) { + this.featureRelationship = featureRelationship; + } + + public FeatureMVO featureCharacteristic(List<CharacteristicMVO> featureCharacteristic) { + this.featureCharacteristic = featureCharacteristic; + return this; + } + + public FeatureMVO addFeatureCharacteristicItem(CharacteristicMVO featureCharacteristicItem) { + if (this.featureCharacteristic == null) { + this.featureCharacteristic = new ArrayList<>(); + } + this.featureCharacteristic.add(featureCharacteristicItem); + return this; + } + + /** + * This is a list of Characteristics for a particular feature. + * @return featureCharacteristic + */ + @Valid + @Schema(name = "featureCharacteristic", description = "This is a list of Characteristics for a particular feature.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("featureCharacteristic") + public List<CharacteristicMVO> getFeatureCharacteristic() { + return featureCharacteristic; + } + + public void setFeatureCharacteristic(List<CharacteristicMVO> featureCharacteristic) { + this.featureCharacteristic = featureCharacteristic; + } + + public FeatureMVO policyConstraint(List<PolicyRefMVO> policyConstraint) { + this.policyConstraint = policyConstraint; + return this; + } + + public FeatureMVO addPolicyConstraintItem(PolicyRefMVO policyConstraintItem) { + if (this.policyConstraint == null) { + this.policyConstraint = new ArrayList<>(); + } + this.policyConstraint.add(policyConstraintItem); + return this; + } + + /** + * Reference to manage a list of feature specification policy constraints + * @return policyConstraint + */ + @Valid + @Schema(name = "policyConstraint", description = "Reference to manage a list of feature specification policy constraints", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("policyConstraint") + public List<PolicyRefMVO> getPolicyConstraint() { + return policyConstraint; + } + + public void setPolicyConstraint(List<PolicyRefMVO> policyConstraint) { + this.policyConstraint = policyConstraint; + } + + public FeatureMVO isEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + return this; + } + + /** + * True if this feature is enabled. Default is true. + * @return isEnabled + */ + + @Schema(name = "isEnabled", description = "True if this feature is enabled. Default is true.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("isEnabled") + public Boolean getIsEnabled() { + return isEnabled; + } + + public void setIsEnabled(Boolean isEnabled) { + this.isEnabled = isEnabled; + } + + public FeatureMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public FeatureMVO name(String name) { + this.name = name; + return this; + } + + /** + * This is the name for the feature. + * @return name + */ + @NotNull + @Schema(name = "name", description = "This is the name for the feature.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeatureMVO featureMVO = (FeatureMVO) o; + return Objects.equals(this.type, featureMVO.type) && + Objects.equals(this.baseType, featureMVO.baseType) && + Objects.equals(this.schemaLocation, featureMVO.schemaLocation) && + Objects.equals(this.isBundle, featureMVO.isBundle) && + Objects.equals(this.featureRelationship, featureMVO.featureRelationship) && + Objects.equals(this.featureCharacteristic, featureMVO.featureCharacteristic) && + Objects.equals(this.policyConstraint, featureMVO.policyConstraint) && + Objects.equals(this.isEnabled, featureMVO.isEnabled) && + Objects.equals(this.uuid, featureMVO.uuid) && + Objects.equals(this.name, featureMVO.name); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, isBundle, featureRelationship, featureCharacteristic, policyConstraint, isEnabled, uuid, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeatureMVO {\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(" isBundle: ").append(toIndentedString(isBundle)).append("\n"); + sb.append(" featureRelationship: ").append(toIndentedString(featureRelationship)).append("\n"); + sb.append(" featureCharacteristic: ").append(toIndentedString(featureCharacteristic)).append("\n"); + sb.append(" policyConstraint: ").append(toIndentedString(policyConstraint)).append("\n"); + sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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/pm628/model/FeatureRelationshipFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/FeatureRelationshipFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..d218d13da835bce3fd8236e5988f45c28e8fda53 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/FeatureRelationshipFVO.java @@ -0,0 +1,334 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.common.model.TimePeriod; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * FeatureRelationshipFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class FeatureRelationshipFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + /** + * This is the type of the feature relationship. + */ + public enum RelationshipTypeEnum { + EXCLUDED("excluded"), + + INCLUDES("includes"), + + MAY_INCLUDE("may include"), + + REQUIRES("requires"); + + private String value; + + RelationshipTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RelationshipTypeEnum fromValue(String value) { + for (RelationshipTypeEnum b : RelationshipTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("relationshipType") + private RelationshipTypeEnum relationshipType; + + @JsonProperty("validFor") + private TimePeriod validFor; + + public FeatureRelationshipFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FeatureRelationshipFVO(String type, String id, RelationshipTypeEnum relationshipType) { + this.type = type; + this.id = id; + this.relationshipType = relationshipType; + } + + public FeatureRelationshipFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public FeatureRelationshipFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public FeatureRelationshipFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public FeatureRelationshipFVO 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 FeatureRelationshipFVO id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + @NotNull + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public FeatureRelationshipFVO name(String name) { + this.name = name; + return this; + } + + /** + * This is the name of the target feature. + * @return name + */ + + @Schema(name = "name", description = "This is the name of the target feature.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public FeatureRelationshipFVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public FeatureRelationshipFVO relationshipType(RelationshipTypeEnum relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + /** + * This is the type of the feature relationship. + * @return relationshipType + */ + @NotNull + @Schema(name = "relationshipType", description = "This is the type of the feature relationship.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("relationshipType") + public RelationshipTypeEnum getRelationshipType() { + return relationshipType; + } + + public void setRelationshipType(RelationshipTypeEnum relationshipType) { + this.relationshipType = relationshipType; + } + + public FeatureRelationshipFVO 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; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeatureRelationshipFVO featureRelationshipFVO = (FeatureRelationshipFVO) o; + return Objects.equals(this.type, featureRelationshipFVO.type) && + Objects.equals(this.baseType, featureRelationshipFVO.baseType) && + Objects.equals(this.schemaLocation, featureRelationshipFVO.schemaLocation) && + Objects.equals(this.href, featureRelationshipFVO.href) && + Objects.equals(this.id, featureRelationshipFVO.id) && + Objects.equals(this.name, featureRelationshipFVO.name) && + Objects.equals(this.referredType, featureRelationshipFVO.referredType) && + Objects.equals(this.relationshipType, featureRelationshipFVO.relationshipType) && + Objects.equals(this.validFor, featureRelationshipFVO.validFor); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, name, referredType, relationshipType, validFor); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeatureRelationshipFVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" relationshipType: ").append(toIndentedString(relationshipType)).append("\n"); + sb.append(" validFor: ").append(toIndentedString(validFor)).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/pm628/model/FeatureRelationshipMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/FeatureRelationshipMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..ba40a7242b69254f446141eb12eea2e2dec40c22 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/FeatureRelationshipMVO.java @@ -0,0 +1,334 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.common.model.TimePeriod; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * FeatureRelationshipMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class FeatureRelationshipMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + /** + * This is the type of the feature relationship. + */ + public enum RelationshipTypeEnum { + EXCLUDED("excluded"), + + INCLUDES("includes"), + + MAY_INCLUDE("may include"), + + REQUIRES("requires"); + + private String value; + + RelationshipTypeEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static RelationshipTypeEnum fromValue(String value) { + for (RelationshipTypeEnum b : RelationshipTypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + @JsonProperty("relationshipType") + private RelationshipTypeEnum relationshipType; + + @JsonProperty("validFor") + private TimePeriod validFor; + + public FeatureRelationshipMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FeatureRelationshipMVO(String type, String id, RelationshipTypeEnum relationshipType) { + this.type = type; + this.id = id; + this.relationshipType = relationshipType; + } + + public FeatureRelationshipMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public FeatureRelationshipMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public FeatureRelationshipMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public FeatureRelationshipMVO 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 FeatureRelationshipMVO id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the referred entity. + * @return id + */ + @NotNull + @Schema(name = "id", description = "The identifier of the referred entity.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public FeatureRelationshipMVO name(String name) { + this.name = name; + return this; + } + + /** + * This is the name of the target feature. + * @return name + */ + + @Schema(name = "name", description = "This is the name of the target feature.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public FeatureRelationshipMVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public FeatureRelationshipMVO relationshipType(RelationshipTypeEnum relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + /** + * This is the type of the feature relationship. + * @return relationshipType + */ + @NotNull + @Schema(name = "relationshipType", description = "This is the type of the feature relationship.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("relationshipType") + public RelationshipTypeEnum getRelationshipType() { + return relationshipType; + } + + public void setRelationshipType(RelationshipTypeEnum relationshipType) { + this.relationshipType = relationshipType; + } + + public FeatureRelationshipMVO 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; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FeatureRelationshipMVO featureRelationshipMVO = (FeatureRelationshipMVO) o; + return Objects.equals(this.type, featureRelationshipMVO.type) && + Objects.equals(this.baseType, featureRelationshipMVO.baseType) && + Objects.equals(this.schemaLocation, featureRelationshipMVO.schemaLocation) && + Objects.equals(this.href, featureRelationshipMVO.href) && + Objects.equals(this.id, featureRelationshipMVO.id) && + Objects.equals(this.name, featureRelationshipMVO.name) && + Objects.equals(this.referredType, featureRelationshipMVO.referredType) && + Objects.equals(this.relationshipType, featureRelationshipMVO.relationshipType) && + Objects.equals(this.validFor, featureRelationshipMVO.validFor); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, name, referredType, relationshipType, validFor); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FeatureRelationshipMVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" relationshipType: ").append(toIndentedString(relationshipType)).append("\n"); + sb.append(" validFor: ").append(toIndentedString(validFor)).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/pm628/model/FileTransferData.java b/src/main/java/org/etsi/osl/tmf/pm628/model/FileTransferData.java new file mode 100644 index 0000000000000000000000000000000000000000..b5cc6a907b6bc52c829118e5a1fe5b66a546c3aa --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/FileTransferData.java @@ -0,0 +1,284 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.persistence.Embedded; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.net.URI; +import java.util.Objects; + +/** + * FileTransferData + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Embeddable +public class FileTransferData extends ProtocolTransferData { + + @JsonProperty("@type") + @Column(name = "ftd_type") + private String type; + + @JsonProperty("@baseType") + @Column(name = "ftd_base_type") + private String baseType; + + @JsonProperty("@schemaLocation") + @Column(name = "ftd_schema_location") + private String schemaLocation; + + @JsonProperty("fileLocation") + private URI fileLocation; + + @JsonProperty("fileFormat") + private String fileFormat; + + @JsonProperty("compressionType") + @Embedded + private CompressionType compressionType; + + @JsonProperty("retentionPeriod") + @Embedded + private Duration retentionPeriod; + + @JsonProperty("packingType") + @Embedded + private PackingType packingType; + + public FileTransferData() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FileTransferData(String type) { + super(); + this.type = type; + } + + public FileTransferData type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public FileTransferData baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public FileTransferData schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public FileTransferData fileLocation(URI fileLocation) { + this.fileLocation = fileLocation; + return this; + } + + /** + * Get fileLocation + * @return fileLocation + */ + @Valid + @Schema(name = "fileLocation", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("fileLocation") + public URI getFileLocation() { + return fileLocation; + } + + public void setFileLocation(URI fileLocation) { + this.fileLocation = fileLocation; + } + + public FileTransferData fileFormat(String fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Get fileFormat + * @return fileFormat + */ + + @Schema(name = "fileFormat", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("fileFormat") + public String getFileFormat() { + return fileFormat; + } + + public void setFileFormat(String fileFormat) { + this.fileFormat = fileFormat; + } + + public FileTransferData compressionType(CompressionType compressionType) { + this.compressionType = compressionType; + return this; + } + + /** + * Get compressionType + * @return compressionType + */ + @Valid + @Schema(name = "compressionType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("compressionType") + public CompressionType getCompressionType() { + return compressionType; + } + + public void setCompressionType(CompressionType compressionType) { + this.compressionType = compressionType; + } + + public FileTransferData retentionPeriod(Duration retentionPeriod) { + this.retentionPeriod = retentionPeriod; + return this; + } + + /** + * Get retentionPeriod + * @return retentionPeriod + */ + @Valid + @Schema(name = "retentionPeriod", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("retentionPeriod") + public Duration getRetentionPeriod() { + return retentionPeriod; + } + + public void setRetentionPeriod(Duration retentionPeriod) { + this.retentionPeriod = retentionPeriod; + } + + public FileTransferData packingType(PackingType packingType) { + this.packingType = packingType; + return this; + } + + /** + * Get packingType + * @return packingType + */ + @Valid + @Schema(name = "packingType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("packingType") + public PackingType getPackingType() { + return packingType; + } + + public void setPackingType(PackingType packingType) { + this.packingType = packingType; + } + + + public FileTransferData transportProtocol(String transportProtocol) { + super.transportProtocol(transportProtocol); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileTransferData fileTransferData = (FileTransferData) o; + return Objects.equals(this.type, fileTransferData.type) && + Objects.equals(this.baseType, fileTransferData.baseType) && + Objects.equals(this.schemaLocation, fileTransferData.schemaLocation) && + Objects.equals(this.fileLocation, fileTransferData.fileLocation) && + Objects.equals(this.fileFormat, fileTransferData.fileFormat) && + Objects.equals(this.compressionType, fileTransferData.compressionType) && + Objects.equals(this.retentionPeriod, fileTransferData.retentionPeriod) && + Objects.equals(this.packingType, fileTransferData.packingType) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, fileLocation, fileFormat, compressionType, retentionPeriod, packingType, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileTransferData {\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(" fileLocation: ").append(toIndentedString(fileLocation)).append("\n"); + sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); + sb.append(" compressionType: ").append(toIndentedString(compressionType)).append("\n"); + sb.append(" retentionPeriod: ").append(toIndentedString(retentionPeriod)).append("\n"); + sb.append(" packingType: ").append(toIndentedString(packingType)).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/pm628/model/FileTransferDataFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/FileTransferDataFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..584093ece2a5ea0478f05f93db39e7a3664ed92f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/FileTransferDataFVO.java @@ -0,0 +1,274 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.net.URI; +import java.util.Objects; + +/** + * FileTransferDataFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class FileTransferDataFVO extends ProtocolTransferDataFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("fileLocation") + private URI fileLocation; + + @JsonProperty("fileFormat") + private String fileFormat; + + @JsonProperty("compressionType") + private CompressionType compressionType; + + @JsonProperty("retentionPeriod") + private Duration retentionPeriod; + + @JsonProperty("packingType") + private PackingType packingType; + + public FileTransferDataFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FileTransferDataFVO(String type) { + super(); + this.type = type; + } + + public FileTransferDataFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public FileTransferDataFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public FileTransferDataFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public FileTransferDataFVO fileLocation(URI fileLocation) { + this.fileLocation = fileLocation; + return this; + } + + /** + * Get fileLocation + * @return fileLocation + */ + @Valid + @Schema(name = "fileLocation", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("fileLocation") + public URI getFileLocation() { + return fileLocation; + } + + public void setFileLocation(URI fileLocation) { + this.fileLocation = fileLocation; + } + + public FileTransferDataFVO fileFormat(String fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Get fileFormat + * @return fileFormat + */ + + @Schema(name = "fileFormat", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("fileFormat") + public String getFileFormat() { + return fileFormat; + } + + public void setFileFormat(String fileFormat) { + this.fileFormat = fileFormat; + } + + public FileTransferDataFVO compressionType(CompressionType compressionType) { + this.compressionType = compressionType; + return this; + } + + /** + * Get compressionType + * @return compressionType + */ + @Valid + @Schema(name = "compressionType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("compressionType") + public CompressionType getCompressionType() { + return compressionType; + } + + public void setCompressionType(CompressionType compressionType) { + this.compressionType = compressionType; + } + + public FileTransferDataFVO retentionPeriod(Duration retentionPeriod) { + this.retentionPeriod = retentionPeriod; + return this; + } + + /** + * Get retentionPeriod + * @return retentionPeriod + */ + @Valid + @Schema(name = "retentionPeriod", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("retentionPeriod") + public Duration getRetentionPeriod() { + return retentionPeriod; + } + + public void setRetentionPeriod(Duration retentionPeriod) { + this.retentionPeriod = retentionPeriod; + } + + public FileTransferDataFVO packingType(PackingType packingType) { + this.packingType = packingType; + return this; + } + + /** + * Get packingType + * @return packingType + */ + @Valid + @Schema(name = "packingType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("packingType") + public PackingType getPackingType() { + return packingType; + } + + public void setPackingType(PackingType packingType) { + this.packingType = packingType; + } + + + public FileTransferDataFVO transportProtocol(String transportProtocol) { + super.transportProtocol(transportProtocol); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileTransferDataFVO fileTransferDataFVO = (FileTransferDataFVO) o; + return Objects.equals(this.type, fileTransferDataFVO.type) && + Objects.equals(this.baseType, fileTransferDataFVO.baseType) && + Objects.equals(this.schemaLocation, fileTransferDataFVO.schemaLocation) && + Objects.equals(this.fileLocation, fileTransferDataFVO.fileLocation) && + Objects.equals(this.fileFormat, fileTransferDataFVO.fileFormat) && + Objects.equals(this.compressionType, fileTransferDataFVO.compressionType) && + Objects.equals(this.retentionPeriod, fileTransferDataFVO.retentionPeriod) && + Objects.equals(this.packingType, fileTransferDataFVO.packingType) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, fileLocation, fileFormat, compressionType, retentionPeriod, packingType, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileTransferDataFVO {\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(" fileLocation: ").append(toIndentedString(fileLocation)).append("\n"); + sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); + sb.append(" compressionType: ").append(toIndentedString(compressionType)).append("\n"); + sb.append(" retentionPeriod: ").append(toIndentedString(retentionPeriod)).append("\n"); + sb.append(" packingType: ").append(toIndentedString(packingType)).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/pm628/model/FileTransferDataMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/FileTransferDataMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..045e75bfe40e943efcff4c545b6a561781c12c2d --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/FileTransferDataMVO.java @@ -0,0 +1,274 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.net.URI; +import java.util.Objects; + +/** + * FileTransferDataMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class FileTransferDataMVO extends ProtocolTransferData { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("fileLocation") + private URI fileLocation; + + @JsonProperty("fileFormat") + private String fileFormat; + + @JsonProperty("compressionType") + private CompressionType compressionType; + + @JsonProperty("retentionPeriod") + private Duration retentionPeriod; + + @JsonProperty("packingType") + private PackingType packingType; + + public FileTransferDataMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public FileTransferDataMVO(String type) { + super(); + this.type = type; + } + + public FileTransferDataMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public FileTransferDataMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public FileTransferDataMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public FileTransferDataMVO fileLocation(URI fileLocation) { + this.fileLocation = fileLocation; + return this; + } + + /** + * Get fileLocation + * @return fileLocation + */ + @Valid + @Schema(name = "fileLocation", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("fileLocation") + public URI getFileLocation() { + return fileLocation; + } + + public void setFileLocation(URI fileLocation) { + this.fileLocation = fileLocation; + } + + public FileTransferDataMVO fileFormat(String fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Get fileFormat + * @return fileFormat + */ + + @Schema(name = "fileFormat", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("fileFormat") + public String getFileFormat() { + return fileFormat; + } + + public void setFileFormat(String fileFormat) { + this.fileFormat = fileFormat; + } + + public FileTransferDataMVO compressionType(CompressionType compressionType) { + this.compressionType = compressionType; + return this; + } + + /** + * Get compressionType + * @return compressionType + */ + @Valid + @Schema(name = "compressionType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("compressionType") + public CompressionType getCompressionType() { + return compressionType; + } + + public void setCompressionType(CompressionType compressionType) { + this.compressionType = compressionType; + } + + public FileTransferDataMVO retentionPeriod(Duration retentionPeriod) { + this.retentionPeriod = retentionPeriod; + return this; + } + + /** + * Get retentionPeriod + * @return retentionPeriod + */ + @Valid + @Schema(name = "retentionPeriod", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("retentionPeriod") + public Duration getRetentionPeriod() { + return retentionPeriod; + } + + public void setRetentionPeriod(Duration retentionPeriod) { + this.retentionPeriod = retentionPeriod; + } + + public FileTransferDataMVO packingType(PackingType packingType) { + this.packingType = packingType; + return this; + } + + /** + * Get packingType + * @return packingType + */ + @Valid + @Schema(name = "packingType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("packingType") + public PackingType getPackingType() { + return packingType; + } + + public void setPackingType(PackingType packingType) { + this.packingType = packingType; + } + + + public FileTransferDataMVO transportProtocol(String transportProtocol) { + super.transportProtocol(transportProtocol); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileTransferDataMVO fileTransferDataMVO = (FileTransferDataMVO) o; + return Objects.equals(this.type, fileTransferDataMVO.type) && + Objects.equals(this.baseType, fileTransferDataMVO.baseType) && + Objects.equals(this.schemaLocation, fileTransferDataMVO.schemaLocation) && + Objects.equals(this.fileLocation, fileTransferDataMVO.fileLocation) && + Objects.equals(this.fileFormat, fileTransferDataMVO.fileFormat) && + Objects.equals(this.compressionType, fileTransferDataMVO.compressionType) && + Objects.equals(this.retentionPeriod, fileTransferDataMVO.retentionPeriod) && + Objects.equals(this.packingType, fileTransferDataMVO.packingType) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, fileLocation, fileFormat, compressionType, retentionPeriod, packingType, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileTransferDataMVO {\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(" fileLocation: ").append(toIndentedString(fileLocation)).append("\n"); + sb.append(" fileFormat: ").append(toIndentedString(fileFormat)).append("\n"); + sb.append(" compressionType: ").append(toIndentedString(compressionType)).append("\n"); + sb.append(" retentionPeriod: ").append(toIndentedString(retentionPeriod)).append("\n"); + sb.append(" packingType: ").append(toIndentedString(packingType)).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/pm628/model/Granularity.java b/src/main/java/org/etsi/osl/tmf/pm628/model/Granularity.java new file mode 100644 index 0000000000000000000000000000000000000000..5922ba0d2392b765a62b8d588f9b01abf66355e4 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/Granularity.java @@ -0,0 +1,85 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import javax.annotation.Generated; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Sampling rate of the collection or production of performance indicators. + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public enum Granularity { + + G_1MN("g_1mn"), + + G_5MN("g_5mn"), + + G_15MN("g_15mn"), + + G_30MN("g_30mn"), + + G_1H("g_1h"), + + G_24H("g_24h"), + + G_1M("g_1m"), + + G_1Y("g_1y"), + + NA("na"), + + // Bellow values are an extension to the spec in order to offer finer granularity for Performance Measurement + + G_10SEC("g_10sec"), + + G_30SEC("g_30sec"); + + private String value; + + Granularity(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static Granularity fromValue(String value) { + for (Granularity b : Granularity.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static boolean contains(String value) { + try { + Granularity.valueOf(value.toUpperCase()); + return true; + } catch (IllegalArgumentException e) { + return false; + } + } + + public static String getPossibleValues() { + StringBuilder values = new StringBuilder(); + for (Granularity granularity : Granularity.values()) { + values.append(granularity.name()).append(" "); + } + return values.toString().trim(); + } + +} + diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/Hub.java b/src/main/java/org/etsi/osl/tmf/pm628/model/Hub.java new file mode 100644 index 0000000000000000000000000000000000000000..c6fb880b493d513e21f797e6e67c881126edafd8 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/Hub.java @@ -0,0 +1,233 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * Sets the communication endpoint address the service instance must use to deliver notification information + */ + +@Schema(name = "Hub", description = "Sets the communication endpoint address the service instance must use to deliver notification information") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class Hub { + + private String atType; + + private String atBaseType; + + private String atSchemaLocation; + + private String href; + + private String id; + + private String callback; + + private String query; + + public Hub() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Hub(String atType, String callback) { + this.atType = atType; + this.callback = callback; + } + + public Hub 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) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public Hub 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 Hub 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 Hub 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 Hub id(String id) { + this.id = id; + return this; + } + + /** + * Id of the listener + * @return id + */ + + @Schema(name = "id", description = "Id of the listener", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Hub 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) + @JsonProperty("callback") + public String getCallback() { + return callback; + } + + public void setCallback(String callback) { + this.callback = callback; + } + + public Hub 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) + @JsonProperty("query") + 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; + } + Hub hub = (Hub) o; + return Objects.equals(this.atType, hub.atType) && + Objects.equals(this.atBaseType, hub.atBaseType) && + Objects.equals(this.atSchemaLocation, hub.atSchemaLocation) && + Objects.equals(this.href, hub.href) && + Objects.equals(this.id, hub.id) && + Objects.equals(this.callback, hub.callback) && + Objects.equals(this.query, hub.query); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation, href, id, callback, query); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Hub {\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(" href: ").append(toIndentedString(href)).append("\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/pm628/model/HubFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/HubFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..095d800c1b29108ad03c8a1c199a149031564437 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/HubFVO.java @@ -0,0 +1,187 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeName; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * Sets the communication endpoint address the service instance must use to deliver notification information + */ + +@Schema(name = "Hub_FVO", description = "Sets the communication endpoint address the service instance must use to deliver notification information") +@JsonTypeName("Hub_FVO") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class HubFVO { + + private String atType; + + private String atBaseType; + + private String atSchemaLocation; + + private String callback; + + private String query; + + public HubFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public HubFVO(String atType, String callback) { + this.atType = atType; + this.callback = callback; + } + + public HubFVO 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) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public HubFVO 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 HubFVO 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 HubFVO 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) + @JsonProperty("callback") + public String getCallback() { + return callback; + } + + public void setCallback(String callback) { + this.callback = callback; + } + + public HubFVO 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) + @JsonProperty("query") + 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; + } + HubFVO hubFVO = (HubFVO) o; + return Objects.equals(this.atType, hubFVO.atType) && + Objects.equals(this.atBaseType, hubFVO.atBaseType) && + Objects.equals(this.atSchemaLocation, hubFVO.atSchemaLocation) && + Objects.equals(this.callback, hubFVO.callback) && + Objects.equals(this.query, hubFVO.query); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation, callback, query); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HubFVO {\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(" 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/pm628/model/IndicatorType.java b/src/main/java/org/etsi/osl/tmf/pm628/model/IndicatorType.java new file mode 100644 index 0000000000000000000000000000000000000000..c62d49db87893ff188b472bea703fa679159ed6d --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/IndicatorType.java @@ -0,0 +1,49 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import javax.annotation.Generated; + +/** + * This is enumeration for Indicator Type + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public enum IndicatorType { + + STRING("string"), + + INT("int"), + + FLOAT("float"), + + DOUBLE("double"); + + private String value; + + IndicatorType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static IndicatorType fromValue(String value) { + for (IndicatorType b : IndicatorType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/IntentRef.java b/src/main/java/org/etsi/osl/tmf/pm628/model/IntentRef.java new file mode 100644 index 0000000000000000000000000000000000000000..96950052e94fb0d0abdcbe92c89bacbf92557700 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/IntentRef.java @@ -0,0 +1,251 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * Intent reference, for when Intent is used by other entities + */ + +@Schema(name = "IntentRef", description = "Intent reference, for when Intent is used by other entities") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Embeddable +public class IntentRef { + + @JsonProperty("@type") + @Column(name = "ir_type") + protected String type; + + @JsonProperty("@baseType") + @Column(name = "ir_base_type") + protected String baseType; + + @JsonProperty("@schemaLocation") + @Column(name = "ir_schema_location") + protected String schemaLocation; + + @JsonProperty("href") + @Column(name = "ir_href") + protected String href; + + @JsonProperty("id") + @Column(name = "ir_id") + protected String id; + + @JsonProperty("name") + @Column(name = "ir_name") + protected String name; + + @JsonProperty("@referredType") + @Column(name = "ir_referred_type") + private String referredType; + + public IntentRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public IntentRef(String type, String id) { + this.type = type; + this.id = id; + } + + public IntentRef type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public IntentRef baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public IntentRef schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public IntentRef href(String href) { + this.href = href; + return this; + } + + /** + * The URI of the referred entity. + * @return href + */ + + @Schema(name = "href", description = "The URI of the referred entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("href") + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public IntentRef id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the referred entity. + * @return id + */ + @NotNull + @Schema(name = "id", description = "The identifier of the referred entity.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public IntentRef 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public IntentRef referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntentRef intentRef = (IntentRef) o; + return Objects.equals(this.type, intentRef.type) && + Objects.equals(this.baseType, intentRef.baseType) && + Objects.equals(this.schemaLocation, intentRef.schemaLocation) && + Objects.equals(this.href, intentRef.href) && + Objects.equals(this.id, intentRef.id) && + Objects.equals(this.name, intentRef.name) && + Objects.equals(this.referredType, intentRef.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, name, referredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntentRef {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).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/pm628/model/IntentRefFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/IntentRefFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..da9f4a57d44b04be2f6191f508058985b5b7b86e --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/IntentRefFVO.java @@ -0,0 +1,240 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * Intent reference, for when Intent is used by other entities + */ + +@Schema(name = "IntentRef_FVO", description = "Intent reference, for when Intent is used by other entities") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class IntentRefFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + public IntentRefFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public IntentRefFVO(String type) { + this.type = type; + } + + public IntentRefFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public IntentRefFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public IntentRefFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public IntentRefFVO 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 IntentRefFVO id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public IntentRefFVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public IntentRefFVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntentRefFVO intentRefFVO = (IntentRefFVO) o; + return Objects.equals(this.type, intentRefFVO.type) && + Objects.equals(this.baseType, intentRefFVO.baseType) && + Objects.equals(this.schemaLocation, intentRefFVO.schemaLocation) && + Objects.equals(this.href, intentRefFVO.href) && + Objects.equals(this.id, intentRefFVO.id) && + Objects.equals(this.name, intentRefFVO.name) && + Objects.equals(this.referredType, intentRefFVO.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, name, referredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntentRefFVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).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/pm628/model/IntentRefMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/IntentRefMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..37c224da2bcbf0ae86f16054dd3abb93fa2df664 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/IntentRefMVO.java @@ -0,0 +1,240 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * Intent reference, for when Intent is used by other entities + */ + +@Schema(name = "IntentRef_MVO", description = "Intent reference, for when Intent is used by other entities") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class IntentRefMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + public IntentRefMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public IntentRefMVO(String type) { + this.type = type; + } + + public IntentRefMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public IntentRefMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public IntentRefMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public IntentRefMVO 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 IntentRefMVO id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the referred entity. + * @return id + */ + + @Schema(name = "id", description = "The identifier of the referred entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public IntentRefMVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public IntentRefMVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntentRefMVO intentRefMVO = (IntentRefMVO) o; + return Objects.equals(this.type, intentRefMVO.type) && + Objects.equals(this.baseType, intentRefMVO.baseType) && + Objects.equals(this.schemaLocation, intentRefMVO.schemaLocation) && + Objects.equals(this.href, intentRefMVO.href) && + Objects.equals(this.id, intentRefMVO.id) && + Objects.equals(this.name, intentRefMVO.name) && + Objects.equals(this.referredType, intentRefMVO.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, name, referredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntentRefMVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).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/pm628/model/JsonPatch.java b/src/main/java/org/etsi/osl/tmf/pm628/model/JsonPatch.java new file mode 100644 index 0000000000000000000000000000000000000000..978f05d60cbdd723ce8ea40d369d541f1711ca08 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/JsonPatch.java @@ -0,0 +1,218 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import org.openapitools.jackson.nullable.JsonNullable; + +import javax.annotation.Generated; +import java.util.Arrays; +import java.util.Objects; + +/** + * A JSONPatch document as defined by RFC 6902 + */ + +@Schema(name = "JsonPatch", description = "A JSONPatch document as defined by RFC 6902") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[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 + "'"); + } + } + + private OpEnum op; + + private String path; + + private JsonNullable<Object> value = JsonNullable.<Object>undefined(); + + 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) + @JsonProperty("op") + 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) + @JsonProperty("path") + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public JsonPatch value(Object value) { + this.value = JsonNullable.of(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) + @JsonProperty("value") + public JsonNullable<Object> getValue() { + return value; + } + + public void setValue(JsonNullable<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) + @JsonProperty("from") + 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) && + equalsNullable(this.value, jsonPatch.value) && + Objects.equals(this.from, jsonPatch.from); + } + + private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(op, path, hashCodeNullable(value), from); + } + + private static <T> int hashCodeNullable(JsonNullable<T> a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @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 "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/LogicalResource.java b/src/main/java/org/etsi/osl/tmf/pm628/model/LogicalResource.java new file mode 100644 index 0000000000000000000000000000000000000000..a3340ce8ebde2c508afb86fb970135ece194fb83 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/LogicalResource.java @@ -0,0 +1,103 @@ +package org.etsi.osl.tmf.pm628.model; + +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.Entity; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * LogicalResource + */ + +@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 = DataAccessEndpoint.class, name = "DataAccessEndpoint") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_LogResource") +public class LogicalResource extends Resource { + + @JsonProperty("value") + private String value; + + public LogicalResource() { + super(); + } + + /** + * Constructor with only required parameters + */ + public LogicalResource(String atType) { + super(atType); + } + + public LogicalResource value(String value) { + this.value = value; + return this; + } + + /** + * the value of the logical resource. E.g '0746712345' for MSISDN's + * @return value + */ + + @Schema(name = "value", description = "the value of the logical resource. E.g '0746712345' for MSISDN's", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("value") + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LogicalResource logicalResource = (LogicalResource) o; + return Objects.equals(this.value, logicalResource.value) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(value, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LogicalResource {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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/pm628/model/LogicalResourceFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/LogicalResourceFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..95eecfdb7d6ee0b9f63d719b4d6aa385478229d8 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/LogicalResourceFVO.java @@ -0,0 +1,287 @@ +package org.etsi.osl.tmf.pm628.model; + +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 org.etsi.osl.tmf.common.model.TimePeriod; +import org.etsi.osl.tmf.ri639.model.ResourceAdministrativeStateType; +import org.etsi.osl.tmf.ri639.model.ResourceOperationalStateType; +import org.etsi.osl.tmf.ri639.model.ResourceUsageStateType; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Objects; + +/** + * LogicalResourceFVO + */ + +@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 = DataAccessEndpointFVO.class, name = "DataAccessEndpoint") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class LogicalResourceFVO extends ResourceFVO { + + @JsonProperty("value") + private String value; + + public LogicalResourceFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public LogicalResourceFVO(String atType) { + super(atType); + } + + public LogicalResourceFVO value(String value) { + this.value = value; + return this; + } + + /** + * the value of the logical resource. E.g '0746712345' for MSISDN's + * @return value + */ + + @Schema(name = "value", description = "the value of the logical resource. E.g '0746712345' for MSISDN's", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("value") + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + + public LogicalResourceFVO type(String type) { + super.type(type); + return this; + } + + public LogicalResourceFVO baseType(String baseType) { + super.baseType(baseType); + return this; + } + + public LogicalResourceFVO schemaLocation(String schemaLocation) { + super.schemaLocation(schemaLocation); + return this; + } + + public LogicalResourceFVO href(String href) { + super.href(href); + return this; + } + + public LogicalResourceFVO uuid(String uuid) { + super.uuid(uuid); + return this; + } + + public LogicalResourceFVO category(String category) { + super.category(category); + return this; + } + + public LogicalResourceFVO description(String description) { + super.description(description); + return this; + } + + public LogicalResourceFVO name(String name) { + super.name(name); + return this; + } + + public LogicalResourceFVO endOperatingDate(OffsetDateTime endOperatingDate) { + super.endOperatingDate(endOperatingDate); + return this; + } + + public LogicalResourceFVO administrativeState(ResourceAdministrativeStateType administrativeState) { + super.administrativeState(administrativeState); + return this; + } + + public LogicalResourceFVO operationalState(ResourceOperationalStateType operationalState) { + super.operationalState(operationalState); + return this; + } + + public LogicalResourceFVO resourceStatus(ResourceStatusType resourceStatus) { + super.resourceStatus(resourceStatus); + return this; + } + + public LogicalResourceFVO usageState(ResourceUsageStateType usageState) { + super.usageState(usageState); + return this; + } + + public LogicalResourceFVO validFor(TimePeriod validFor) { + super.validFor(validFor); + return this; + } + + public LogicalResourceFVO note(List<NoteFVO> note) { + super.note(note); + return this; + } + + public LogicalResourceFVO addNoteItem(NoteFVO noteItem) { + super.addNoteItem(noteItem); + return this; + } + + public LogicalResourceFVO resourceOrderItem(List<RelatedResourceOrderItemFVO> resourceOrderItem) { + super.resourceOrderItem(resourceOrderItem); + return this; + } + + public LogicalResourceFVO addResourceOrderItemItem(RelatedResourceOrderItemFVO resourceOrderItemItem) { + super.addResourceOrderItemItem(resourceOrderItemItem); + return this; + } + + public LogicalResourceFVO place(List<RelatedPlaceRefFVO> place) { + super.place(place); + return this; + } + + public LogicalResourceFVO addPlaceItem(RelatedPlaceRefFVO placeItem) { + super.addPlaceItem(placeItem); + return this; + } + + public LogicalResourceFVO relatedParty(List<RelatedPartyRefOrPartyRoleRefFVO> relatedParty) { + super.relatedParty(relatedParty); + return this; + } + + public LogicalResourceFVO addRelatedPartyItem(RelatedPartyRefOrPartyRoleRefFVO relatedPartyItem) { + super.addRelatedPartyItem(relatedPartyItem); + return this; + } + + public LogicalResourceFVO resourceRelationship(List<ResourceRelationshipFVO> resourceRelationship) { + super.resourceRelationship(resourceRelationship); + return this; + } + + public LogicalResourceFVO addResourceRelationshipItem(ResourceRelationshipFVO resourceRelationshipItem) { + super.addResourceRelationshipItem(resourceRelationshipItem); + return this; + } + + public LogicalResourceFVO resourceCharacteristic(List<CharacteristicFVO> resourceCharacteristic) { + super.resourceCharacteristic(resourceCharacteristic); + return this; + } + + public LogicalResourceFVO addResourceCharacteristicItem(CharacteristicFVO resourceCharacteristicItem) { + super.addResourceCharacteristicItem(resourceCharacteristicItem); + return this; + } + + public LogicalResourceFVO attachment(List<AttachmentRefFVO> attachment) { + super.attachment(attachment); + return this; + } + + public LogicalResourceFVO addAttachmentItem(AttachmentRefFVO attachmentItem) { + super.addAttachmentItem(attachmentItem); + return this; + } + + public LogicalResourceFVO resourceSpecification(ResourceSpecificationRefFVO resourceSpecification) { + super.resourceSpecification(resourceSpecification); + return this; + } + + public LogicalResourceFVO startOperatingDate(OffsetDateTime startOperatingDate) { + super.startOperatingDate(startOperatingDate); + return this; + } + + public LogicalResourceFVO resourceVersion(String resourceVersion) { + super.resourceVersion(resourceVersion); + return this; + } + + public LogicalResourceFVO activationFeature(List<FeatureFVO> activationFeature) { + super.activationFeature(activationFeature); + return this; + } + + public LogicalResourceFVO addActivationFeatureItem(FeatureFVO activationFeatureItem) { + super.addActivationFeatureItem(activationFeatureItem); + return this; + } + + public LogicalResourceFVO intent(IntentRefFVO intent) { + super.intent(intent); + return this; + } + + public LogicalResourceFVO externalIdentifier(List<ExternalIdentifierFVO> externalIdentifier) { + super.externalIdentifier(externalIdentifier); + return this; + } + + public LogicalResourceFVO addExternalIdentifierItem(ExternalIdentifierFVO externalIdentifierItem) { + super.addExternalIdentifierItem(externalIdentifierItem); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LogicalResourceFVO logicalResourceFVO = (LogicalResourceFVO) o; + return Objects.equals(this.value, logicalResourceFVO.value) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(value, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LogicalResourceFVO {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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/pm628/model/LogicalResourceMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/LogicalResourceMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..0838d548c006d7ad4720f6021a0c77b497549ff7 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/LogicalResourceMVO.java @@ -0,0 +1,287 @@ +package org.etsi.osl.tmf.pm628.model; + +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 org.etsi.osl.tmf.common.model.TimePeriod; +import org.etsi.osl.tmf.ri639.model.ResourceAdministrativeStateType; +import org.etsi.osl.tmf.ri639.model.ResourceOperationalStateType; +import org.etsi.osl.tmf.ri639.model.ResourceUsageStateType; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Objects; + +/** + * LogicalResourceMVO + */ + +@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 = DataAccessEndpointMVO.class, name = "DataAccessEndpoint") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class LogicalResourceMVO extends ResourceMVO { + + @JsonProperty("value") + private String value; + + public LogicalResourceMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public LogicalResourceMVO(String atType) { + super(atType); + } + + public LogicalResourceMVO value(String value) { + this.value = value; + return this; + } + + /** + * the value of the logical resource. E.g '0746712345' for MSISDN's + * @return value + */ + + @Schema(name = "value", description = "the value of the logical resource. E.g '0746712345' for MSISDN's", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("value") + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + + public LogicalResourceMVO type(String type) { + super.type(type); + return this; + } + + public LogicalResourceMVO baseType(String baseType) { + super.baseType(baseType); + return this; + } + + public LogicalResourceMVO schemaLocation(String schemaLocation) { + super.schemaLocation(schemaLocation); + return this; + } + + public LogicalResourceMVO href(String href) { + super.href(href); + return this; + } + + public LogicalResourceMVO uuid(String uuid) { + super.uuid(uuid); + return this; + } + + public LogicalResourceMVO category(String category) { + super.category(category); + return this; + } + + public LogicalResourceMVO description(String description) { + super.description(description); + return this; + } + + public LogicalResourceMVO name(String name) { + super.name(name); + return this; + } + + public LogicalResourceMVO endOperatingDate(OffsetDateTime endOperatingDate) { + super.endOperatingDate(endOperatingDate); + return this; + } + + public LogicalResourceMVO administrativeState(ResourceAdministrativeStateType administrativeState) { + super.administrativeState(administrativeState); + return this; + } + + public LogicalResourceMVO operationalState(ResourceOperationalStateType operationalState) { + super.operationalState(operationalState); + return this; + } + + public LogicalResourceMVO resourceStatus(ResourceStatusType resourceStatus) { + super.resourceStatus(resourceStatus); + return this; + } + + public LogicalResourceMVO usageState(ResourceUsageStateType usageState) { + super.usageState(usageState); + return this; + } + + public LogicalResourceMVO validFor(TimePeriod validFor) { + super.validFor(validFor); + return this; + } + + public LogicalResourceMVO note(List<NoteMVO> note) { + super.note(note); + return this; + } + + public LogicalResourceMVO addNoteItem(NoteMVO noteItem) { + super.addNoteItem(noteItem); + return this; + } + + public LogicalResourceMVO resourceOrderItem(List<RelatedResourceOrderItemMVO> resourceOrderItem) { + super.resourceOrderItem(resourceOrderItem); + return this; + } + + public LogicalResourceMVO addResourceOrderItemItem(RelatedResourceOrderItemMVO resourceOrderItemItem) { + super.addResourceOrderItemItem(resourceOrderItemItem); + return this; + } + + public LogicalResourceMVO place(List<RelatedPlaceRefMVO> place) { + super.place(place); + return this; + } + + public LogicalResourceMVO addPlaceItem(RelatedPlaceRefMVO placeItem) { + super.addPlaceItem(placeItem); + return this; + } + + public LogicalResourceMVO relatedParty(List<RelatedPartyRefOrPartyRoleRefMVO> relatedParty) { + super.relatedParty(relatedParty); + return this; + } + + public LogicalResourceMVO addRelatedPartyItem(RelatedPartyRefOrPartyRoleRefMVO relatedPartyItem) { + super.addRelatedPartyItem(relatedPartyItem); + return this; + } + + public LogicalResourceMVO resourceRelationship(List<ResourceRelationshipMVO> resourceRelationship) { + super.resourceRelationship(resourceRelationship); + return this; + } + + public LogicalResourceMVO addResourceRelationshipItem(ResourceRelationshipMVO resourceRelationshipItem) { + super.addResourceRelationshipItem(resourceRelationshipItem); + return this; + } + + public LogicalResourceMVO resourceCharacteristic(List<CharacteristicMVO> resourceCharacteristic) { + super.resourceCharacteristic(resourceCharacteristic); + return this; + } + + public LogicalResourceMVO addResourceCharacteristicItem(CharacteristicMVO resourceCharacteristicItem) { + super.addResourceCharacteristicItem(resourceCharacteristicItem); + return this; + } + + public LogicalResourceMVO attachment(List<AttachmentRefMVO> attachment) { + super.attachment(attachment); + return this; + } + + public LogicalResourceMVO addAttachmentItem(AttachmentRefMVO attachmentItem) { + super.addAttachmentItem(attachmentItem); + return this; + } + + public LogicalResourceMVO resourceSpecification(ResourceSpecificationRefMVO resourceSpecification) { + super.resourceSpecification(resourceSpecification); + return this; + } + + public LogicalResourceMVO startOperatingDate(OffsetDateTime startOperatingDate) { + super.startOperatingDate(startOperatingDate); + return this; + } + + public LogicalResourceMVO resourceVersion(String resourceVersion) { + super.resourceVersion(resourceVersion); + return this; + } + + public LogicalResourceMVO activationFeature(List<FeatureMVO> activationFeature) { + super.activationFeature(activationFeature); + return this; + } + + public LogicalResourceMVO addActivationFeatureItem(FeatureMVO activationFeatureItem) { + super.addActivationFeatureItem(activationFeatureItem); + return this; + } + + public LogicalResourceMVO intent(IntentRefMVO intent) { + super.intent(intent); + return this; + } + + public LogicalResourceMVO externalIdentifier(List<ExternalIdentifierMVO> externalIdentifier) { + super.externalIdentifier(externalIdentifier); + return this; + } + + public LogicalResourceMVO addExternalIdentifierItem(ExternalIdentifierMVO externalIdentifierItem) { + super.addExternalIdentifierItem(externalIdentifierItem); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LogicalResourceMVO logicalResourceMVO = (LogicalResourceMVO) o; + return Objects.equals(this.value, logicalResourceMVO.value) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(value, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LogicalResourceMVO {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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/pm628/model/ManagementJob.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ManagementJob.java new file mode 100644 index 0000000000000000000000000000000000000000..702c3675ef75c97dea654f41868d86b79f0c62e9 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ManagementJob.java @@ -0,0 +1,389 @@ +package org.etsi.osl.tmf.pm628.model; + +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.*; +import jakarta.validation.Valid; +import jakarta.validation.constraints.Max; +import jakarta.validation.constraints.Min; +import jakarta.validation.constraints.Size; +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * ManagementJob + */ + +@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 = ManagementJob.class, name = "ManagementJob"), + @JsonSubTypes.Type(value = MeasurementCollectionJob.class, name = "MeasurementCollectionJob"), + @JsonSubTypes.Type(value = MeasurementJob.class, name = "MeasurementJob") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_ManJob") +public class ManagementJob extends BaseRootEntity { + + @JsonProperty("adminState") + private AdministrativeState adminState; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime creationTime; + + @JsonProperty("executionState") + private ExecutionStateType executionState; + + @JsonProperty("fileTransferData") + @Valid + @ElementCollection(targetClass = FileTransferData.class) + @CollectionTable( + name = "pm628_man_job_ftd", + joinColumns = @JoinColumn(name = "man_job_id") + ) + private List<FileTransferData> fileTransferData = new ArrayList<>(); + + @JsonProperty("dataAccessEndpoint") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_man_job_dae", + joinColumns = @JoinColumn(name = "man_job_uuid"), + inverseJoinColumns = @JoinColumn(name = "dae_uuid") + ) + private List<DataAccessEndpoint> dataAccessEndpoint = new ArrayList<>(); + + @JsonProperty("jobId") + private String jobId; + + @JsonProperty("jobPriority") + private Integer jobPriority = 5; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime lastModifiedTime; + + @JsonProperty("scheduleDefinition") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_man_job_shched_def", + joinColumns = @JoinColumn(name = "man_job_uuid"), + inverseJoinColumns = @JoinColumn(name = "sched_def_uuid") + ) + private List<ScheduleDefinition> scheduleDefinition = new ArrayList<>(); + + public ManagementJob() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ManagementJob(String type) { + this.type = type; + } + + public ManagementJob adminState(AdministrativeState adminState) { + this.adminState = adminState; + return this; + } + + /** + * Get adminState + * @return adminState + */ + @Valid + @Schema(name = "adminState", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("adminState") + public AdministrativeState getAdminState() { + return adminState; + } + + public void setAdminState(AdministrativeState adminState) { + this.adminState = adminState; + } + + public ManagementJob creationTime(OffsetDateTime creationTime) { + this.creationTime = creationTime; + return this; + } + + /** + * The measurement job creation time. + * @return creationTime + */ + @Valid + @Schema(name = "creationTime", description = "The measurement job creation time.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("creationTime") + public String getCreationTimeStr() { + return creationTime.toString(); + } + + public void setCreationTime(String t) { + if ( t!= null ) { + this.creationTime = OffsetDateTime.parse( t ); + } + } + + + public OffsetDateTime getCreationTime() { + return creationTime; + } + + public void setCreationTime(OffsetDateTime creationTime) { + this.creationTime = creationTime; + } + + public ManagementJob executionState(ExecutionStateType executionState) { + this.executionState = executionState; + return this; + } + + /** + * Get executionState + * @return executionState + */ + @Valid + @Schema(name = "executionState", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("executionState") + public ExecutionStateType getExecutionState() { + return executionState; + } + + public void setExecutionState(ExecutionStateType executionState) { + this.executionState = executionState; + } + + public ManagementJob fileTransferData(List<FileTransferData> fileTransferData) { + this.fileTransferData = fileTransferData; + return this; + } + + public ManagementJob addFileTransferDataItem(FileTransferData fileTransferDataItem) { + if (this.fileTransferData == null) { + this.fileTransferData = new ArrayList<>(); + } + this.fileTransferData.add(fileTransferDataItem); + return this; + } + + /** + * Get fileTransferData + * @return fileTransferData + */ + @Valid @Size(min = 0) + @Schema(name = "fileTransferData", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("fileTransferData") + public List<FileTransferData> getFileTransferData() { + return fileTransferData; + } + + public void setFileTransferData(List<FileTransferData> fileTransferData) { + this.fileTransferData = fileTransferData; + } + + public ManagementJob dataAccessEndpoint(List<DataAccessEndpoint> dataAccessEndpoint) { + this.dataAccessEndpoint = dataAccessEndpoint; + return this; + } + + public ManagementJob addDataAccessEndpointItem(DataAccessEndpoint dataAccessEndpointItem) { + if (this.dataAccessEndpoint == null) { + this.dataAccessEndpoint = new ArrayList<>(); + } + this.dataAccessEndpoint.add(dataAccessEndpointItem); + return this; + } + + /** + * Get dataAccessEndpoint + * @return dataAccessEndpoint + */ + @Valid @Size(min = 0) + @Schema(name = "dataAccessEndpoint", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dataAccessEndpoint") + public List<DataAccessEndpoint> getDataAccessEndpoint() { + return dataAccessEndpoint; + } + + public void setDataAccessEndpoint(List<DataAccessEndpoint> dataAccessEndpoint) { + this.dataAccessEndpoint = dataAccessEndpoint; + } + + public ManagementJob jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * The ID of the management job. + * @return jobId + */ + + @Schema(name = "jobId", description = "The ID of the management job.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("jobId") + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + public ManagementJob jobPriority(Integer jobPriority) { + this.jobPriority = jobPriority; + return this; + } + + /** + * The priority of the management job. The way the management application will use the JobPriority to schedule job execution is application specific and outside the scope. Integer, limited to a range of 1 to 10. + * minimum: 1 + * maximum: 10 + * @return jobPriority + */ + @Min(1) @Max(10) + @Schema(name = "jobPriority", description = "The priority of the management job. The way the management application will use the JobPriority to schedule job execution is application specific and outside the scope. Integer, limited to a range of 1 to 10.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("jobPriority") + public Integer getJobPriority() { + return jobPriority; + } + + public void setJobPriority(Integer jobPriority) { + this.jobPriority = jobPriority; + } + + public ManagementJob lastModifiedTime(OffsetDateTime lastModifiedTime) { + this.lastModifiedTime = lastModifiedTime; + return this; + } + + /** + * The last time that a measurement job was modified. + * @return lastModifiedTime + */ + @Valid + @Schema(name = "lastModifiedTime", description = "The last time that a measurement job was modified.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("lastModifiedTime") + public String getLastModifiedTimeStr() { + return lastModifiedTime.toString(); + } + + public void setLastModifiedTime(String t) { + if ( t!= null ) { + this.lastModifiedTime = OffsetDateTime.parse( t ); + } + } + + public OffsetDateTime getLastModifiedTime() { + return lastModifiedTime; + } + + public void setLastModifiedTime(OffsetDateTime lastModifiedTime) { + this.lastModifiedTime = lastModifiedTime; + } + + public ManagementJob scheduleDefinition(List<ScheduleDefinition> scheduleDefinition) { + this.scheduleDefinition = scheduleDefinition; + return this; + } + + public ManagementJob addScheduleDefinitionItem(ScheduleDefinition scheduleDefinitionItem) { + if (this.scheduleDefinition == null) { + this.scheduleDefinition = new ArrayList<>(); + } + this.scheduleDefinition.add(scheduleDefinitionItem); + return this; + } + + /** + * Get scheduleDefinition + * @return scheduleDefinition + */ + @Valid @Size(max = 1) + @Schema(name = "scheduleDefinition", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("scheduleDefinition") + public List<ScheduleDefinition> getScheduleDefinition() { + return scheduleDefinition; + } + + public void setScheduleDefinition(List<ScheduleDefinition> scheduleDefinition) { + this.scheduleDefinition = scheduleDefinition; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ManagementJob managementJob = (ManagementJob) o; + return Objects.equals(this.type, managementJob.type) && + Objects.equals(this.baseType, managementJob.baseType) && + Objects.equals(this.schemaLocation, managementJob.schemaLocation) && + Objects.equals(this.href, managementJob.href) && + Objects.equals(this.uuid, managementJob.uuid) && + Objects.equals(this.adminState, managementJob.adminState) && + Objects.equals(this.creationTime, managementJob.creationTime) && + Objects.equals(this.executionState, managementJob.executionState) && + Objects.equals(this.fileTransferData, managementJob.fileTransferData) && + Objects.equals(this.dataAccessEndpoint, managementJob.dataAccessEndpoint) && + Objects.equals(this.jobId, managementJob.jobId) && + Objects.equals(this.jobPriority, managementJob.jobPriority) && + Objects.equals(this.lastModifiedTime, managementJob.lastModifiedTime) && + Objects.equals(this.scheduleDefinition, managementJob.scheduleDefinition); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, adminState, creationTime, executionState, fileTransferData, dataAccessEndpoint, jobId, jobPriority, lastModifiedTime, scheduleDefinition); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ManagementJob {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" adminState: ").append(toIndentedString(adminState)).append("\n"); + sb.append(" creationTime: ").append(toIndentedString(creationTime)).append("\n"); + sb.append(" executionState: ").append(toIndentedString(executionState)).append("\n"); + sb.append(" fileTransferData: ").append(toIndentedString(fileTransferData)).append("\n"); + sb.append(" dataAccessEndpoint: ").append(toIndentedString(dataAccessEndpoint)).append("\n"); + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); + sb.append(" jobPriority: ").append(toIndentedString(jobPriority)).append("\n"); + sb.append(" lastModifiedTime: ").append(toIndentedString(lastModifiedTime)).append("\n"); + sb.append(" scheduleDefinition: ").append(toIndentedString(scheduleDefinition)).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/pm628/model/ManagementJobFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ManagementJobFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..cafc616fc32d4596b4da2f24b43ce5a96c916e77 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ManagementJobFVO.java @@ -0,0 +1,485 @@ +package org.etsi.osl.tmf.pm628.model; + +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.Valid; +import jakarta.validation.constraints.Max; +import jakarta.validation.constraints.Min; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * ManagementJobFVO + */ + +@JsonIgnoreProperties( + ignoreUnknown = true, + 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 = ManagementJobFVO.class, name = "ManagementJob"), + @JsonSubTypes.Type(value = MeasurementCollectionJobFVO.class, name = "MeasurementCollectionJob"), + @JsonSubTypes.Type(value = MeasurementJobFVO.class, name = "MeasurementJob") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ManagementJobFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("adminState") + private AdministrativeState adminState; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime creationTime; + + @JsonProperty("executionState") + private ExecutionStateType executionState; + + @JsonProperty("fileTransferData") + @Valid + private List<FileTransferDataFVO> fileTransferData = new ArrayList<>(); + + @JsonProperty("dataAccessEndpoint") + @Valid + private List<DataAccessEndpointFVO> dataAccessEndpoint = new ArrayList<>(); + + @JsonProperty("jobId") + private String jobId; + + @JsonProperty("jobPriority") + private Integer jobPriority = 5; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime lastModifiedTime; + + @JsonProperty("scheduleDefinition") + @Valid + private List<ScheduleDefinitionFVO> scheduleDefinition = new ArrayList<>(); + + public ManagementJobFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ManagementJobFVO(String type) { + this.type = type; + } + + public ManagementJobFVO type(String type) { + this.type = type; + 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 getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ManagementJobFVO baseType(String baseType) { + this.baseType = baseType; + 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 getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ManagementJobFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + 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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ManagementJobFVO 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 ManagementJobFVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public ManagementJobFVO adminState(AdministrativeState adminState) { + this.adminState = adminState; + return this; + } + + /** + * Get adminState + * @return adminState + */ + @Valid + @Schema(name = "adminState", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("adminState") + public AdministrativeState getAdminState() { + return adminState; + } + + public void setAdminState(AdministrativeState adminState) { + this.adminState = adminState; + } + + public ManagementJobFVO creationTime(OffsetDateTime creationTime) { + this.creationTime = creationTime; + return this; + } + + /** + * The measurement job creation time. + * @return creationTime + */ + @Valid + @Schema(name = "creationTime", description = "The measurement job creation time.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("creationTime") + public String getCreationTimeStr() { + return creationTime.toString(); + } + + public void setCreationTime(String t) { + if ( t!= null ) { + this.creationTime = OffsetDateTime.parse( t ); + } + } + + public OffsetDateTime getCreationTime() { + return creationTime; + } + + public void setCreationTime(OffsetDateTime creationTime) { + this.creationTime = creationTime; + } + + public ManagementJobFVO executionState(ExecutionStateType executionState) { + this.executionState = executionState; + return this; + } + + /** + * Get executionState + * @return executionState + */ + @Valid + @Schema(name = "executionState", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("executionState") + public ExecutionStateType getExecutionState() { + return executionState; + } + + public void setExecutionState(ExecutionStateType executionState) { + this.executionState = executionState; + } + + public ManagementJobFVO fileTransferData(List<FileTransferDataFVO> fileTransferData) { + this.fileTransferData = fileTransferData; + return this; + } + + public ManagementJobFVO addFileTransferDataItem(FileTransferDataFVO fileTransferDataItem) { + if (this.fileTransferData == null) { + this.fileTransferData = new ArrayList<>(); + } + this.fileTransferData.add(fileTransferDataItem); + return this; + } + + /** + * Get fileTransferData + * @return fileTransferData + */ + @Valid @Size(min = 0) + @Schema(name = "fileTransferData", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("fileTransferData") + public List<FileTransferDataFVO> getFileTransferData() { + return fileTransferData; + } + + public void setFileTransferData(List<FileTransferDataFVO> fileTransferData) { + this.fileTransferData = fileTransferData; + } + + public ManagementJobFVO dataAccessEndpoint(List<DataAccessEndpointFVO> dataAccessEndpoint) { + this.dataAccessEndpoint = dataAccessEndpoint; + return this; + } + + public ManagementJobFVO addDataAccessEndpointItem(DataAccessEndpointFVO dataAccessEndpointItem) { + if (this.dataAccessEndpoint == null) { + this.dataAccessEndpoint = new ArrayList<>(); + } + this.dataAccessEndpoint.add(dataAccessEndpointItem); + return this; + } + + /** + * Get dataAccessEndpoint + * @return dataAccessEndpoint + */ + @Valid @Size(min = 0) + @Schema(name = "dataAccessEndpoint", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dataAccessEndpoint") + public List<DataAccessEndpointFVO> getDataAccessEndpoint() { + return dataAccessEndpoint; + } + + public void setDataAccessEndpoint(List<DataAccessEndpointFVO> dataAccessEndpoint) { + this.dataAccessEndpoint = dataAccessEndpoint; + } + + public ManagementJobFVO jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * The ID of the management job. + * @return jobId + */ + + @Schema(name = "jobId", description = "The ID of the management job.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("jobId") + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + public ManagementJobFVO jobPriority(Integer jobPriority) { + this.jobPriority = jobPriority; + return this; + } + + /** + * The priority of the management job. The way the management application will use the JobPriority to schedule job execution is application specific and outside the scope. Integer, limited to a range of 1 to 10. + * minimum: 1 + * maximum: 10 + * @return jobPriority + */ + @Min(1) @Max(10) + @Schema(name = "jobPriority", description = "The priority of the management job. The way the management application will use the JobPriority to schedule job execution is application specific and outside the scope. Integer, limited to a range of 1 to 10.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("jobPriority") + public Integer getJobPriority() { + return jobPriority; + } + + public void setJobPriority(Integer jobPriority) { + this.jobPriority = jobPriority; + } + + public ManagementJobFVO lastModifiedTime(OffsetDateTime lastModifiedTime) { + this.lastModifiedTime = lastModifiedTime; + return this; + } + + /** + * The last time that a measurement job was modified. + * @return lastModifiedTime + */ + @Valid + @Schema(name = "lastModifiedTime", description = "The last time that a measurement job was modified.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("lastModifiedTime") + public String getLastModifiedTimeStr() { + return lastModifiedTime.toString(); + } + + public void setLastModifiedTime(String t) { + if ( t!= null ) { + this.lastModifiedTime = OffsetDateTime.parse( t ); + } + } + + public OffsetDateTime getLastModifiedTime() { + return lastModifiedTime; + } + + public void setLastModifiedTime(OffsetDateTime lastModifiedTime) { + this.lastModifiedTime = lastModifiedTime; + } + + public ManagementJobFVO scheduleDefinition(List<ScheduleDefinitionFVO> scheduleDefinition) { + this.scheduleDefinition = scheduleDefinition; + return this; + } + + public ManagementJobFVO addScheduleDefinitionItem(ScheduleDefinitionFVO scheduleDefinitionItem) { + if (this.scheduleDefinition == null) { + this.scheduleDefinition = new ArrayList<>(); + } + this.scheduleDefinition.add(scheduleDefinitionItem); + return this; + } + + /** + * Get scheduleDefinition + * @return scheduleDefinition + */ + @Valid @Size(max = 1) + @Schema(name = "scheduleDefinition", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("scheduleDefinition") + public List<ScheduleDefinitionFVO> getScheduleDefinition() { + return scheduleDefinition; + } + + public void setScheduleDefinition(List<ScheduleDefinitionFVO> scheduleDefinition) { + this.scheduleDefinition = scheduleDefinition; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ManagementJobFVO managementJobFVO = (ManagementJobFVO) o; + return Objects.equals(this.type, managementJobFVO.type) && + Objects.equals(this.baseType, managementJobFVO.baseType) && + Objects.equals(this.schemaLocation, managementJobFVO.schemaLocation) && + Objects.equals(this.href, managementJobFVO.href) && + Objects.equals(this.uuid, managementJobFVO.uuid) && + Objects.equals(this.adminState, managementJobFVO.adminState) && + Objects.equals(this.creationTime, managementJobFVO.creationTime) && + Objects.equals(this.executionState, managementJobFVO.executionState) && + Objects.equals(this.fileTransferData, managementJobFVO.fileTransferData) && + Objects.equals(this.dataAccessEndpoint, managementJobFVO.dataAccessEndpoint) && + Objects.equals(this.jobId, managementJobFVO.jobId) && + Objects.equals(this.jobPriority, managementJobFVO.jobPriority) && + Objects.equals(this.lastModifiedTime, managementJobFVO.lastModifiedTime) && + Objects.equals(this.scheduleDefinition, managementJobFVO.scheduleDefinition); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, adminState, creationTime, executionState, fileTransferData, dataAccessEndpoint, jobId, jobPriority, lastModifiedTime, scheduleDefinition); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ManagementJobFVO {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" adminState: ").append(toIndentedString(adminState)).append("\n"); + sb.append(" creationTime: ").append(toIndentedString(creationTime)).append("\n"); + sb.append(" executionState: ").append(toIndentedString(executionState)).append("\n"); + sb.append(" fileTransferData: ").append(toIndentedString(fileTransferData)).append("\n"); + sb.append(" dataAccessEndpoint: ").append(toIndentedString(dataAccessEndpoint)).append("\n"); + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); + sb.append(" jobPriority: ").append(toIndentedString(jobPriority)).append("\n"); + sb.append(" lastModifiedTime: ").append(toIndentedString(lastModifiedTime)).append("\n"); + sb.append(" scheduleDefinition: ").append(toIndentedString(scheduleDefinition)).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/pm628/model/ManagementJobMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ManagementJobMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..fce75a1ae821d4577cef8534573c0b437fce5a8a --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ManagementJobMVO.java @@ -0,0 +1,315 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.*; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import lombok.Getter; +import lombok.Setter; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * ManagementJobMVO + */ + +@JsonIgnoreProperties( + ignoreUnknown = true, + 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 = ManagementJobMVO.class, name = "ManagementJob"), + @JsonSubTypes.Type(value = MeasurementCollectionJobMVO.class, name = "MeasurementCollectionJob"), + @JsonSubTypes.Type(value = MeasurementJobMVO.class, name = "MeasurementJob") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ManagementJobMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("fileTransferData") + @Valid + private List<FileTransferDataMVO> fileTransferData = new ArrayList<>(); + + @JsonProperty("dataAccessEndpoint") + @Valid + private List<DataAccessEndpointMVO> dataAccessEndpoint = new ArrayList<>(); + + @JsonProperty("scheduleDefinition") + @Valid + private List<ScheduleDefinitionMVO> scheduleDefinition = new ArrayList<>(); + + // Property bellow was added by UoP and is not officialy part of TMF628 Model + // @JsonProperty("executionState") + @Setter + @Getter + @JsonIgnore + private ExecutionStateType executionState; + + public ManagementJobMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ManagementJobMVO(String type) { + this.type = type; + } + + public ManagementJobMVO type(String type) { + this.type = type; + 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 getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ManagementJobMVO baseType(String baseType) { + this.baseType = baseType; + 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 getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ManagementJobMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + 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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ManagementJobMVO 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 ManagementJobMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public ManagementJobMVO fileTransferData(List<FileTransferDataMVO> fileTransferData) { + this.fileTransferData = fileTransferData; + return this; + } + + public ManagementJobMVO addFileTransferDataItem(FileTransferDataMVO fileTransferDataItem) { + if (this.fileTransferData == null) { + this.fileTransferData = new ArrayList<>(); + } + this.fileTransferData.add(fileTransferDataItem); + return this; + } + + /** + * Get fileTransferData + * @return fileTransferData + */ + @Valid @Size(min = 0) + @Schema(name = "fileTransferData", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("fileTransferData") + public List<FileTransferDataMVO> getFileTransferData() { + return fileTransferData; + } + + public void setFileTransferData(List<FileTransferDataMVO> fileTransferData) { + this.fileTransferData = fileTransferData; + } + + public ManagementJobMVO dataAccessEndpoint(List<DataAccessEndpointMVO> dataAccessEndpoint) { + this.dataAccessEndpoint = dataAccessEndpoint; + return this; + } + + public ManagementJobMVO addDataAccessEndpointItem(DataAccessEndpointMVO dataAccessEndpointItem) { + if (this.dataAccessEndpoint == null) { + this.dataAccessEndpoint = new ArrayList<>(); + } + this.dataAccessEndpoint.add(dataAccessEndpointItem); + return this; + } + + /** + * Get dataAccessEndpoint + * @return dataAccessEndpoint + */ + @Valid @Size(min = 0) + @Schema(name = "dataAccessEndpoint", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dataAccessEndpoint") + public List<DataAccessEndpointMVO> getDataAccessEndpoint() { + return dataAccessEndpoint; + } + + public void setDataAccessEndpoint(List<DataAccessEndpointMVO> dataAccessEndpoint) { + this.dataAccessEndpoint = dataAccessEndpoint; + } + + public ManagementJobMVO scheduleDefinition(List<ScheduleDefinitionMVO> scheduleDefinition) { + this.scheduleDefinition = scheduleDefinition; + return this; + } + + public ManagementJobMVO addScheduleDefinitionItem(ScheduleDefinitionMVO scheduleDefinitionItem) { + if (this.scheduleDefinition == null) { + this.scheduleDefinition = new ArrayList<>(); + } + this.scheduleDefinition.add(scheduleDefinitionItem); + return this; + } + + /** + * Get scheduleDefinition + * @return scheduleDefinition + */ + @Valid @Size(max = 1) + @Schema(name = "scheduleDefinition", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("scheduleDefinition") + public List<ScheduleDefinitionMVO> getScheduleDefinition() { + return scheduleDefinition; + } + + public void setScheduleDefinition(List<ScheduleDefinitionMVO> scheduleDefinition) { + this.scheduleDefinition = scheduleDefinition; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ManagementJobMVO managementJobMVO = (ManagementJobMVO) o; + return Objects.equals(this.type, managementJobMVO.type) && + Objects.equals(this.baseType, managementJobMVO.baseType) && + Objects.equals(this.schemaLocation, managementJobMVO.schemaLocation) && + Objects.equals(this.href, managementJobMVO.href) && + Objects.equals(this.uuid, managementJobMVO.uuid) && + Objects.equals(this.fileTransferData, managementJobMVO.fileTransferData) && + Objects.equals(this.dataAccessEndpoint, managementJobMVO.dataAccessEndpoint) && + Objects.equals(this.scheduleDefinition, managementJobMVO.scheduleDefinition); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, fileTransferData, dataAccessEndpoint, scheduleDefinition); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ManagementJobMVO {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" fileTransferData: ").append(toIndentedString(fileTransferData)).append("\n"); + sb.append(" dataAccessEndpoint: ").append(toIndentedString(dataAccessEndpoint)).append("\n"); + sb.append(" scheduleDefinition: ").append(toIndentedString(scheduleDefinition)).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/pm628/model/MeasurementCollectionJob.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJob.java new file mode 100644 index 0000000000000000000000000000000000000000..308dc32fd589c3f400850b368a87016637232a3f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJob.java @@ -0,0 +1,329 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.*; +import jakarta.persistence.Entity; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Objects; + +/** + * MeasurementCollectionJob + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_MCJob") +public class MeasurementCollectionJob extends MeasurementJob implements PatchMeasurementCollectionJob200Response { + + @JsonProperty("outputFormat") + private String outputFormat; + + @JsonProperty("reportingPeriod") + private ReportingPeriod reportingPeriod; + + @Embedded + @JsonProperty("jobCollectionFilter") + @AttributeOverrides( + { + @AttributeOverride(name = "type", column = @Column(name = "jcf_type")), + @AttributeOverride(name = "baseType", column = @Column(name = "jcf_base_type")), + @AttributeOverride(name = "schemaLocation", column = @Column(name = "jcf_schema_location")), +// @AttributeOverride(name = "mappings", column = @Column(name = "jcf_mappings")) + } + ) + private DataFilterMap jobCollectionFilter; + + @Embedded + @JsonProperty("searchTaskFilter") + @AttributeOverrides( + { + @AttributeOverride(name = "type", column = @Column(name = "stf_type")), + @AttributeOverride(name = "baseType", column = @Column(name = "stf_base_type")), + @AttributeOverride(name = "schemaLocation", column = @Column(name = "stf_schema_location")), +// @AttributeOverride(name = "mappings", column = @Column(name = "stf_mappings")) + } + ) + private DataFilterMap searchTaskFilter; + + @JsonProperty("jobOnDemand") + private Boolean jobOnDemand = false; + + public MeasurementCollectionJob() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MeasurementCollectionJob(String atType) { + super(atType); + } + + public MeasurementCollectionJob outputFormat(String outputFormat) { + this.outputFormat = outputFormat; + return this; + } + + /** + * Get outputFormat + * @return outputFormat + */ + + @Schema(name = "outputFormat", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("outputFormat") + public String getOutputFormat() { + return outputFormat; + } + + public void setOutputFormat(String outputFormat) { + this.outputFormat = outputFormat; + } + + public MeasurementCollectionJob reportingPeriod(ReportingPeriod reportingPeriod) { + this.reportingPeriod = reportingPeriod; + return this; + } + + /** + * Get reportingPeriod + * @return reportingPeriod + */ + @Valid + @Schema(name = "reportingPeriod", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("reportingPeriod") + public ReportingPeriod getReportingPeriod() { + return reportingPeriod; + } + + public void setReportingPeriod(ReportingPeriod reportingPeriod) { + this.reportingPeriod = reportingPeriod; + } + + public MeasurementCollectionJob jobCollectionFilter(DataFilterMap jobCollectionFilter) { + this.jobCollectionFilter = jobCollectionFilter; + return this; + } + + /** + * Get jobCollectionFilter + * @return jobCollectionFilter + */ + @Valid + @Schema(name = "jobCollectionFilter", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("jobCollectionFilter") + public DataFilterMap getJobCollectionFilter() { + return jobCollectionFilter; + } + + public void setJobCollectionFilter(DataFilterMap jobCollectionFilter) { + this.jobCollectionFilter = jobCollectionFilter; + } + + public MeasurementCollectionJob searchTaskFilter(DataFilterMap searchTaskFilter) { + this.searchTaskFilter = searchTaskFilter; + return this; + } + + /** + * Get searchTaskFilter + * @return searchTaskFilter + */ + @Valid + @Schema(name = "searchTaskFilter", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("searchTaskFilter") + public DataFilterMap getSearchTaskFilter() { + return searchTaskFilter; + } + + public void setSearchTaskFilter(DataFilterMap searchTaskFilter) { + this.searchTaskFilter = searchTaskFilter; + } + + public MeasurementCollectionJob jobOnDemand(Boolean jobOnDemand) { + this.jobOnDemand = jobOnDemand; + return this; + } + + /** + * True if the job is a single job to be executed immediately in which case the reportingPeriod and scheduleDefinition would not be applicable, false otherwise + * @return jobOnDemand + */ + + @Schema(name = "jobOnDemand", description = "True if the job is a single job to be executed immediately in which case the reportingPeriod and scheduleDefinition would not be applicable, false otherwise", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("jobOnDemand") + public Boolean getJobOnDemand() { + return jobOnDemand; + } + + public void setJobOnDemand(Boolean jobOnDemand) { + this.jobOnDemand = jobOnDemand; + } + + + public MeasurementCollectionJob consumingApplicationId(String consumingApplicationId) { + super.consumingApplicationId(consumingApplicationId); + return this; + } + + public MeasurementCollectionJob producingApplicationId(String producingApplicationId) { + super.producingApplicationId(producingApplicationId); + return this; + } + + public MeasurementCollectionJob granularity(Granularity granularity) { + super.granularity(granularity); + return this; + } + + public MeasurementCollectionJob performanceIndicatorGroupSpecification(List<PerformanceIndicatorGroupSpecification> performanceIndicatorGroupSpecification) { + super.performanceIndicatorGroupSpecification(performanceIndicatorGroupSpecification); + return this; + } + + public MeasurementCollectionJob addPerformanceIndicatorGroupSpecificationItem(PerformanceIndicatorGroupSpecification performanceIndicatorGroupSpecificationItem) { + super.addPerformanceIndicatorGroupSpecificationItem(performanceIndicatorGroupSpecificationItem); + return this; + } + + public MeasurementCollectionJob performanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValue> performanceIndicatorSpecification) { + super.performanceIndicatorSpecification(performanceIndicatorSpecification); + return this; + } + + public MeasurementCollectionJob addPerformanceIndicatorSpecificationItem(PerformanceIndicatorSpecificationRefOrValue performanceIndicatorSpecificationItem) { + super.addPerformanceIndicatorSpecificationItem(performanceIndicatorSpecificationItem); + return this; + } + + public MeasurementCollectionJob trackingRecord(List<TrackingRecord> trackingRecord) { + super.trackingRecord(trackingRecord); + return this; + } + + public MeasurementCollectionJob addTrackingRecordItem(TrackingRecord trackingRecordItem) { + super.addTrackingRecordItem(trackingRecordItem); + return this; + } + + public MeasurementCollectionJob monitoredInstancesCriteria(MonitoredInstancesCriteria monitoredInstancesCriteria) { + super.monitoredInstancesCriteria(monitoredInstancesCriteria); + return this; + } + + public MeasurementCollectionJob monitoredClassCriteria(MonitoredClassCriteria monitoredClassCriteria) { + super.monitoredClassCriteria(monitoredClassCriteria); + return this; + } + + public MeasurementCollectionJob adminState(AdministrativeState adminState) { + super.adminState(adminState); + return this; + } + + public MeasurementCollectionJob creationTime(OffsetDateTime creationTime) { + super.creationTime(creationTime); + return this; + } + + public MeasurementCollectionJob executionState(ExecutionStateType executionState) { + super.executionState(executionState); + return this; + } + + public MeasurementCollectionJob fileTransferData(List<FileTransferData> fileTransferData) { + super.fileTransferData(fileTransferData); + return this; + } + + public MeasurementCollectionJob addFileTransferDataItem(FileTransferData fileTransferDataItem) { + super.addFileTransferDataItem(fileTransferDataItem); + return this; + } + + public MeasurementCollectionJob dataAccessEndpoint(List<DataAccessEndpoint> dataAccessEndpoint) { + super.dataAccessEndpoint(dataAccessEndpoint); + return this; + } + + public MeasurementCollectionJob addDataAccessEndpointItem(DataAccessEndpoint dataAccessEndpointItem) { + super.addDataAccessEndpointItem(dataAccessEndpointItem); + return this; + } + + public MeasurementCollectionJob jobId(String jobId) { + super.jobId(jobId); + return this; + } + + public MeasurementCollectionJob jobPriority(Integer jobPriority) { + super.jobPriority(jobPriority); + return this; + } + + public MeasurementCollectionJob lastModifiedTime(OffsetDateTime lastModifiedTime) { + super.lastModifiedTime(lastModifiedTime); + return this; + } + + public MeasurementCollectionJob scheduleDefinition(List<ScheduleDefinition> scheduleDefinition) { + super.scheduleDefinition(scheduleDefinition); + return this; + } + + public MeasurementCollectionJob addScheduleDefinitionItem(ScheduleDefinition scheduleDefinitionItem) { + super.addScheduleDefinitionItem(scheduleDefinitionItem); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJob measurementCollectionJob = (MeasurementCollectionJob) o; + return Objects.equals(this.outputFormat, measurementCollectionJob.outputFormat) && + Objects.equals(this.reportingPeriod, measurementCollectionJob.reportingPeriod) && + Objects.equals(this.jobCollectionFilter, measurementCollectionJob.jobCollectionFilter) && + Objects.equals(this.searchTaskFilter, measurementCollectionJob.searchTaskFilter) && + Objects.equals(this.jobOnDemand, measurementCollectionJob.jobOnDemand) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(outputFormat, reportingPeriod, jobCollectionFilter, searchTaskFilter, jobOnDemand, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJob {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" outputFormat: ").append(toIndentedString(outputFormat)).append("\n"); + sb.append(" reportingPeriod: ").append(toIndentedString(reportingPeriod)).append("\n"); + sb.append(" jobCollectionFilter: ").append(toIndentedString(jobCollectionFilter)).append("\n"); + sb.append(" searchTaskFilter: ").append(toIndentedString(searchTaskFilter)).append("\n"); + sb.append(" jobOnDemand: ").append(toIndentedString(jobOnDemand)).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/pm628/model/MeasurementCollectionJobAttributeValueChangeEvent.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobAttributeValueChangeEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..f78c60a73d0ea752b4c401936224c4b725e86c2c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobAttributeValueChangeEvent.java @@ -0,0 +1,124 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * MeasurementCollectionJobAttributeValueChangeEvent + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobAttributeValueChangeEvent extends Event{ + + private MeasurementCollectionJobAttributeValueChangeEventPayload event; + + public MeasurementCollectionJobAttributeValueChangeEvent() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MeasurementCollectionJobAttributeValueChangeEvent(String type) { + this.type = type; + } + + public MeasurementCollectionJobAttributeValueChangeEvent event(MeasurementCollectionJobAttributeValueChangeEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + @Valid + @Schema(name = "event", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("event") + public MeasurementCollectionJobAttributeValueChangeEventPayload getEvent() { + return event; + } + + public void setEvent(MeasurementCollectionJobAttributeValueChangeEventPayload event) { + this.event = event; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobAttributeValueChangeEvent measurementCollectionJobAttributeValueChangeEvent = (MeasurementCollectionJobAttributeValueChangeEvent) o; + return Objects.equals(this.type, measurementCollectionJobAttributeValueChangeEvent.type) && + Objects.equals(this.baseType, measurementCollectionJobAttributeValueChangeEvent.baseType) && + Objects.equals(this.schemaLocation, measurementCollectionJobAttributeValueChangeEvent.schemaLocation) && + Objects.equals(this.href, measurementCollectionJobAttributeValueChangeEvent.href) && + Objects.equals(this.id, measurementCollectionJobAttributeValueChangeEvent.id) && + Objects.equals(this.correlationId, measurementCollectionJobAttributeValueChangeEvent.correlationId) && + Objects.equals(this.domain, measurementCollectionJobAttributeValueChangeEvent.domain) && + Objects.equals(this.title, measurementCollectionJobAttributeValueChangeEvent.title) && + Objects.equals(this.description, measurementCollectionJobAttributeValueChangeEvent.description) && + Objects.equals(this.priority, measurementCollectionJobAttributeValueChangeEvent.priority) && + Objects.equals(this.timeOccurred, measurementCollectionJobAttributeValueChangeEvent.timeOccurred) && + Objects.equals(this.source, measurementCollectionJobAttributeValueChangeEvent.source) && + Objects.equals(this.reportingSystem, measurementCollectionJobAttributeValueChangeEvent.reportingSystem) && + Objects.equals(this.relatedParty, measurementCollectionJobAttributeValueChangeEvent.relatedParty) && + Objects.equals(this.analyticCharacteristic, measurementCollectionJobAttributeValueChangeEvent.analyticCharacteristic) && + Objects.equals(this.eventId, measurementCollectionJobAttributeValueChangeEvent.eventId) && + Objects.equals(this.eventTime, measurementCollectionJobAttributeValueChangeEvent.eventTime) && + Objects.equals(this.eventType, measurementCollectionJobAttributeValueChangeEvent.eventType) && + Objects.equals(this.event, measurementCollectionJobAttributeValueChangeEvent.event); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, correlationId, domain, title, description, priority, timeOccurred, source, reportingSystem, relatedParty, analyticCharacteristic, eventId, eventTime, eventType, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobAttributeValueChangeEvent {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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(" timeOccurred: ").append(toIndentedString(timeOccurred)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" reportingSystem: ").append(toIndentedString(reportingSystem)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" analyticCharacteristic: ").append(toIndentedString(analyticCharacteristic)).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(" 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/pm628/model/MeasurementCollectionJobAttributeValueChangeEventPayload.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobAttributeValueChangeEventPayload.java new file mode 100644 index 0000000000000000000000000000000000000000..65bc6ef6f547253ff4bbbd137a1adabc6b56afd4 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobAttributeValueChangeEventPayload.java @@ -0,0 +1,77 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * MeasurementCollectionJobAttributeValueChangeEventPayload generic structure + */ + +@Schema(name = "MeasurementCollectionJobAttributeValueChangeEventPayload", description = "MeasurementCollectionJobAttributeValueChangeEventPayload generic structure") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobAttributeValueChangeEventPayload { + + private MeasurementCollectionJob measurementCollectionJob; + + public MeasurementCollectionJobAttributeValueChangeEventPayload measurementCollectionJob(MeasurementCollectionJob measurementCollectionJob) { + this.measurementCollectionJob = measurementCollectionJob; + return this; + } + + /** + * Get measurementCollectionJob + * @return measurementCollectionJob + */ + @Valid + @Schema(name = "measurementCollectionJob", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("measurementCollectionJob") + public MeasurementCollectionJob getMeasurementCollectionJob() { + return measurementCollectionJob; + } + + public void setMeasurementCollectionJob(MeasurementCollectionJob measurementCollectionJob) { + this.measurementCollectionJob = measurementCollectionJob; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobAttributeValueChangeEventPayload measurementCollectionJobAttributeValueChangeEventPayload = (MeasurementCollectionJobAttributeValueChangeEventPayload) o; + return Objects.equals(this.measurementCollectionJob, measurementCollectionJobAttributeValueChangeEventPayload.measurementCollectionJob); + } + + @Override + public int hashCode() { + return Objects.hash(measurementCollectionJob); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobAttributeValueChangeEventPayload {\n"); + sb.append(" measurementCollectionJob: ").append(toIndentedString(measurementCollectionJob)).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/pm628/model/MeasurementCollectionJobCreateEvent.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobCreateEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..e52b81fdf1047c7c3e9c6be59b8fe5bde473cffb --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobCreateEvent.java @@ -0,0 +1,124 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * MeasurementCollectionJobCreateEvent + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobCreateEvent extends Event{ + + private MeasurementCollectionJobCreateEventPayload event; + + public MeasurementCollectionJobCreateEvent() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MeasurementCollectionJobCreateEvent(String type) { + this.type = type; + } + + public MeasurementCollectionJobCreateEvent event(MeasurementCollectionJobCreateEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + @Valid + @Schema(name = "event", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("event") + public MeasurementCollectionJobCreateEventPayload getEvent() { + return event; + } + + public void setEvent(MeasurementCollectionJobCreateEventPayload event) { + this.event = event; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobCreateEvent measurementCollectionJobCreateEvent = (MeasurementCollectionJobCreateEvent) o; + return Objects.equals(this.type, measurementCollectionJobCreateEvent.type) && + Objects.equals(this.baseType, measurementCollectionJobCreateEvent.baseType) && + Objects.equals(this.schemaLocation, measurementCollectionJobCreateEvent.schemaLocation) && + Objects.equals(this.href, measurementCollectionJobCreateEvent.href) && + Objects.equals(this.id, measurementCollectionJobCreateEvent.id) && + Objects.equals(this.correlationId, measurementCollectionJobCreateEvent.correlationId) && + Objects.equals(this.domain, measurementCollectionJobCreateEvent.domain) && + Objects.equals(this.title, measurementCollectionJobCreateEvent.title) && + Objects.equals(this.description, measurementCollectionJobCreateEvent.description) && + Objects.equals(this.priority, measurementCollectionJobCreateEvent.priority) && + Objects.equals(this.timeOccurred, measurementCollectionJobCreateEvent.timeOccurred) && + Objects.equals(this.source, measurementCollectionJobCreateEvent.source) && + Objects.equals(this.reportingSystem, measurementCollectionJobCreateEvent.reportingSystem) && + Objects.equals(this.relatedParty, measurementCollectionJobCreateEvent.relatedParty) && + Objects.equals(this.analyticCharacteristic, measurementCollectionJobCreateEvent.analyticCharacteristic) && + Objects.equals(this.eventId, measurementCollectionJobCreateEvent.eventId) && + Objects.equals(this.eventTime, measurementCollectionJobCreateEvent.eventTime) && + Objects.equals(this.eventType, measurementCollectionJobCreateEvent.eventType) && + Objects.equals(this.event, measurementCollectionJobCreateEvent.event); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, correlationId, domain, title, description, priority, timeOccurred, source, reportingSystem, relatedParty, analyticCharacteristic, eventId, eventTime, eventType, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobCreateEvent {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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(" timeOccurred: ").append(toIndentedString(timeOccurred)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" reportingSystem: ").append(toIndentedString(reportingSystem)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" analyticCharacteristic: ").append(toIndentedString(analyticCharacteristic)).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(" 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/pm628/model/MeasurementCollectionJobCreateEventPayload.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobCreateEventPayload.java new file mode 100644 index 0000000000000000000000000000000000000000..2e45f778097707e6fec8e82f4a0282055a643717 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobCreateEventPayload.java @@ -0,0 +1,78 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * MeasurementCollectionJobCreateEventPayload generic structure + */ + +@Schema(name = "MeasurementCollectionJobCreateEventPayload", description = "MeasurementCollectionJobCreateEventPayload generic structure") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobCreateEventPayload { + + @JsonProperty("measurementCollectionJob") + private MeasurementCollectionJobRef measurementCollectionJob; + + public MeasurementCollectionJobCreateEventPayload measurementCollectionJob(MeasurementCollectionJobRef measurementCollectionJob) { + this.measurementCollectionJob = measurementCollectionJob; + return this; + } + + /** + * Get measurementCollectionJob + * @return measurementCollectionJob + */ + @Valid + @Schema(name = "measurementCollectionJob", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("measurementCollectionJob") + public MeasurementCollectionJobRef getMeasurementCollectionJob() { + return measurementCollectionJob; + } + + public void setMeasurementCollectionJob(MeasurementCollectionJobRef measurementCollectionJob) { + this.measurementCollectionJob = measurementCollectionJob; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobCreateEventPayload measurementCollectionJobCreateEventPayload = (MeasurementCollectionJobCreateEventPayload) o; + return Objects.equals(this.measurementCollectionJob, measurementCollectionJobCreateEventPayload.measurementCollectionJob); + } + + @Override + public int hashCode() { + return Objects.hash(measurementCollectionJob); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobCreateEventPayload {\n"); + sb.append(" measurementCollectionJob: ").append(toIndentedString(measurementCollectionJob)).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/pm628/model/MeasurementCollectionJobDeleteEvent.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobDeleteEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..65f153765744ce611caddf4083707ef7529b9833 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobDeleteEvent.java @@ -0,0 +1,124 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * MeasurementCollectionJobDeleteEvent + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobDeleteEvent extends Event{ + + private MeasurementCollectionJobDeleteEventPayload event; + + public MeasurementCollectionJobDeleteEvent() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MeasurementCollectionJobDeleteEvent(String type) { + this.type = type; + } + + public MeasurementCollectionJobDeleteEvent event(MeasurementCollectionJobDeleteEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + @Valid + @Schema(name = "event", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("event") + public MeasurementCollectionJobDeleteEventPayload getEvent() { + return event; + } + + public void setEvent(MeasurementCollectionJobDeleteEventPayload event) { + this.event = event; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobDeleteEvent measurementCollectionJobDeleteEvent = (MeasurementCollectionJobDeleteEvent) o; + return Objects.equals(this.type, measurementCollectionJobDeleteEvent.type) && + Objects.equals(this.baseType, measurementCollectionJobDeleteEvent.baseType) && + Objects.equals(this.schemaLocation, measurementCollectionJobDeleteEvent.schemaLocation) && + Objects.equals(this.href, measurementCollectionJobDeleteEvent.href) && + Objects.equals(this.id, measurementCollectionJobDeleteEvent.id) && + Objects.equals(this.correlationId, measurementCollectionJobDeleteEvent.correlationId) && + Objects.equals(this.domain, measurementCollectionJobDeleteEvent.domain) && + Objects.equals(this.title, measurementCollectionJobDeleteEvent.title) && + Objects.equals(this.description, measurementCollectionJobDeleteEvent.description) && + Objects.equals(this.priority, measurementCollectionJobDeleteEvent.priority) && + Objects.equals(this.timeOccurred, measurementCollectionJobDeleteEvent.timeOccurred) && + Objects.equals(this.source, measurementCollectionJobDeleteEvent.source) && + Objects.equals(this.reportingSystem, measurementCollectionJobDeleteEvent.reportingSystem) && + Objects.equals(this.relatedParty, measurementCollectionJobDeleteEvent.relatedParty) && + Objects.equals(this.analyticCharacteristic, measurementCollectionJobDeleteEvent.analyticCharacteristic) && + Objects.equals(this.eventId, measurementCollectionJobDeleteEvent.eventId) && + Objects.equals(this.eventTime, measurementCollectionJobDeleteEvent.eventTime) && + Objects.equals(this.eventType, measurementCollectionJobDeleteEvent.eventType) && + Objects.equals(this.event, measurementCollectionJobDeleteEvent.event); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, correlationId, domain, title, description, priority, timeOccurred, source, reportingSystem, relatedParty, analyticCharacteristic, eventId, eventTime, eventType, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobDeleteEvent {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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(" timeOccurred: ").append(toIndentedString(timeOccurred)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" reportingSystem: ").append(toIndentedString(reportingSystem)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" analyticCharacteristic: ").append(toIndentedString(analyticCharacteristic)).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(" 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/pm628/model/MeasurementCollectionJobDeleteEventPayload.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobDeleteEventPayload.java new file mode 100644 index 0000000000000000000000000000000000000000..b601049f4ee80b26df0d997884b70db2acdc2ea1 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobDeleteEventPayload.java @@ -0,0 +1,77 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * MeasurementCollectionJobDeleteEventPayload generic structure + */ + +@Schema(name = "MeasurementCollectionJobDeleteEventPayload", description = "MeasurementCollectionJobDeleteEventPayload generic structure") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobDeleteEventPayload { + + private MeasurementCollectionJob measurementCollectionJob; + + public MeasurementCollectionJobDeleteEventPayload measurementCollectionJob(MeasurementCollectionJob measurementCollectionJob) { + this.measurementCollectionJob = measurementCollectionJob; + return this; + } + + /** + * Get measurementCollectionJob + * @return measurementCollectionJob + */ + @Valid + @Schema(name = "measurementCollectionJob", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("measurementCollectionJob") + public MeasurementCollectionJob getMeasurementCollectionJob() { + return measurementCollectionJob; + } + + public void setMeasurementCollectionJob(MeasurementCollectionJob measurementCollectionJob) { + this.measurementCollectionJob = measurementCollectionJob; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobDeleteEventPayload measurementCollectionJobDeleteEventPayload = (MeasurementCollectionJobDeleteEventPayload) o; + return Objects.equals(this.measurementCollectionJob, measurementCollectionJobDeleteEventPayload.measurementCollectionJob); + } + + @Override + public int hashCode() { + return Objects.hash(measurementCollectionJob); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobDeleteEventPayload {\n"); + sb.append(" measurementCollectionJob: ").append(toIndentedString(measurementCollectionJob)).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/pm628/model/MeasurementCollectionJobExecutionStateChangeEvent.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobExecutionStateChangeEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..9cf0250207f2f48d9e504528d193b574751c071f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobExecutionStateChangeEvent.java @@ -0,0 +1,119 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * MeasurementCollectionJobExecutionStateChangeEvent + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobExecutionStateChangeEvent extends Event{ + + private MeasurementCollectionJobExecutionStateChangeEventPayload event; + + public MeasurementCollectionJobExecutionStateChangeEvent() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MeasurementCollectionJobExecutionStateChangeEvent(String type) { + this.type = type; + } + + /** + * Get event + * @return event + */ + @Valid + @Schema(name = "event", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("event") + public MeasurementCollectionJobExecutionStateChangeEventPayload getEvent() { + return event; + } + + public void setEvent(MeasurementCollectionJobExecutionStateChangeEventPayload event) { + this.event = event; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobExecutionStateChangeEvent measurementCollectionJobExecutionStateChangeEvent = (MeasurementCollectionJobExecutionStateChangeEvent) o; + return Objects.equals(this.type, measurementCollectionJobExecutionStateChangeEvent.type) && + Objects.equals(this.baseType, measurementCollectionJobExecutionStateChangeEvent.baseType) && + Objects.equals(this.schemaLocation, measurementCollectionJobExecutionStateChangeEvent.schemaLocation) && + Objects.equals(this.href, measurementCollectionJobExecutionStateChangeEvent.href) && + Objects.equals(this.id, measurementCollectionJobExecutionStateChangeEvent.id) && + Objects.equals(this.correlationId, measurementCollectionJobExecutionStateChangeEvent.correlationId) && + Objects.equals(this.domain, measurementCollectionJobExecutionStateChangeEvent.domain) && + Objects.equals(this.title, measurementCollectionJobExecutionStateChangeEvent.title) && + Objects.equals(this.description, measurementCollectionJobExecutionStateChangeEvent.description) && + Objects.equals(this.priority, measurementCollectionJobExecutionStateChangeEvent.priority) && + Objects.equals(this.timeOccurred, measurementCollectionJobExecutionStateChangeEvent.timeOccurred) && + Objects.equals(this.source, measurementCollectionJobExecutionStateChangeEvent.source) && + Objects.equals(this.reportingSystem, measurementCollectionJobExecutionStateChangeEvent.reportingSystem) && + Objects.equals(this.relatedParty, measurementCollectionJobExecutionStateChangeEvent.relatedParty) && + Objects.equals(this.analyticCharacteristic, measurementCollectionJobExecutionStateChangeEvent.analyticCharacteristic) && + Objects.equals(this.eventId, measurementCollectionJobExecutionStateChangeEvent.eventId) && + Objects.equals(this.eventTime, measurementCollectionJobExecutionStateChangeEvent.eventTime) && + Objects.equals(this.eventType, measurementCollectionJobExecutionStateChangeEvent.eventType) && + Objects.equals(this.event, measurementCollectionJobExecutionStateChangeEvent.event); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, correlationId, domain, title, description, priority, timeOccurred, source, reportingSystem, relatedParty, analyticCharacteristic, eventId, eventTime, eventType, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobExecutionStateChangeEvent {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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(" timeOccurred: ").append(toIndentedString(timeOccurred)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" reportingSystem: ").append(toIndentedString(reportingSystem)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" analyticCharacteristic: ").append(toIndentedString(analyticCharacteristic)).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(" 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/pm628/model/MeasurementCollectionJobExecutionStateChangeEventPayload.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobExecutionStateChangeEventPayload.java new file mode 100644 index 0000000000000000000000000000000000000000..7b6738dc1370e0af07cd2116763bb57a4206b750 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobExecutionStateChangeEventPayload.java @@ -0,0 +1,77 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * MeasurementCollectionJobExecutionStateChangeEventPayload generic structure + */ + +@Schema(name = "MeasurementCollectionJobExecutionStateChangeEventPayload", description = "MeasurementCollectionJobExecutionStateChangeEventPayload generic structure") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobExecutionStateChangeEventPayload { + + private MeasurementCollectionJob measurementCollectionJob; + + public MeasurementCollectionJobExecutionStateChangeEventPayload measurementCollectionJob(MeasurementCollectionJob measurementCollectionJob) { + this.measurementCollectionJob = measurementCollectionJob; + return this; + } + + /** + * Get measurementCollectionJob + * @return measurementCollectionJob + */ + @Valid + @Schema(name = "measurementCollectionJob", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("measurementCollectionJob") + public MeasurementCollectionJob getMeasurementCollectionJob() { + return measurementCollectionJob; + } + + public void setMeasurementCollectionJob(MeasurementCollectionJob measurementCollectionJob) { + this.measurementCollectionJob = measurementCollectionJob; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobExecutionStateChangeEventPayload measurementCollectionJobExecutionStateChangeEventPayload = (MeasurementCollectionJobExecutionStateChangeEventPayload) o; + return Objects.equals(this.measurementCollectionJob, measurementCollectionJobExecutionStateChangeEventPayload.measurementCollectionJob); + } + + @Override + public int hashCode() { + return Objects.hash(measurementCollectionJob); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobExecutionStateChangeEventPayload {\n"); + sb.append(" measurementCollectionJob: ").append(toIndentedString(measurementCollectionJob)).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/pm628/model/MeasurementCollectionJobFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..9da9af128eef3935a82a0084b5b445562fe2bcf6 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobFVO.java @@ -0,0 +1,308 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Objects; + +/** + * MeasurementCollectionJobFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobFVO extends MeasurementJobFVO { + + @JsonProperty("outputFormat") + private String outputFormat; + + @JsonProperty("reportingPeriod") + private ReportingPeriod reportingPeriod; + + @JsonProperty("jobCollectionFilter") + private DataFilterMapFVO jobCollectionFilter; + + @JsonProperty("searchTaskFilter") + private DataFilterMapFVO searchTaskFilter; + + @JsonProperty("jobOnDemand") + private Boolean jobOnDemand = false; + + public MeasurementCollectionJobFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MeasurementCollectionJobFVO(String atType, String consumingApplicationId, String producingApplicationId, List<@Valid PerformanceIndicatorSpecificationRefOrValueFVO> performanceIndicatorSpecification) { + super(consumingApplicationId, producingApplicationId, performanceIndicatorSpecification, atType); + } + + public MeasurementCollectionJobFVO outputFormat(String outputFormat) { + this.outputFormat = outputFormat; + return this; + } + + /** + * Get outputFormat + * @return outputFormat + */ + + @Schema(name = "outputFormat", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("outputFormat") + public String getOutputFormat() { + return outputFormat; + } + + public void setOutputFormat(String outputFormat) { + this.outputFormat = outputFormat; + } + + public MeasurementCollectionJobFVO reportingPeriod(ReportingPeriod reportingPeriod) { + this.reportingPeriod = reportingPeriod; + return this; + } + + /** + * Get reportingPeriod + * @return reportingPeriod + */ + @Valid + @Schema(name = "reportingPeriod", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("reportingPeriod") + public ReportingPeriod getReportingPeriod() { + return reportingPeriod; + } + + public void setReportingPeriod(ReportingPeriod reportingPeriod) { + this.reportingPeriod = reportingPeriod; + } + + public MeasurementCollectionJobFVO jobCollectionFilter(DataFilterMapFVO jobCollectionFilter) { + this.jobCollectionFilter = jobCollectionFilter; + return this; + } + + /** + * Get jobCollectionFilter + * @return jobCollectionFilter + */ + @Valid + @Schema(name = "jobCollectionFilter", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("jobCollectionFilter") + public DataFilterMapFVO getJobCollectionFilter() { + return jobCollectionFilter; + } + + public void setJobCollectionFilter(DataFilterMapFVO jobCollectionFilter) { + this.jobCollectionFilter = jobCollectionFilter; + } + + public MeasurementCollectionJobFVO searchTaskFilter(DataFilterMapFVO searchTaskFilter) { + this.searchTaskFilter = searchTaskFilter; + return this; + } + + /** + * Get searchTaskFilter + * @return searchTaskFilter + */ + @Valid + @Schema(name = "searchTaskFilter", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("searchTaskFilter") + public DataFilterMapFVO getSearchTaskFilter() { + return searchTaskFilter; + } + + public void setSearchTaskFilter(DataFilterMapFVO searchTaskFilter) { + this.searchTaskFilter = searchTaskFilter; + } + + public MeasurementCollectionJobFVO jobOnDemand(Boolean jobOnDemand) { + this.jobOnDemand = jobOnDemand; + return this; + } + + /** + * True if the job is a single job to be executed immediately in which case the reportingPeriod and scheduleDefinition would not be applicable, false otherwise + * @return jobOnDemand + */ + + @Schema(name = "jobOnDemand", description = "True if the job is a single job to be executed immediately in which case the reportingPeriod and scheduleDefinition would not be applicable, false otherwise", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("jobOnDemand") + public Boolean getJobOnDemand() { + return jobOnDemand; + } + + public void setJobOnDemand(Boolean jobOnDemand) { + this.jobOnDemand = jobOnDemand; + } + + + public MeasurementCollectionJobFVO consumingApplicationId(String consumingApplicationId) { + super.consumingApplicationId(consumingApplicationId); + return this; + } + + public MeasurementCollectionJobFVO producingApplicationId(String producingApplicationId) { + super.producingApplicationId(producingApplicationId); + return this; + } + + public MeasurementCollectionJobFVO granularity(Granularity granularity) { + super.granularity(granularity); + return this; + } + + public MeasurementCollectionJobFVO performanceIndicatorGroupSpecification(List<PerformanceIndicatorGroupSpecificationFVO> performanceIndicatorGroupSpecification) { + super.performanceIndicatorGroupSpecification(performanceIndicatorGroupSpecification); + return this; + } + + public MeasurementCollectionJobFVO addPerformanceIndicatorGroupSpecificationItem(PerformanceIndicatorGroupSpecificationFVO performanceIndicatorGroupSpecificationItem) { + super.addPerformanceIndicatorGroupSpecificationItem(performanceIndicatorGroupSpecificationItem); + return this; + } + + public MeasurementCollectionJobFVO performanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValueFVO> performanceIndicatorSpecification) { + super.performanceIndicatorSpecification(performanceIndicatorSpecification); + return this; + } + + public MeasurementCollectionJobFVO addPerformanceIndicatorSpecificationItem(PerformanceIndicatorSpecificationRefOrValueFVO performanceIndicatorSpecificationItem) { + super.addPerformanceIndicatorSpecificationItem(performanceIndicatorSpecificationItem); + return this; + } + + public MeasurementCollectionJobFVO trackingRecord(List<TrackingRecordFVO> trackingRecord) { + super.trackingRecord(trackingRecord); + return this; + } + + public MeasurementCollectionJobFVO addTrackingRecordItem(TrackingRecordFVO trackingRecordItem) { + super.addTrackingRecordItem(trackingRecordItem); + return this; + } + + public MeasurementCollectionJobFVO monitoredInstancesCriteria(MonitoredInstancesCriteriaFVO monitoredInstancesCriteria) { + super.monitoredInstancesCriteria(monitoredInstancesCriteria); + return this; + } + + public MeasurementCollectionJobFVO monitoredClassCriteria(MonitoredClassCriteriaFVO monitoredClassCriteria) { + super.monitoredClassCriteria(monitoredClassCriteria); + return this; + } + + public MeasurementCollectionJobFVO adminState(AdministrativeState adminState) { + super.adminState(adminState); + return this; + } + + public MeasurementCollectionJobFVO creationTime(OffsetDateTime creationTime) { + super.creationTime(creationTime); + return this; + } + + public MeasurementCollectionJobFVO executionState(ExecutionStateType executionState) { + super.executionState(executionState); + return this; + } + + public MeasurementCollectionJobFVO fileTransferData(List<FileTransferDataFVO> fileTransferData) { + super.fileTransferData(fileTransferData); + return this; + } + + public MeasurementCollectionJobFVO addFileTransferDataItem(FileTransferDataFVO fileTransferDataItem) { + super.addFileTransferDataItem(fileTransferDataItem); + return this; + } + + public MeasurementCollectionJobFVO dataAccessEndpoint(List<DataAccessEndpointFVO> dataAccessEndpoint) { + super.dataAccessEndpoint(dataAccessEndpoint); + return this; + } + + public MeasurementCollectionJobFVO addDataAccessEndpointItem(DataAccessEndpointFVO dataAccessEndpointItem) { + super.addDataAccessEndpointItem(dataAccessEndpointItem); + return this; + } + + public MeasurementCollectionJobFVO jobId(String jobId) { + super.jobId(jobId); + return this; + } + + public MeasurementCollectionJobFVO jobPriority(Integer jobPriority) { + super.jobPriority(jobPriority); + return this; + } + + public MeasurementCollectionJobFVO lastModifiedTime(OffsetDateTime lastModifiedTime) { + super.lastModifiedTime(lastModifiedTime); + return this; + } + + public MeasurementCollectionJobFVO scheduleDefinition(List<ScheduleDefinitionFVO> scheduleDefinition) { + super.scheduleDefinition(scheduleDefinition); + return this; + } + + public MeasurementCollectionJobFVO addScheduleDefinitionItem(ScheduleDefinitionFVO scheduleDefinitionItem) { + super.addScheduleDefinitionItem(scheduleDefinitionItem); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobFVO measurementCollectionJobFVO = (MeasurementCollectionJobFVO) o; + return Objects.equals(this.outputFormat, measurementCollectionJobFVO.outputFormat) && + Objects.equals(this.reportingPeriod, measurementCollectionJobFVO.reportingPeriod) && + Objects.equals(this.jobCollectionFilter, measurementCollectionJobFVO.jobCollectionFilter) && + Objects.equals(this.searchTaskFilter, measurementCollectionJobFVO.searchTaskFilter) && + Objects.equals(this.jobOnDemand, measurementCollectionJobFVO.jobOnDemand) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(outputFormat, reportingPeriod, jobCollectionFilter, searchTaskFilter, jobOnDemand, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobFVO {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" outputFormat: ").append(toIndentedString(outputFormat)).append("\n"); + sb.append(" reportingPeriod: ").append(toIndentedString(reportingPeriod)).append("\n"); + sb.append(" jobCollectionFilter: ").append(toIndentedString(jobCollectionFilter)).append("\n"); + sb.append(" searchTaskFilter: ").append(toIndentedString(searchTaskFilter)).append("\n"); + sb.append(" jobOnDemand: ").append(toIndentedString(jobOnDemand)).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/pm628/model/MeasurementCollectionJobFilesPreparationErrorEvent.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobFilesPreparationErrorEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..a8372f07ad1a07129839cfdc83e281c9fd7bf1e5 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobFilesPreparationErrorEvent.java @@ -0,0 +1,546 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.ri639.model.EntityRef; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * MeasurementCollectionJobFilesPreparationErrorEvent + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobFilesPreparationErrorEvent { + + private String atType; + + private String atBaseType; + + private String atSchemaLocation; + + private String href; + + private String id; + + private String correlationId; + + private String domain; + + private String title; + + private String description; + + private String priority; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime timeOccurred; + + private EntityRef source; + + private EntityRef reportingSystem; + + @Valid + private List<RelatedPartyRefOrPartyRoleRef> relatedParty = new ArrayList<>(); + + @Valid + private List<Characteristic> analyticCharacteristic = new ArrayList<>(); + + private String eventId; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime eventTime; + + private String eventType; + + private MeasurementCollectionJobFilesPreparationErrorEventPayload event; + + public MeasurementCollectionJobFilesPreparationErrorEvent() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MeasurementCollectionJobFilesPreparationErrorEvent(String atType) { + this.atType = atType; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent 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) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent 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 MeasurementCollectionJobFilesPreparationErrorEvent 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 MeasurementCollectionJobFilesPreparationErrorEvent 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 MeasurementCollectionJobFilesPreparationErrorEvent id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent 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) + @JsonProperty("correlationId") + public String getCorrelationId() { + return correlationId; + } + + public void setCorrelationId(String correlationId) { + this.correlationId = correlationId; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent 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) + @JsonProperty("domain") + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent 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) + @JsonProperty("title") + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent description(String description) { + this.description = description; + return this; + } + + /** + * An explanation of the event. + * @return description + */ + + @Schema(name = "description", description = "An explanation of the event.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent priority(String priority) { + this.priority = priority; + return this; + } + + /** + * A priority. + * @return priority + */ + + @Schema(name = "priority", description = "A priority.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("priority") + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent timeOccurred(OffsetDateTime timeOccurred) { + this.timeOccurred = timeOccurred; + return this; + } + + /** + * The time the event occurred. + * @return timeOccurred + */ + @Valid + @Schema(name = "timeOccurred", description = "The time the event occurred.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("timeOccurred") + public OffsetDateTime getTimeOccurred() { + return timeOccurred; + } + + public void setTimeOccurred(OffsetDateTime timeOccurred) { + this.timeOccurred = timeOccurred; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent source(EntityRef source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @Valid + @Schema(name = "source", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("source") + public EntityRef getSource() { + return source; + } + + public void setSource(EntityRef source) { + this.source = source; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent reportingSystem(EntityRef reportingSystem) { + this.reportingSystem = reportingSystem; + return this; + } + + /** + * Get reportingSystem + * @return reportingSystem + */ + @Valid + @Schema(name = "reportingSystem", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("reportingSystem") + public EntityRef getReportingSystem() { + return reportingSystem; + } + + public void setReportingSystem(EntityRef reportingSystem) { + this.reportingSystem = reportingSystem; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent relatedParty(List<RelatedPartyRefOrPartyRoleRef> relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent addRelatedPartyItem(RelatedPartyRefOrPartyRoleRef relatedPartyItem) { + if (this.relatedParty == null) { + this.relatedParty = new ArrayList<>(); + } + this.relatedParty.add(relatedPartyItem); + return this; + } + + /** + * Collection of related parties + * @return relatedParty + */ + @Valid + @Schema(name = "relatedParty", description = "Collection of related parties", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("relatedParty") + public List<RelatedPartyRefOrPartyRoleRef> getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List<RelatedPartyRefOrPartyRoleRef> relatedParty) { + this.relatedParty = relatedParty; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent analyticCharacteristic(List<Characteristic> analyticCharacteristic) { + this.analyticCharacteristic = analyticCharacteristic; + return this; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent addAnalyticCharacteristicItem(Characteristic analyticCharacteristicItem) { + if (this.analyticCharacteristic == null) { + this.analyticCharacteristic = new ArrayList<>(); + } + this.analyticCharacteristic.add(analyticCharacteristicItem); + return this; + } + + /** + * Collection of analytic characteristics + * @return analyticCharacteristic + */ + @Valid + @Schema(name = "analyticCharacteristic", description = "Collection of analytic characteristics", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("analyticCharacteristic") + public List<Characteristic> getAnalyticCharacteristic() { + return analyticCharacteristic; + } + + public void setAnalyticCharacteristic(List<Characteristic> analyticCharacteristic) { + this.analyticCharacteristic = analyticCharacteristic; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent 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) + @JsonProperty("eventId") + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent 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) + @JsonProperty("eventTime") + public OffsetDateTime getEventTime() { + return eventTime; + } + + public void setEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent 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) + @JsonProperty("eventType") + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public MeasurementCollectionJobFilesPreparationErrorEvent event(MeasurementCollectionJobFilesPreparationErrorEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + @Valid + @Schema(name = "event", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("event") + public MeasurementCollectionJobFilesPreparationErrorEventPayload getEvent() { + return event; + } + + public void setEvent(MeasurementCollectionJobFilesPreparationErrorEventPayload event) { + this.event = event; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobFilesPreparationErrorEvent measurementCollectionJobFilesPreparationErrorEvent = (MeasurementCollectionJobFilesPreparationErrorEvent) o; + return Objects.equals(this.atType, measurementCollectionJobFilesPreparationErrorEvent.atType) && + Objects.equals(this.atBaseType, measurementCollectionJobFilesPreparationErrorEvent.atBaseType) && + Objects.equals(this.atSchemaLocation, measurementCollectionJobFilesPreparationErrorEvent.atSchemaLocation) && + Objects.equals(this.href, measurementCollectionJobFilesPreparationErrorEvent.href) && + Objects.equals(this.id, measurementCollectionJobFilesPreparationErrorEvent.id) && + Objects.equals(this.correlationId, measurementCollectionJobFilesPreparationErrorEvent.correlationId) && + Objects.equals(this.domain, measurementCollectionJobFilesPreparationErrorEvent.domain) && + Objects.equals(this.title, measurementCollectionJobFilesPreparationErrorEvent.title) && + Objects.equals(this.description, measurementCollectionJobFilesPreparationErrorEvent.description) && + Objects.equals(this.priority, measurementCollectionJobFilesPreparationErrorEvent.priority) && + Objects.equals(this.timeOccurred, measurementCollectionJobFilesPreparationErrorEvent.timeOccurred) && + Objects.equals(this.source, measurementCollectionJobFilesPreparationErrorEvent.source) && + Objects.equals(this.reportingSystem, measurementCollectionJobFilesPreparationErrorEvent.reportingSystem) && + Objects.equals(this.relatedParty, measurementCollectionJobFilesPreparationErrorEvent.relatedParty) && + Objects.equals(this.analyticCharacteristic, measurementCollectionJobFilesPreparationErrorEvent.analyticCharacteristic) && + Objects.equals(this.eventId, measurementCollectionJobFilesPreparationErrorEvent.eventId) && + Objects.equals(this.eventTime, measurementCollectionJobFilesPreparationErrorEvent.eventTime) && + Objects.equals(this.eventType, measurementCollectionJobFilesPreparationErrorEvent.eventType) && + Objects.equals(this.event, measurementCollectionJobFilesPreparationErrorEvent.event); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation, href, id, correlationId, domain, title, description, priority, timeOccurred, source, reportingSystem, relatedParty, analyticCharacteristic, eventId, eventTime, eventType, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobFilesPreparationErrorEvent {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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(" timeOccurred: ").append(toIndentedString(timeOccurred)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" reportingSystem: ").append(toIndentedString(reportingSystem)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" analyticCharacteristic: ").append(toIndentedString(analyticCharacteristic)).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(" 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/pm628/model/MeasurementCollectionJobFilesPreparationErrorEventPayload.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobFilesPreparationErrorEventPayload.java new file mode 100644 index 0000000000000000000000000000000000000000..70a68e46f683f3ce4e25a41c976c7d2859f98da2 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobFilesPreparationErrorEventPayload.java @@ -0,0 +1,77 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * MeasurementCollectionJobFilesPreparationErrorEventPayload generic structure + */ + +@Schema(name = "MeasurementCollectionJobFilesPreparationErrorEventPayload", description = "MeasurementCollectionJobFilesPreparationErrorEventPayload generic structure") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobFilesPreparationErrorEventPayload { + + private MeasurementCollectionJob measurementCollectionJob; + + public MeasurementCollectionJobFilesPreparationErrorEventPayload measurementCollectionJob(MeasurementCollectionJob measurementCollectionJob) { + this.measurementCollectionJob = measurementCollectionJob; + return this; + } + + /** + * Get measurementCollectionJob + * @return measurementCollectionJob + */ + @Valid + @Schema(name = "measurementCollectionJob", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("measurementCollectionJob") + public MeasurementCollectionJob getMeasurementCollectionJob() { + return measurementCollectionJob; + } + + public void setMeasurementCollectionJob(MeasurementCollectionJob measurementCollectionJob) { + this.measurementCollectionJob = measurementCollectionJob; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobFilesPreparationErrorEventPayload measurementCollectionJobFilesPreparationErrorEventPayload = (MeasurementCollectionJobFilesPreparationErrorEventPayload) o; + return Objects.equals(this.measurementCollectionJob, measurementCollectionJobFilesPreparationErrorEventPayload.measurementCollectionJob); + } + + @Override + public int hashCode() { + return Objects.hash(measurementCollectionJob); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobFilesPreparationErrorEventPayload {\n"); + sb.append(" measurementCollectionJob: ").append(toIndentedString(measurementCollectionJob)).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/pm628/model/MeasurementCollectionJobFilesReadyEvent.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobFilesReadyEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..643784a64082a6e96b66b2d1e4d64a2e2cb9aa0f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobFilesReadyEvent.java @@ -0,0 +1,546 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.ri639.model.EntityRef; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * MeasurementCollectionJobFilesReadyEvent + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobFilesReadyEvent { + + private String atType; + + private String atBaseType; + + private String atSchemaLocation; + + private String href; + + private String id; + + private String correlationId; + + private String domain; + + private String title; + + private String description; + + private String priority; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime timeOccurred; + + private EntityRef source; + + private EntityRef reportingSystem; + + @Valid + private List<RelatedPartyRefOrPartyRoleRef> relatedParty = new ArrayList<>(); + + @Valid + private List<Characteristic> analyticCharacteristic = new ArrayList<>(); + + private String eventId; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime eventTime; + + private String eventType; + + private MeasurementCollectionJobFilesReadyEventPayload event; + + public MeasurementCollectionJobFilesReadyEvent() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MeasurementCollectionJobFilesReadyEvent(String atType) { + this.atType = atType; + } + + public MeasurementCollectionJobFilesReadyEvent 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) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public MeasurementCollectionJobFilesReadyEvent 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 MeasurementCollectionJobFilesReadyEvent 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 MeasurementCollectionJobFilesReadyEvent 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 MeasurementCollectionJobFilesReadyEvent id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public MeasurementCollectionJobFilesReadyEvent 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) + @JsonProperty("correlationId") + public String getCorrelationId() { + return correlationId; + } + + public void setCorrelationId(String correlationId) { + this.correlationId = correlationId; + } + + public MeasurementCollectionJobFilesReadyEvent 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) + @JsonProperty("domain") + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public MeasurementCollectionJobFilesReadyEvent 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) + @JsonProperty("title") + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public MeasurementCollectionJobFilesReadyEvent description(String description) { + this.description = description; + return this; + } + + /** + * An explanation of the event. + * @return description + */ + + @Schema(name = "description", description = "An explanation of the event.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public MeasurementCollectionJobFilesReadyEvent priority(String priority) { + this.priority = priority; + return this; + } + + /** + * A priority. + * @return priority + */ + + @Schema(name = "priority", description = "A priority.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("priority") + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public MeasurementCollectionJobFilesReadyEvent timeOccurred(OffsetDateTime timeOccurred) { + this.timeOccurred = timeOccurred; + return this; + } + + /** + * The time the event occurred. + * @return timeOccurred + */ + @Valid + @Schema(name = "timeOccurred", description = "The time the event occurred.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("timeOccurred") + public OffsetDateTime getTimeOccurred() { + return timeOccurred; + } + + public void setTimeOccurred(OffsetDateTime timeOccurred) { + this.timeOccurred = timeOccurred; + } + + public MeasurementCollectionJobFilesReadyEvent source(EntityRef source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @Valid + @Schema(name = "source", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("source") + public EntityRef getSource() { + return source; + } + + public void setSource(EntityRef source) { + this.source = source; + } + + public MeasurementCollectionJobFilesReadyEvent reportingSystem(EntityRef reportingSystem) { + this.reportingSystem = reportingSystem; + return this; + } + + /** + * Get reportingSystem + * @return reportingSystem + */ + @Valid + @Schema(name = "reportingSystem", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("reportingSystem") + public EntityRef getReportingSystem() { + return reportingSystem; + } + + public void setReportingSystem(EntityRef reportingSystem) { + this.reportingSystem = reportingSystem; + } + + public MeasurementCollectionJobFilesReadyEvent relatedParty(List<RelatedPartyRefOrPartyRoleRef> relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public MeasurementCollectionJobFilesReadyEvent addRelatedPartyItem(RelatedPartyRefOrPartyRoleRef relatedPartyItem) { + if (this.relatedParty == null) { + this.relatedParty = new ArrayList<>(); + } + this.relatedParty.add(relatedPartyItem); + return this; + } + + /** + * Collection of related parties + * @return relatedParty + */ + @Valid + @Schema(name = "relatedParty", description = "Collection of related parties", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("relatedParty") + public List<RelatedPartyRefOrPartyRoleRef> getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List<RelatedPartyRefOrPartyRoleRef> relatedParty) { + this.relatedParty = relatedParty; + } + + public MeasurementCollectionJobFilesReadyEvent analyticCharacteristic(List<Characteristic> analyticCharacteristic) { + this.analyticCharacteristic = analyticCharacteristic; + return this; + } + + public MeasurementCollectionJobFilesReadyEvent addAnalyticCharacteristicItem(Characteristic analyticCharacteristicItem) { + if (this.analyticCharacteristic == null) { + this.analyticCharacteristic = new ArrayList<>(); + } + this.analyticCharacteristic.add(analyticCharacteristicItem); + return this; + } + + /** + * Collection of analytic characteristics + * @return analyticCharacteristic + */ + @Valid + @Schema(name = "analyticCharacteristic", description = "Collection of analytic characteristics", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("analyticCharacteristic") + public List<Characteristic> getAnalyticCharacteristic() { + return analyticCharacteristic; + } + + public void setAnalyticCharacteristic(List<Characteristic> analyticCharacteristic) { + this.analyticCharacteristic = analyticCharacteristic; + } + + public MeasurementCollectionJobFilesReadyEvent 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) + @JsonProperty("eventId") + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + public MeasurementCollectionJobFilesReadyEvent 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) + @JsonProperty("eventTime") + public OffsetDateTime getEventTime() { + return eventTime; + } + + public void setEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + } + + public MeasurementCollectionJobFilesReadyEvent 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) + @JsonProperty("eventType") + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public MeasurementCollectionJobFilesReadyEvent event(MeasurementCollectionJobFilesReadyEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + @Valid + @Schema(name = "event", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("event") + public MeasurementCollectionJobFilesReadyEventPayload getEvent() { + return event; + } + + public void setEvent(MeasurementCollectionJobFilesReadyEventPayload event) { + this.event = event; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobFilesReadyEvent measurementCollectionJobFilesReadyEvent = (MeasurementCollectionJobFilesReadyEvent) o; + return Objects.equals(this.atType, measurementCollectionJobFilesReadyEvent.atType) && + Objects.equals(this.atBaseType, measurementCollectionJobFilesReadyEvent.atBaseType) && + Objects.equals(this.atSchemaLocation, measurementCollectionJobFilesReadyEvent.atSchemaLocation) && + Objects.equals(this.href, measurementCollectionJobFilesReadyEvent.href) && + Objects.equals(this.id, measurementCollectionJobFilesReadyEvent.id) && + Objects.equals(this.correlationId, measurementCollectionJobFilesReadyEvent.correlationId) && + Objects.equals(this.domain, measurementCollectionJobFilesReadyEvent.domain) && + Objects.equals(this.title, measurementCollectionJobFilesReadyEvent.title) && + Objects.equals(this.description, measurementCollectionJobFilesReadyEvent.description) && + Objects.equals(this.priority, measurementCollectionJobFilesReadyEvent.priority) && + Objects.equals(this.timeOccurred, measurementCollectionJobFilesReadyEvent.timeOccurred) && + Objects.equals(this.source, measurementCollectionJobFilesReadyEvent.source) && + Objects.equals(this.reportingSystem, measurementCollectionJobFilesReadyEvent.reportingSystem) && + Objects.equals(this.relatedParty, measurementCollectionJobFilesReadyEvent.relatedParty) && + Objects.equals(this.analyticCharacteristic, measurementCollectionJobFilesReadyEvent.analyticCharacteristic) && + Objects.equals(this.eventId, measurementCollectionJobFilesReadyEvent.eventId) && + Objects.equals(this.eventTime, measurementCollectionJobFilesReadyEvent.eventTime) && + Objects.equals(this.eventType, measurementCollectionJobFilesReadyEvent.eventType) && + Objects.equals(this.event, measurementCollectionJobFilesReadyEvent.event); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation, href, id, correlationId, domain, title, description, priority, timeOccurred, source, reportingSystem, relatedParty, analyticCharacteristic, eventId, eventTime, eventType, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobFilesReadyEvent {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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(" timeOccurred: ").append(toIndentedString(timeOccurred)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" reportingSystem: ").append(toIndentedString(reportingSystem)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" analyticCharacteristic: ").append(toIndentedString(analyticCharacteristic)).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(" 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/pm628/model/MeasurementCollectionJobFilesReadyEventPayload.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobFilesReadyEventPayload.java new file mode 100644 index 0000000000000000000000000000000000000000..0b35ae5c0ee7983edfa66a1f02708a6aa2fa3e18 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobFilesReadyEventPayload.java @@ -0,0 +1,77 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * MeasurementCollectionJobFilesReadyEventPayload generic structure + */ + +@Schema(name = "MeasurementCollectionJobFilesReadyEventPayload", description = "MeasurementCollectionJobFilesReadyEventPayload generic structure") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobFilesReadyEventPayload { + + private MeasurementCollectionJob measurementCollectionJob; + + public MeasurementCollectionJobFilesReadyEventPayload measurementCollectionJob(MeasurementCollectionJob measurementCollectionJob) { + this.measurementCollectionJob = measurementCollectionJob; + return this; + } + + /** + * Get measurementCollectionJob + * @return measurementCollectionJob + */ + @Valid + @Schema(name = "measurementCollectionJob", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("measurementCollectionJob") + public MeasurementCollectionJob getMeasurementCollectionJob() { + return measurementCollectionJob; + } + + public void setMeasurementCollectionJob(MeasurementCollectionJob measurementCollectionJob) { + this.measurementCollectionJob = measurementCollectionJob; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobFilesReadyEventPayload measurementCollectionJobFilesReadyEventPayload = (MeasurementCollectionJobFilesReadyEventPayload) o; + return Objects.equals(this.measurementCollectionJob, measurementCollectionJobFilesReadyEventPayload.measurementCollectionJob); + } + + @Override + public int hashCode() { + return Objects.hash(measurementCollectionJob); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobFilesReadyEventPayload {\n"); + sb.append(" measurementCollectionJob: ").append(toIndentedString(measurementCollectionJob)).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/pm628/model/MeasurementCollectionJobMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..9ac755d5cdb27a42de7d77f8566ecc3f96771160 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobMVO.java @@ -0,0 +1,267 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.List; +import java.util.Objects; + +/** + * MeasurementCollectionJobMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobMVO extends MeasurementJobMVO { + + @JsonProperty("outputFormat") + private String outputFormat; + + @JsonProperty("reportingPeriod") + private ReportingPeriod reportingPeriod; + + @JsonProperty("jobCollectionFilter") + private DataFilterMapMVO jobCollectionFilter; + + @JsonProperty("searchTaskFilter") + private DataFilterMapMVO searchTaskFilter; + + @JsonProperty("jobOnDemand") + private Boolean jobOnDemand = false; + + public MeasurementCollectionJobMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MeasurementCollectionJobMVO(String atType) { + super(atType); + } + + public MeasurementCollectionJobMVO outputFormat(String outputFormat) { + this.outputFormat = outputFormat; + return this; + } + + /** + * Get outputFormat + * @return outputFormat + */ + + @Schema(name = "outputFormat", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("outputFormat") + public String getOutputFormat() { + return outputFormat; + } + + public void setOutputFormat(String outputFormat) { + this.outputFormat = outputFormat; + } + + public MeasurementCollectionJobMVO reportingPeriod(ReportingPeriod reportingPeriod) { + this.reportingPeriod = reportingPeriod; + return this; + } + + /** + * Get reportingPeriod + * @return reportingPeriod + */ + @Valid + @Schema(name = "reportingPeriod", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("reportingPeriod") + public ReportingPeriod getReportingPeriod() { + return reportingPeriod; + } + + public void setReportingPeriod(ReportingPeriod reportingPeriod) { + this.reportingPeriod = reportingPeriod; + } + + public MeasurementCollectionJobMVO jobCollectionFilter(DataFilterMapMVO jobCollectionFilter) { + this.jobCollectionFilter = jobCollectionFilter; + return this; + } + + /** + * Get jobCollectionFilter + * @return jobCollectionFilter + */ + @Valid + @Schema(name = "jobCollectionFilter", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("jobCollectionFilter") + public DataFilterMapMVO getJobCollectionFilter() { + return jobCollectionFilter; + } + + public void setJobCollectionFilter(DataFilterMapMVO jobCollectionFilter) { + this.jobCollectionFilter = jobCollectionFilter; + } + + public MeasurementCollectionJobMVO searchTaskFilter(DataFilterMapMVO searchTaskFilter) { + this.searchTaskFilter = searchTaskFilter; + return this; + } + + /** + * Get searchTaskFilter + * @return searchTaskFilter + */ + @Valid + @Schema(name = "searchTaskFilter", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("searchTaskFilter") + public DataFilterMapMVO getSearchTaskFilter() { + return searchTaskFilter; + } + + public void setSearchTaskFilter(DataFilterMapMVO searchTaskFilter) { + this.searchTaskFilter = searchTaskFilter; + } + + public MeasurementCollectionJobMVO jobOnDemand(Boolean jobOnDemand) { + this.jobOnDemand = jobOnDemand; + return this; + } + + /** + * True if the job is a single job to be executed immediately in which case the reportingPeriod and scheduleDefinition would not be applicable, false otherwise + * @return jobOnDemand + */ + + @Schema(name = "jobOnDemand", description = "True if the job is a single job to be executed immediately in which case the reportingPeriod and scheduleDefinition would not be applicable, false otherwise", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("jobOnDemand") + public Boolean getJobOnDemand() { + return jobOnDemand; + } + + public void setJobOnDemand(Boolean jobOnDemand) { + this.jobOnDemand = jobOnDemand; + } + + + public MeasurementCollectionJobMVO consumingApplicationId(String consumingApplicationId) { + super.consumingApplicationId(consumingApplicationId); + return this; + } + + public MeasurementCollectionJobMVO producingApplicationId(String producingApplicationId) { + super.producingApplicationId(producingApplicationId); + return this; + } + + public MeasurementCollectionJobMVO granularity(Granularity granularity) { + super.granularity(granularity); + return this; + } + + public MeasurementCollectionJobMVO performanceIndicatorGroupSpecification(List<PerformanceIndicatorGroupSpecificationMVO> performanceIndicatorGroupSpecification) { + super.performanceIndicatorGroupSpecification(performanceIndicatorGroupSpecification); + return this; + } + + public MeasurementCollectionJobMVO addPerformanceIndicatorGroupSpecificationItem(PerformanceIndicatorGroupSpecificationMVO performanceIndicatorGroupSpecificationItem) { + super.addPerformanceIndicatorGroupSpecificationItem(performanceIndicatorGroupSpecificationItem); + return this; + } + + public MeasurementCollectionJobMVO performanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValueMVO> performanceIndicatorSpecification) { + super.performanceIndicatorSpecification(performanceIndicatorSpecification); + return this; + } + + public MeasurementCollectionJobMVO addPerformanceIndicatorSpecificationItem(PerformanceIndicatorSpecificationRefOrValueMVO performanceIndicatorSpecificationItem) { + super.addPerformanceIndicatorSpecificationItem(performanceIndicatorSpecificationItem); + return this; + } + + public MeasurementCollectionJobMVO trackingRecord(List<TrackingRecordMVO> trackingRecord) { + super.trackingRecord(trackingRecord); + return this; + } + + public MeasurementCollectionJobMVO addTrackingRecordItem(TrackingRecordMVO trackingRecordItem) { + super.addTrackingRecordItem(trackingRecordItem); + return this; + } + + public MeasurementCollectionJobMVO fileTransferData(List<FileTransferDataMVO> fileTransferData) { + super.fileTransferData(fileTransferData); + return this; + } + + public MeasurementCollectionJobMVO addFileTransferDataItem(FileTransferDataMVO fileTransferDataItem) { + super.addFileTransferDataItem(fileTransferDataItem); + return this; + } + + public MeasurementCollectionJobMVO dataAccessEndpoint(List<DataAccessEndpointMVO> dataAccessEndpoint) { + super.dataAccessEndpoint(dataAccessEndpoint); + return this; + } + + public MeasurementCollectionJobMVO addDataAccessEndpointItem(DataAccessEndpointMVO dataAccessEndpointItem) { + super.addDataAccessEndpointItem(dataAccessEndpointItem); + return this; + } + + public MeasurementCollectionJobMVO scheduleDefinition(List<ScheduleDefinitionMVO> scheduleDefinition) { + super.scheduleDefinition(scheduleDefinition); + return this; + } + + public MeasurementCollectionJobMVO addScheduleDefinitionItem(ScheduleDefinitionMVO scheduleDefinitionItem) { + super.addScheduleDefinitionItem(scheduleDefinitionItem); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobMVO measurementCollectionJobMVO = (MeasurementCollectionJobMVO) o; + return Objects.equals(this.outputFormat, measurementCollectionJobMVO.outputFormat) && + Objects.equals(this.reportingPeriod, measurementCollectionJobMVO.reportingPeriod) && + Objects.equals(this.jobCollectionFilter, measurementCollectionJobMVO.jobCollectionFilter) && + Objects.equals(this.searchTaskFilter, measurementCollectionJobMVO.searchTaskFilter) && + Objects.equals(this.jobOnDemand, measurementCollectionJobMVO.jobOnDemand) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(outputFormat, reportingPeriod, jobCollectionFilter, searchTaskFilter, jobOnDemand, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobMVO {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" outputFormat: ").append(toIndentedString(outputFormat)).append("\n"); + sb.append(" reportingPeriod: ").append(toIndentedString(reportingPeriod)).append("\n"); + sb.append(" jobCollectionFilter: ").append(toIndentedString(jobCollectionFilter)).append("\n"); + sb.append(" searchTaskFilter: ").append(toIndentedString(searchTaskFilter)).append("\n"); + sb.append(" jobOnDemand: ").append(toIndentedString(jobOnDemand)).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/pm628/model/MeasurementCollectionJobMapper.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..a1244ba8131e847073385340730ebf61c70f2ab2 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobMapper.java @@ -0,0 +1,26 @@ +package org.etsi.osl.tmf.pm628.model; + +import org.mapstruct.*; + +@Mapper( + nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT, + nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, + collectionMappingStrategy = CollectionMappingStrategy.ACCESSOR_ONLY, // Collection- or map-typed properties of the target bean to be updated will be cleared and then populated with the values from the corresponding source collection or map + uses = { + PerformanceIndicatorSpecificationRefOrValueMapper.class, + PartyRefOrPartyRoleRefMapper.class, + ResourceRefOrValueMapper.class + } +) +public interface MeasurementCollectionJobMapper { + + MeasurementCollectionJob createMeasurementCollectionJob(MeasurementCollectionJobFVO measurementCollectionJobFVO); + + @Mapping(target = "type", ignore = true) + @Mapping(target = "baseType", ignore = true) + @Mapping(target = "schemaLocation", ignore = true) + @Mapping(target = "href", ignore = true) + @Mapping(target = "uuid", ignore = true) + @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE) + MeasurementCollectionJob updateMeasurementCollectionJob(MeasurementCollectionJobMVO measurementCollectionJobMVO, @MappingTarget MeasurementCollectionJob measurementCollectionJob); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobRef.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobRef.java new file mode 100644 index 0000000000000000000000000000000000000000..2a2bfff9d6821d47fb7367427516ac06b4226dfe --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementCollectionJobRef.java @@ -0,0 +1,241 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * Reference to a MeasurementCollectionJob + */ + +@Schema(name = "MeasurementCollectionJobRef", description = "Reference to a MeasurementCollectionJob") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementCollectionJobRef { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + public MeasurementCollectionJobRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MeasurementCollectionJobRef(String type, String id) { + this.type = type; + this.id = id; + } + + public MeasurementCollectionJobRef type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public MeasurementCollectionJobRef baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public MeasurementCollectionJobRef schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public MeasurementCollectionJobRef href(String href) { + this.href = href; + return this; + } + + /** + * The URI of the referred entity. + * @return href + */ + + @Schema(name = "href", description = "The URI of the referred entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("href") + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public MeasurementCollectionJobRef id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the referred entity. + * @return id + */ + @NotNull + @Schema(name = "id", description = "The identifier of the referred entity.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public MeasurementCollectionJobRef 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public MeasurementCollectionJobRef referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementCollectionJobRef measurementCollectionJobRef = (MeasurementCollectionJobRef) o; + return Objects.equals(this.type, measurementCollectionJobRef.type) && + Objects.equals(this.baseType, measurementCollectionJobRef.baseType) && + Objects.equals(this.schemaLocation, measurementCollectionJobRef.schemaLocation) && + Objects.equals(this.href, measurementCollectionJobRef.href) && + Objects.equals(this.id, measurementCollectionJobRef.id) && + Objects.equals(this.name, measurementCollectionJobRef.name) && + Objects.equals(this.referredType, measurementCollectionJobRef.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, name, referredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementCollectionJobRef {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).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/pm628/model/MeasurementJob.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementJob.java new file mode 100644 index 0000000000000000000000000000000000000000..c6056ebd771fb55d5acdc5810efa731ccb64ccac --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementJob.java @@ -0,0 +1,398 @@ +package org.etsi.osl.tmf.pm628.model; + +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.*; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.validation.Valid; +import jakarta.validation.constraints.Size; +import org.hibernate.annotations.*; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * MeasurementJob + */ + +@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 = MeasurementCollectionJob.class, name = "MeasurementCollectionJob") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_MeasJob") +public class MeasurementJob extends ManagementJob { + + @JsonProperty("consumingApplicationId") + private String consumingApplicationId; + + @JsonProperty("producingApplicationId") + private String producingApplicationId; + + @JsonProperty("granularity") + private Granularity granularity; + + @JsonProperty("performanceIndicatorGroupSpecification") + @Valid + @ManyToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_meas_job_perf_ind_group_spec", + joinColumns = @JoinColumn(name = "meas_job_uuid"), + inverseJoinColumns = @JoinColumn(name = "perf_ind_group_spec_uuid") + ) + private List<PerformanceIndicatorGroupSpecification> performanceIndicatorGroupSpecification = new ArrayList<>(); + + @JsonProperty("performanceIndicatorSpecification") + @Valid + @ManyToAny + @AnyDiscriminator(DiscriminatorType.STRING) + @Column(name = "perf_ind_spec_type") + @AnyKeyJavaClass(String.class) + @AnyDiscriminatorValue(discriminator = "value", entity = PerformanceIndicatorSpecification.class) + @AnyDiscriminatorValue(discriminator = "ref", entity = PerformanceIndicatorSpecificationRef.class) + @Cascade(org.hibernate.annotations.CascadeType.MERGE) + @JoinTable( + name = "pm628_meas_job_perf_ind_specs", + joinColumns = @JoinColumn(name = "meas_job_uuid"), + inverseJoinColumns = @JoinColumn(name = "perf_ind_spec_uuid") + ) + private List<@Valid PerformanceIndicatorSpecificationRefOrValue> performanceIndicatorSpecification = new ArrayList<>(); + + @JsonProperty("trackingRecord") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_meas_job_track_rec", + joinColumns = @JoinColumn(name = "meas_job_uuid"), + inverseJoinColumns = @JoinColumn(name = "track_rec_uuid") + ) + private List<TrackingRecord> trackingRecord = new ArrayList<>(); + + @JsonProperty("monitoredInstancesCriteria") + @Embedded + private MonitoredInstancesCriteria monitoredInstancesCriteria; + + @JsonProperty("monitoredClassCriteria") + @Embedded + private MonitoredClassCriteria monitoredClassCriteria; + + public MeasurementJob() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MeasurementJob(String atType) { + super(atType); + } + + public MeasurementJob consumingApplicationId(String consumingApplicationId) { + this.consumingApplicationId = consumingApplicationId; + return this; + } + + /** + * The identifier of the application that consumes performance indicators. + * @return consumingApplicationId + */ + + @Schema(name = "consumingApplicationId", description = "The identifier of the application that consumes performance indicators.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("consumingApplicationId") + public String getConsumingApplicationId() { + return consumingApplicationId; + } + + public void setConsumingApplicationId(String consumingApplicationId) { + this.consumingApplicationId = consumingApplicationId; + } + + public MeasurementJob producingApplicationId(String producingApplicationId) { + this.producingApplicationId = producingApplicationId; + return this; + } + + /** + * The identifier of the application that produces performance indicators. + * @return producingApplicationId + */ + + @Schema(name = "producingApplicationId", description = "The identifier of the application that produces performance indicators.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("producingApplicationId") + public String getProducingApplicationId() { + return producingApplicationId; + } + + public void setProducingApplicationId(String producingApplicationId) { + this.producingApplicationId = producingApplicationId; + } + + public MeasurementJob granularity(Granularity granularity) { + this.granularity = granularity; + return this; + } + + /** + * Get granularity + * @return granularity + */ + @Valid + @Schema(name = "granularity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("granularity") + public Granularity getGranularity() { + return granularity; + } + + public void setGranularity(Granularity granularity) { + this.granularity = granularity; + } + + public MeasurementJob performanceIndicatorGroupSpecification(List<PerformanceIndicatorGroupSpecification> performanceIndicatorGroupSpecification) { + this.performanceIndicatorGroupSpecification = performanceIndicatorGroupSpecification; + return this; + } + + public MeasurementJob addPerformanceIndicatorGroupSpecificationItem(PerformanceIndicatorGroupSpecification performanceIndicatorGroupSpecificationItem) { + if (this.performanceIndicatorGroupSpecification == null) { + this.performanceIndicatorGroupSpecification = new ArrayList<>(); + } + this.performanceIndicatorGroupSpecification.add(performanceIndicatorGroupSpecificationItem); + return this; + } + + /** + * Get performanceIndicatorGroupSpecification + * @return performanceIndicatorGroupSpecification + */ + @Valid @Size(min = 0) + @Schema(name = "performanceIndicatorGroupSpecification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorGroupSpecification") + public List<PerformanceIndicatorGroupSpecification> getPerformanceIndicatorGroupSpecification() { + return performanceIndicatorGroupSpecification; + } + + public void setPerformanceIndicatorGroupSpecification(List<PerformanceIndicatorGroupSpecification> performanceIndicatorGroupSpecification) { + this.performanceIndicatorGroupSpecification = performanceIndicatorGroupSpecification; + } + + public MeasurementJob performanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValue> performanceIndicatorSpecification) { + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + return this; + } + + public MeasurementJob addPerformanceIndicatorSpecificationItem(PerformanceIndicatorSpecificationRefOrValue performanceIndicatorSpecificationItem) { + if (this.performanceIndicatorSpecification == null) { + this.performanceIndicatorSpecification = new ArrayList<>(); + } + this.performanceIndicatorSpecification.add(performanceIndicatorSpecificationItem); + return this; + } + + /** + * Get performanceIndicatorSpecification + * @return performanceIndicatorSpecification + */ + @Valid @Size(min = 0) + @Schema(name = "performanceIndicatorSpecification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorSpecification") + public List<@Valid PerformanceIndicatorSpecificationRefOrValue> getPerformanceIndicatorSpecification() { + return performanceIndicatorSpecification; + } + + public void setPerformanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValue> performanceIndicatorSpecification) { + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + } + + public MeasurementJob trackingRecord(List<TrackingRecord> trackingRecord) { + this.trackingRecord = trackingRecord; + return this; + } + + public MeasurementJob addTrackingRecordItem(TrackingRecord trackingRecordItem) { + if (this.trackingRecord == null) { + this.trackingRecord = new ArrayList<>(); + } + this.trackingRecord.add(trackingRecordItem); + return this; + } + + /** + * Get trackingRecord + * @return trackingRecord + */ + @Valid @Size(min = 0) + @Schema(name = "trackingRecord", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("trackingRecord") + public List<TrackingRecord> getTrackingRecord() { + return trackingRecord; + } + + public void setTrackingRecord(List<TrackingRecord> trackingRecord) { + this.trackingRecord = trackingRecord; + } + + public MeasurementJob monitoredInstancesCriteria(MonitoredInstancesCriteria monitoredInstancesCriteria) { + this.monitoredInstancesCriteria = monitoredInstancesCriteria; + return this; + } + + /** + * Get monitoredInstancesCriteria + * @return monitoredInstancesCriteria + */ + @Valid + @Schema(name = "monitoredInstancesCriteria", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("monitoredInstancesCriteria") + public MonitoredInstancesCriteria getMonitoredInstancesCriteria() { + return monitoredInstancesCriteria; + } + + public void setMonitoredInstancesCriteria(MonitoredInstancesCriteria monitoredInstancesCriteria) { + this.monitoredInstancesCriteria = monitoredInstancesCriteria; + } + + public MeasurementJob monitoredClassCriteria(MonitoredClassCriteria monitoredClassCriteria) { + this.monitoredClassCriteria = monitoredClassCriteria; + return this; + } + + /** + * Get monitoredClassCriteria + * @return monitoredClassCriteria + */ + @Valid + @Schema(name = "monitoredClassCriteria", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("monitoredClassCriteria") + public MonitoredClassCriteria getMonitoredClassCriteria() { + return monitoredClassCriteria; + } + + public void setMonitoredClassCriteria(MonitoredClassCriteria monitoredClassCriteria) { + this.monitoredClassCriteria = monitoredClassCriteria; + } + + public MeasurementJob adminState(AdministrativeState adminState) { + super.adminState(adminState); + return this; + } + + public MeasurementJob creationTime(OffsetDateTime creationTime) { + super.creationTime(creationTime); + return this; + } + + public MeasurementJob executionState(ExecutionStateType executionState) { + super.executionState(executionState); + return this; + } + + public MeasurementJob fileTransferData(List<FileTransferData> fileTransferData) { + super.fileTransferData(fileTransferData); + return this; + } + + public MeasurementJob addFileTransferDataItem(FileTransferData fileTransferDataItem) { + super.addFileTransferDataItem(fileTransferDataItem); + return this; + } + + public MeasurementJob dataAccessEndpoint(List<DataAccessEndpoint> dataAccessEndpoint) { + super.dataAccessEndpoint(dataAccessEndpoint); + return this; + } + + public MeasurementJob addDataAccessEndpointItem(DataAccessEndpoint dataAccessEndpointItem) { + super.addDataAccessEndpointItem(dataAccessEndpointItem); + return this; + } + + public MeasurementJob jobId(String jobId) { + super.jobId(jobId); + return this; + } + + public MeasurementJob jobPriority(Integer jobPriority) { + super.jobPriority(jobPriority); + return this; + } + + public MeasurementJob lastModifiedTime(OffsetDateTime lastModifiedTime) { + super.lastModifiedTime(lastModifiedTime); + return this; + } + + public MeasurementJob scheduleDefinition(List<ScheduleDefinition> scheduleDefinition) { + super.scheduleDefinition(scheduleDefinition); + return this; + } + + public MeasurementJob addScheduleDefinitionItem(ScheduleDefinition scheduleDefinitionItem) { + super.addScheduleDefinitionItem(scheduleDefinitionItem); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementJob measurementJob = (MeasurementJob) o; + return Objects.equals(this.consumingApplicationId, measurementJob.consumingApplicationId) && + Objects.equals(this.producingApplicationId, measurementJob.producingApplicationId) && + Objects.equals(this.granularity, measurementJob.granularity) && + Objects.equals(this.performanceIndicatorGroupSpecification, measurementJob.performanceIndicatorGroupSpecification) && + Objects.equals(this.performanceIndicatorSpecification, measurementJob.performanceIndicatorSpecification) && + Objects.equals(this.trackingRecord, measurementJob.trackingRecord) && + Objects.equals(this.monitoredInstancesCriteria, measurementJob.monitoredInstancesCriteria) && + Objects.equals(this.monitoredClassCriteria, measurementJob.monitoredClassCriteria) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(consumingApplicationId, producingApplicationId, granularity, performanceIndicatorGroupSpecification, performanceIndicatorSpecification, trackingRecord, monitoredInstancesCriteria, monitoredClassCriteria, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementJob {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" consumingApplicationId: ").append(toIndentedString(consumingApplicationId)).append("\n"); + sb.append(" producingApplicationId: ").append(toIndentedString(producingApplicationId)).append("\n"); + sb.append(" granularity: ").append(toIndentedString(granularity)).append("\n"); + sb.append(" performanceIndicatorGroupSpecification: ").append(toIndentedString(performanceIndicatorGroupSpecification)).append("\n"); + sb.append(" performanceIndicatorSpecification: ").append(toIndentedString(performanceIndicatorSpecification)).append("\n"); + sb.append(" trackingRecord: ").append(toIndentedString(trackingRecord)).append("\n"); + sb.append(" monitoredInstancesCriteria: ").append(toIndentedString(monitoredInstancesCriteria)).append("\n"); + sb.append(" monitoredClassCriteria: ").append(toIndentedString(monitoredClassCriteria)).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/pm628/model/MeasurementJobFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementJobFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..4c321c728727dc14f9aa1f06e82265b32e76948a --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementJobFVO.java @@ -0,0 +1,372 @@ +package org.etsi.osl.tmf.pm628.model; + +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.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * MeasurementJobFVO + */ + +@JsonIgnoreProperties( + ignoreUnknown = true, + 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 = MeasurementCollectionJobFVO.class, name = "MeasurementCollectionJob") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementJobFVO extends ManagementJobFVO { + + @JsonProperty("consumingApplicationId") + private String consumingApplicationId; + + @JsonProperty("producingApplicationId") + private String producingApplicationId; + + @JsonProperty("granularity") + private Granularity granularity; + + @JsonProperty("performanceIndicatorGroupSpecification") + @Valid + private List<PerformanceIndicatorGroupSpecificationFVO> performanceIndicatorGroupSpecification = new ArrayList<>(); + + @JsonProperty("performanceIndicatorSpecification") + @Valid + private List<@Valid PerformanceIndicatorSpecificationRefOrValueFVO> performanceIndicatorSpecification = new ArrayList<>(); + + @JsonProperty("trackingRecord") + @Valid + private List<TrackingRecordFVO> trackingRecord = new ArrayList<>(); + + @JsonProperty("monitoredInstancesCriteria") + private MonitoredInstancesCriteriaFVO monitoredInstancesCriteria; + + @JsonProperty("monitoredClassCriteria") + private MonitoredClassCriteriaFVO monitoredClassCriteria; + + public MeasurementJobFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MeasurementJobFVO(String consumingApplicationId, String producingApplicationId, List<@Valid PerformanceIndicatorSpecificationRefOrValueFVO> performanceIndicatorSpecification, String atType) { + super(atType); + this.consumingApplicationId = consumingApplicationId; + this.producingApplicationId = producingApplicationId; + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + } + + public MeasurementJobFVO consumingApplicationId(String consumingApplicationId) { + this.consumingApplicationId = consumingApplicationId; + return this; + } + + /** + * The identifier of the application that consumes performance indicators. + * @return consumingApplicationId + */ + @NotNull + @Schema(name = "consumingApplicationId", description = "The identifier of the application that consumes performance indicators.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("consumingApplicationId") + public String getConsumingApplicationId() { + return consumingApplicationId; + } + + public void setConsumingApplicationId(String consumingApplicationId) { + this.consumingApplicationId = consumingApplicationId; + } + + public MeasurementJobFVO producingApplicationId(String producingApplicationId) { + this.producingApplicationId = producingApplicationId; + return this; + } + + /** + * The identifier of the application that produces performance indicators. + * @return producingApplicationId + */ + @NotNull + @Schema(name = "producingApplicationId", description = "The identifier of the application that produces performance indicators.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("producingApplicationId") + public String getProducingApplicationId() { + return producingApplicationId; + } + + public void setProducingApplicationId(String producingApplicationId) { + this.producingApplicationId = producingApplicationId; + } + + public MeasurementJobFVO granularity(Granularity granularity) { + this.granularity = granularity; + return this; + } + + /** + * Get granularity + * @return granularity + */ + @Valid + @Schema(name = "granularity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("granularity") + public Granularity getGranularity() { + return granularity; + } + + public void setGranularity(Granularity granularity) { + this.granularity = granularity; + } + + public MeasurementJobFVO performanceIndicatorGroupSpecification(List<PerformanceIndicatorGroupSpecificationFVO> performanceIndicatorGroupSpecification) { + this.performanceIndicatorGroupSpecification = performanceIndicatorGroupSpecification; + return this; + } + + public MeasurementJobFVO addPerformanceIndicatorGroupSpecificationItem(PerformanceIndicatorGroupSpecificationFVO performanceIndicatorGroupSpecificationItem) { + if (this.performanceIndicatorGroupSpecification == null) { + this.performanceIndicatorGroupSpecification = new ArrayList<>(); + } + this.performanceIndicatorGroupSpecification.add(performanceIndicatorGroupSpecificationItem); + return this; + } + + /** + * Get performanceIndicatorGroupSpecification + * @return performanceIndicatorGroupSpecification + */ + @Valid @Size(min = 0) + @Schema(name = "performanceIndicatorGroupSpecification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorGroupSpecification") + public List<PerformanceIndicatorGroupSpecificationFVO> getPerformanceIndicatorGroupSpecification() { + return performanceIndicatorGroupSpecification; + } + + public void setPerformanceIndicatorGroupSpecification(List<PerformanceIndicatorGroupSpecificationFVO> performanceIndicatorGroupSpecification) { + this.performanceIndicatorGroupSpecification = performanceIndicatorGroupSpecification; + } + + public MeasurementJobFVO performanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValueFVO> performanceIndicatorSpecification) { + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + return this; + } + + public MeasurementJobFVO addPerformanceIndicatorSpecificationItem(PerformanceIndicatorSpecificationRefOrValueFVO performanceIndicatorSpecificationItem) { + if (this.performanceIndicatorSpecification == null) { + this.performanceIndicatorSpecification = new ArrayList<>(); + } + this.performanceIndicatorSpecification.add(performanceIndicatorSpecificationItem); + return this; + } + + /** + * Get performanceIndicatorSpecification + * @return performanceIndicatorSpecification + */ + @NotNull @Valid @Size(min = 0) + @Schema(name = "performanceIndicatorSpecification", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("performanceIndicatorSpecification") + public List<@Valid PerformanceIndicatorSpecificationRefOrValueFVO> getPerformanceIndicatorSpecification() { + return performanceIndicatorSpecification; + } + + public void setPerformanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValueFVO> performanceIndicatorSpecification) { + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + } + + public MeasurementJobFVO trackingRecord(List<TrackingRecordFVO> trackingRecord) { + this.trackingRecord = trackingRecord; + return this; + } + + public MeasurementJobFVO addTrackingRecordItem(TrackingRecordFVO trackingRecordItem) { + if (this.trackingRecord == null) { + this.trackingRecord = new ArrayList<>(); + } + this.trackingRecord.add(trackingRecordItem); + return this; + } + + /** + * Get trackingRecord + * @return trackingRecord + */ + @Valid @Size(min = 0) + @Schema(name = "trackingRecord", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("trackingRecord") + public List<TrackingRecordFVO> getTrackingRecord() { + return trackingRecord; + } + + public void setTrackingRecord(List<TrackingRecordFVO> trackingRecord) { + this.trackingRecord = trackingRecord; + } + + public MeasurementJobFVO monitoredInstancesCriteria(MonitoredInstancesCriteriaFVO monitoredInstancesCriteria) { + this.monitoredInstancesCriteria = monitoredInstancesCriteria; + return this; + } + + /** + * Get monitoredInstancesCriteria + * @return monitoredInstancesCriteria + */ + @Valid + @Schema(name = "monitoredInstancesCriteria", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("monitoredInstancesCriteria") + public MonitoredInstancesCriteriaFVO getMonitoredInstancesCriteria() { + return monitoredInstancesCriteria; + } + + public void setMonitoredInstancesCriteria(MonitoredInstancesCriteriaFVO monitoredInstancesCriteria) { + this.monitoredInstancesCriteria = monitoredInstancesCriteria; + } + + public MeasurementJobFVO monitoredClassCriteria(MonitoredClassCriteriaFVO monitoredClassCriteria) { + this.monitoredClassCriteria = monitoredClassCriteria; + return this; + } + + /** + * Get monitoredClassCriteria + * @return monitoredClassCriteria + */ + @Valid + @Schema(name = "monitoredClassCriteria", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("monitoredClassCriteria") + public MonitoredClassCriteriaFVO getMonitoredClassCriteria() { + return monitoredClassCriteria; + } + + public void setMonitoredClassCriteria(MonitoredClassCriteriaFVO monitoredClassCriteria) { + this.monitoredClassCriteria = monitoredClassCriteria; + } + + public MeasurementJobFVO adminState(AdministrativeState adminState) { + super.adminState(adminState); + return this; + } + + public MeasurementJobFVO creationTime(OffsetDateTime creationTime) { + super.creationTime(creationTime); + return this; + } + + public MeasurementJobFVO executionState(ExecutionStateType executionState) { + super.executionState(executionState); + return this; + } + + public MeasurementJobFVO fileTransferData(List<FileTransferDataFVO> fileTransferData) { + super.fileTransferData(fileTransferData); + return this; + } + + public MeasurementJobFVO addFileTransferDataItem(FileTransferDataFVO fileTransferDataItem) { + super.addFileTransferDataItem(fileTransferDataItem); + return this; + } + + public MeasurementJobFVO dataAccessEndpoint(List<DataAccessEndpointFVO> dataAccessEndpoint) { + super.dataAccessEndpoint(dataAccessEndpoint); + return this; + } + + public MeasurementJobFVO addDataAccessEndpointItem(DataAccessEndpointFVO dataAccessEndpointItem) { + super.addDataAccessEndpointItem(dataAccessEndpointItem); + return this; + } + + public MeasurementJobFVO jobId(String jobId) { + super.jobId(jobId); + return this; + } + + public MeasurementJobFVO jobPriority(Integer jobPriority) { + super.jobPriority(jobPriority); + return this; + } + + public MeasurementJobFVO lastModifiedTime(OffsetDateTime lastModifiedTime) { + super.lastModifiedTime(lastModifiedTime); + return this; + } + + public MeasurementJobFVO scheduleDefinition(List<ScheduleDefinitionFVO> scheduleDefinition) { + super.scheduleDefinition(scheduleDefinition); + return this; + } + + public MeasurementJobFVO addScheduleDefinitionItem(ScheduleDefinitionFVO scheduleDefinitionItem) { + super.addScheduleDefinitionItem(scheduleDefinitionItem); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementJobFVO measurementJobFVO = (MeasurementJobFVO) o; + return Objects.equals(this.consumingApplicationId, measurementJobFVO.consumingApplicationId) && + Objects.equals(this.producingApplicationId, measurementJobFVO.producingApplicationId) && + Objects.equals(this.granularity, measurementJobFVO.granularity) && + Objects.equals(this.performanceIndicatorGroupSpecification, measurementJobFVO.performanceIndicatorGroupSpecification) && + Objects.equals(this.performanceIndicatorSpecification, measurementJobFVO.performanceIndicatorSpecification) && + Objects.equals(this.trackingRecord, measurementJobFVO.trackingRecord) && + Objects.equals(this.monitoredInstancesCriteria, measurementJobFVO.monitoredInstancesCriteria) && + Objects.equals(this.monitoredClassCriteria, measurementJobFVO.monitoredClassCriteria) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(consumingApplicationId, producingApplicationId, granularity, performanceIndicatorGroupSpecification, performanceIndicatorSpecification, trackingRecord, monitoredInstancesCriteria, monitoredClassCriteria, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementJobFVO {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" consumingApplicationId: ").append(toIndentedString(consumingApplicationId)).append("\n"); + sb.append(" producingApplicationId: ").append(toIndentedString(producingApplicationId)).append("\n"); + sb.append(" granularity: ").append(toIndentedString(granularity)).append("\n"); + sb.append(" performanceIndicatorGroupSpecification: ").append(toIndentedString(performanceIndicatorGroupSpecification)).append("\n"); + sb.append(" performanceIndicatorSpecification: ").append(toIndentedString(performanceIndicatorSpecification)).append("\n"); + sb.append(" trackingRecord: ").append(toIndentedString(trackingRecord)).append("\n"); + sb.append(" monitoredInstancesCriteria: ").append(toIndentedString(monitoredInstancesCriteria)).append("\n"); + sb.append(" monitoredClassCriteria: ").append(toIndentedString(monitoredClassCriteria)).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/pm628/model/MeasurementJobMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementJobMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..02d6e767aaeb5810b195369f9cccc86b108311a2 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MeasurementJobMVO.java @@ -0,0 +1,287 @@ +package org.etsi.osl.tmf.pm628.model; + +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.Valid; +import jakarta.validation.constraints.Size; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * MeasurementJobMVO + */ + +@JsonIgnoreProperties( + ignoreUnknown = true, + 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 = MeasurementCollectionJobMVO.class, name = "MeasurementCollectionJob") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MeasurementJobMVO extends ManagementJobMVO { + + @JsonProperty("consumingApplicationId") + private String consumingApplicationId; + + @JsonProperty("producingApplicationId") + private String producingApplicationId; + + @JsonProperty("granularity") + private Granularity granularity; + + @JsonProperty("performanceIndicatorGroupSpecification") + @Valid + private List<PerformanceIndicatorGroupSpecificationMVO> performanceIndicatorGroupSpecification = new ArrayList<>(); + + @JsonProperty("performanceIndicatorSpecification") + @Valid + private List<@Valid PerformanceIndicatorSpecificationRefOrValueMVO> performanceIndicatorSpecification = new ArrayList<>(); + + @JsonProperty("trackingRecord") + @Valid + private List<TrackingRecordMVO> trackingRecord = new ArrayList<>(); + + public MeasurementJobMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MeasurementJobMVO(String atType) { + super(atType); + } + + public MeasurementJobMVO consumingApplicationId(String consumingApplicationId) { + this.consumingApplicationId = consumingApplicationId; + return this; + } + + /** + * The identifier of the application that consumes performance indicators. + * @return consumingApplicationId + */ + + @Schema(name = "consumingApplicationId", description = "The identifier of the application that consumes performance indicators.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("consumingApplicationId") + public String getConsumingApplicationId() { + return consumingApplicationId; + } + + public void setConsumingApplicationId(String consumingApplicationId) { + this.consumingApplicationId = consumingApplicationId; + } + + public MeasurementJobMVO producingApplicationId(String producingApplicationId) { + this.producingApplicationId = producingApplicationId; + return this; + } + + /** + * The identifier of the application that produces performance indicators. + * @return producingApplicationId + */ + + @Schema(name = "producingApplicationId", description = "The identifier of the application that produces performance indicators.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("producingApplicationId") + public String getProducingApplicationId() { + return producingApplicationId; + } + + public void setProducingApplicationId(String producingApplicationId) { + this.producingApplicationId = producingApplicationId; + } + + public MeasurementJobMVO granularity(Granularity granularity) { + this.granularity = granularity; + return this; + } + + /** + * Get granularity + * @return granularity + */ + @Valid + @Schema(name = "granularity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("granularity") + public Granularity getGranularity() { + return granularity; + } + + public void setGranularity(Granularity granularity) { + this.granularity = granularity; + } + + public MeasurementJobMVO performanceIndicatorGroupSpecification(List<PerformanceIndicatorGroupSpecificationMVO> performanceIndicatorGroupSpecification) { + this.performanceIndicatorGroupSpecification = performanceIndicatorGroupSpecification; + return this; + } + + public MeasurementJobMVO addPerformanceIndicatorGroupSpecificationItem(PerformanceIndicatorGroupSpecificationMVO performanceIndicatorGroupSpecificationItem) { + if (this.performanceIndicatorGroupSpecification == null) { + this.performanceIndicatorGroupSpecification = new ArrayList<>(); + } + this.performanceIndicatorGroupSpecification.add(performanceIndicatorGroupSpecificationItem); + return this; + } + + /** + * Get performanceIndicatorGroupSpecification + * @return performanceIndicatorGroupSpecification + */ + @Valid @Size(min = 0) + @Schema(name = "performanceIndicatorGroupSpecification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorGroupSpecification") + public List<PerformanceIndicatorGroupSpecificationMVO> getPerformanceIndicatorGroupSpecification() { + return performanceIndicatorGroupSpecification; + } + + public void setPerformanceIndicatorGroupSpecification(List<PerformanceIndicatorGroupSpecificationMVO> performanceIndicatorGroupSpecification) { + this.performanceIndicatorGroupSpecification = performanceIndicatorGroupSpecification; + } + + public MeasurementJobMVO performanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValueMVO> performanceIndicatorSpecification) { + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + return this; + } + + public MeasurementJobMVO addPerformanceIndicatorSpecificationItem(PerformanceIndicatorSpecificationRefOrValueMVO performanceIndicatorSpecificationItem) { + if (this.performanceIndicatorSpecification == null) { + this.performanceIndicatorSpecification = new ArrayList<>(); + } + this.performanceIndicatorSpecification.add(performanceIndicatorSpecificationItem); + return this; + } + + /** + * Get performanceIndicatorSpecification + * @return performanceIndicatorSpecification + */ + @Valid @Size(min = 0) + @Schema(name = "performanceIndicatorSpecification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorSpecification") + public List<@Valid PerformanceIndicatorSpecificationRefOrValueMVO> getPerformanceIndicatorSpecification() { + return performanceIndicatorSpecification; + } + + public void setPerformanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValueMVO> performanceIndicatorSpecification) { + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + } + + public MeasurementJobMVO trackingRecord(List<TrackingRecordMVO> trackingRecord) { + this.trackingRecord = trackingRecord; + return this; + } + + public MeasurementJobMVO addTrackingRecordItem(TrackingRecordMVO trackingRecordItem) { + if (this.trackingRecord == null) { + this.trackingRecord = new ArrayList<>(); + } + this.trackingRecord.add(trackingRecordItem); + return this; + } + + /** + * Get trackingRecord + * @return trackingRecord + */ + @Valid @Size(min = 0) + @Schema(name = "trackingRecord", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("trackingRecord") + public List<TrackingRecordMVO> getTrackingRecord() { + return trackingRecord; + } + + public void setTrackingRecord(List<TrackingRecordMVO> trackingRecord) { + this.trackingRecord = trackingRecord; + } + + public MeasurementJobMVO fileTransferData(List<FileTransferDataMVO> fileTransferData) { + super.fileTransferData(fileTransferData); + return this; + } + + public MeasurementJobMVO addFileTransferDataItem(FileTransferDataMVO fileTransferDataItem) { + super.addFileTransferDataItem(fileTransferDataItem); + return this; + } + + public MeasurementJobMVO dataAccessEndpoint(List<DataAccessEndpointMVO> dataAccessEndpoint) { + super.dataAccessEndpoint(dataAccessEndpoint); + return this; + } + + public MeasurementJobMVO addDataAccessEndpointItem(DataAccessEndpointMVO dataAccessEndpointItem) { + super.addDataAccessEndpointItem(dataAccessEndpointItem); + return this; + } + + public MeasurementJobMVO scheduleDefinition(List<ScheduleDefinitionMVO> scheduleDefinition) { + super.scheduleDefinition(scheduleDefinition); + return this; + } + + public MeasurementJobMVO addScheduleDefinitionItem(ScheduleDefinitionMVO scheduleDefinitionItem) { + super.addScheduleDefinitionItem(scheduleDefinitionItem); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MeasurementJobMVO measurementJobMVO = (MeasurementJobMVO) o; + return Objects.equals(this.consumingApplicationId, measurementJobMVO.consumingApplicationId) && + Objects.equals(this.producingApplicationId, measurementJobMVO.producingApplicationId) && + Objects.equals(this.granularity, measurementJobMVO.granularity) && + Objects.equals(this.performanceIndicatorGroupSpecification, measurementJobMVO.performanceIndicatorGroupSpecification) && + Objects.equals(this.performanceIndicatorSpecification, measurementJobMVO.performanceIndicatorSpecification) && + Objects.equals(this.trackingRecord, measurementJobMVO.trackingRecord) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(consumingApplicationId, producingApplicationId, granularity, performanceIndicatorGroupSpecification, performanceIndicatorSpecification, trackingRecord, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MeasurementJobMVO {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" consumingApplicationId: ").append(toIndentedString(consumingApplicationId)).append("\n"); + sb.append(" producingApplicationId: ").append(toIndentedString(producingApplicationId)).append("\n"); + sb.append(" granularity: ").append(toIndentedString(granularity)).append("\n"); + sb.append(" performanceIndicatorGroupSpecification: ").append(toIndentedString(performanceIndicatorGroupSpecification)).append("\n"); + sb.append(" performanceIndicatorSpecification: ").append(toIndentedString(performanceIndicatorSpecification)).append("\n"); + sb.append(" trackingRecord: ").append(toIndentedString(trackingRecord)).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/pm628/model/MonitoredClassCriteria.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MonitoredClassCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..92e98bbcb86d32706021d1dee94828a024a0db64 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MonitoredClassCriteria.java @@ -0,0 +1,195 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * MonitoredClassCriteria + */ + + +@Embeddable +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MonitoredClassCriteria { + + @JsonProperty("@type") + @Column(name = "mcc_type") + private String type; + + @JsonProperty("@baseType") + @Column(name = "mcc_base_type") + private String baseType; + + @JsonProperty("@schemaLocation") + @Column(name = "mcc_schema_location") + private String schemaLocation; + + @JsonProperty("monitoredObjectClass") + private String monitoredObjectClass; + + @JsonProperty("objectInstanceFilter") + private String objectInstanceFilter; + + public MonitoredClassCriteria() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MonitoredClassCriteria(String type) { + this.type = type; + } + + public MonitoredClassCriteria type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public MonitoredClassCriteria baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public MonitoredClassCriteria schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public MonitoredClassCriteria monitoredObjectClass(String monitoredObjectClass) { + this.monitoredObjectClass = monitoredObjectClass; + return this; + } + + /** + * A monitored object class for specifying the set of instances that are referenced by a PM query. + * @return monitoredObjectClass + */ + + @Schema(name = "monitoredObjectClass", description = "A monitored object class for specifying the set of instances that are referenced by a PM query.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("monitoredObjectClass") + public String getMonitoredObjectClass() { + return monitoredObjectClass; + } + + public void setMonitoredObjectClass(String monitoredObjectClass) { + this.monitoredObjectClass = monitoredObjectClass; + } + + public MonitoredClassCriteria objectInstanceFilter(String objectInstanceFilter) { + this.objectInstanceFilter = objectInstanceFilter; + return this; + } + + /** + * A filter that can be used in conjunction with the monitored object class for specifying the set of instances that are referenced by a PM query. + * @return objectInstanceFilter + */ + + @Schema(name = "objectInstanceFilter", description = "A filter that can be used in conjunction with the monitored object class for specifying the set of instances that are referenced by a PM query.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("objectInstanceFilter") + public String getObjectInstanceFilter() { + return objectInstanceFilter; + } + + public void setObjectInstanceFilter(String objectInstanceFilter) { + this.objectInstanceFilter = objectInstanceFilter; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MonitoredClassCriteria monitoredClassCriteria = (MonitoredClassCriteria) o; + return Objects.equals(this.type, monitoredClassCriteria.type) && + Objects.equals(this.baseType, monitoredClassCriteria.baseType) && + Objects.equals(this.schemaLocation, monitoredClassCriteria.schemaLocation) && + Objects.equals(this.monitoredObjectClass, monitoredClassCriteria.monitoredObjectClass) && + Objects.equals(this.objectInstanceFilter, monitoredClassCriteria.objectInstanceFilter); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, monitoredObjectClass, objectInstanceFilter); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MonitoredClassCriteria {\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(" monitoredObjectClass: ").append(toIndentedString(monitoredObjectClass)).append("\n"); + sb.append(" objectInstanceFilter: ").append(toIndentedString(objectInstanceFilter)).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/pm628/model/MonitoredClassCriteriaFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MonitoredClassCriteriaFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..436acd394207fad361b706fece191385b332363a --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MonitoredClassCriteriaFVO.java @@ -0,0 +1,189 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * MonitoredClassCriteriaFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MonitoredClassCriteriaFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("monitoredObjectClass") + private String monitoredObjectClass; + + @JsonProperty("objectInstanceFilter") + private String objectInstanceFilter; + + public MonitoredClassCriteriaFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MonitoredClassCriteriaFVO(String type) { + this.type = type; + } + + public MonitoredClassCriteriaFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public MonitoredClassCriteriaFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public MonitoredClassCriteriaFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public MonitoredClassCriteriaFVO monitoredObjectClass(String monitoredObjectClass) { + this.monitoredObjectClass = monitoredObjectClass; + return this; + } + + /** + * A monitored object class for specifying the set of instances that are referenced by a PM query. + * @return monitoredObjectClass + */ + + @Schema(name = "monitoredObjectClass", description = "A monitored object class for specifying the set of instances that are referenced by a PM query.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("monitoredObjectClass") + public String getMonitoredObjectClass() { + return monitoredObjectClass; + } + + public void setMonitoredObjectClass(String monitoredObjectClass) { + this.monitoredObjectClass = monitoredObjectClass; + } + + public MonitoredClassCriteriaFVO objectInstanceFilter(String objectInstanceFilter) { + this.objectInstanceFilter = objectInstanceFilter; + return this; + } + + /** + * A filter that can be used in conjunction with the monitored object class for specifying the set of instances that are referenced by a PM query. + * @return objectInstanceFilter + */ + + @Schema(name = "objectInstanceFilter", description = "A filter that can be used in conjunction with the monitored object class for specifying the set of instances that are referenced by a PM query.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("objectInstanceFilter") + public String getObjectInstanceFilter() { + return objectInstanceFilter; + } + + public void setObjectInstanceFilter(String objectInstanceFilter) { + this.objectInstanceFilter = objectInstanceFilter; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MonitoredClassCriteriaFVO monitoredClassCriteriaFVO = (MonitoredClassCriteriaFVO) o; + return Objects.equals(this.type, monitoredClassCriteriaFVO.type) && + Objects.equals(this.baseType, monitoredClassCriteriaFVO.baseType) && + Objects.equals(this.schemaLocation, monitoredClassCriteriaFVO.schemaLocation) && + Objects.equals(this.monitoredObjectClass, monitoredClassCriteriaFVO.monitoredObjectClass) && + Objects.equals(this.objectInstanceFilter, monitoredClassCriteriaFVO.objectInstanceFilter); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, monitoredObjectClass, objectInstanceFilter); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MonitoredClassCriteriaFVO {\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(" monitoredObjectClass: ").append(toIndentedString(monitoredObjectClass)).append("\n"); + sb.append(" objectInstanceFilter: ").append(toIndentedString(objectInstanceFilter)).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/pm628/model/MonitoredInstancesCriteria.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MonitoredInstancesCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..722b6eb5eb464ebc6890368f35fa952a8f7ff623 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MonitoredInstancesCriteria.java @@ -0,0 +1,183 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * MonitoredInstancesCriteria + */ + + +@Embeddable +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MonitoredInstancesCriteria { + + @JsonProperty("@type") + @Column(name = "mic_type") + private String type; + + @JsonProperty("@baseType") + @Column(name = "mic_base_type") + private String baseType; + + @JsonProperty("@schemaLocation") + @Column(name = "mic_schema_location") + private String schemaLocation; + + @JsonProperty("monitoredObjectInstances") + @Valid + private List<String> monitoredObjectInstances = new ArrayList<>(); + + public MonitoredInstancesCriteria() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MonitoredInstancesCriteria(String type) { + this.type = type; + } + + public MonitoredInstancesCriteria type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public MonitoredInstancesCriteria baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public MonitoredInstancesCriteria schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public MonitoredInstancesCriteria monitoredObjectInstances(List<String> monitoredObjectInstances) { + this.monitoredObjectInstances = monitoredObjectInstances; + return this; + } + + public MonitoredInstancesCriteria addMonitoredObjectInstancesItem(String monitoredObjectInstancesItem) { + if (this.monitoredObjectInstances == null) { + this.monitoredObjectInstances = new ArrayList<>(); + } + this.monitoredObjectInstances.add(monitoredObjectInstancesItem); + return this; + } + + /** + * Get monitoredObjectInstances + * @return monitoredObjectInstances + */ + @Size(min = 0) + @Schema(name = "monitoredObjectInstances", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("monitoredObjectInstances") + public List<String> getMonitoredObjectInstances() { + return monitoredObjectInstances; + } + + public void setMonitoredObjectInstances(List<String> monitoredObjectInstances) { + this.monitoredObjectInstances = monitoredObjectInstances; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MonitoredInstancesCriteria monitoredInstancesCriteria = (MonitoredInstancesCriteria) o; + return Objects.equals(this.type, monitoredInstancesCriteria.type) && + Objects.equals(this.baseType, monitoredInstancesCriteria.baseType) && + Objects.equals(this.schemaLocation, monitoredInstancesCriteria.schemaLocation) && + Objects.equals(this.monitoredObjectInstances, monitoredInstancesCriteria.monitoredObjectInstances); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, monitoredObjectInstances); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MonitoredInstancesCriteria {\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(" monitoredObjectInstances: ").append(toIndentedString(monitoredObjectInstances)).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/pm628/model/MonitoredInstancesCriteriaFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MonitoredInstancesCriteriaFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..d91d0f7a9a52b57ee35616352cec139f2fc5eb60 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MonitoredInstancesCriteriaFVO.java @@ -0,0 +1,177 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * MonitoredInstancesCriteriaFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MonitoredInstancesCriteriaFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("monitoredObjectInstances") + @Valid + private List<String> monitoredObjectInstances = new ArrayList<>(); + + public MonitoredInstancesCriteriaFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MonitoredInstancesCriteriaFVO(String type) { + this.type = type; + } + + public MonitoredInstancesCriteriaFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public MonitoredInstancesCriteriaFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public MonitoredInstancesCriteriaFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public MonitoredInstancesCriteriaFVO monitoredObjectInstances(List<String> monitoredObjectInstances) { + this.monitoredObjectInstances = monitoredObjectInstances; + return this; + } + + public MonitoredInstancesCriteriaFVO addMonitoredObjectInstancesItem(String monitoredObjectInstancesItem) { + if (this.monitoredObjectInstances == null) { + this.monitoredObjectInstances = new ArrayList<>(); + } + this.monitoredObjectInstances.add(monitoredObjectInstancesItem); + return this; + } + + /** + * Get monitoredObjectInstances + * @return monitoredObjectInstances + */ + @Size(min = 0) + @Schema(name = "monitoredObjectInstances", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("monitoredObjectInstances") + public List<String> getMonitoredObjectInstances() { + return monitoredObjectInstances; + } + + public void setMonitoredObjectInstances(List<String> monitoredObjectInstances) { + this.monitoredObjectInstances = monitoredObjectInstances; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MonitoredInstancesCriteriaFVO monitoredInstancesCriteriaFVO = (MonitoredInstancesCriteriaFVO) o; + return Objects.equals(this.type, monitoredInstancesCriteriaFVO.type) && + Objects.equals(this.baseType, monitoredInstancesCriteriaFVO.baseType) && + Objects.equals(this.schemaLocation, monitoredInstancesCriteriaFVO.schemaLocation) && + Objects.equals(this.monitoredObjectInstances, monitoredInstancesCriteriaFVO.monitoredObjectInstances); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, monitoredObjectInstances); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MonitoredInstancesCriteriaFVO {\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(" monitoredObjectInstances: ").append(toIndentedString(monitoredObjectInstances)).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/pm628/model/MonthlyScheduleDayOfWeekDefinition.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MonthlyScheduleDayOfWeekDefinition.java new file mode 100644 index 0000000000000000000000000000000000000000..2570eee4ea6a882291868f2929e6a816e7c22b49 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MonthlyScheduleDayOfWeekDefinition.java @@ -0,0 +1,211 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.*; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * MonthlyScheduleDayOfWeekDefinition + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Embeddable +public class MonthlyScheduleDayOfWeekDefinition { + + @JsonProperty("@type") + @Column(name = "msdowd_type") + private String type; + + @JsonProperty("@baseType") + @Column(name = "msdowd_base_type") + private String baseType; + + @JsonProperty("@schemaLocation") + @Column(name = "msdowd_schema_location") + private String schemaLocation; + + @JsonProperty("dayOfMonthRecurrence") + @Valid + @ElementCollection(targetClass = DayOfMonthRecurrence.class) + @CollectionTable( + name = "pm628_sched_def_domr", + joinColumns = @JoinColumn(name = "sched_def_uuid") + ) + private List<DayOfMonthRecurrence> dayOfMonthRecurrence = new ArrayList<>(); + + @JsonProperty("recurringDaySequence") + private String recurringDaySequence; + + public MonthlyScheduleDayOfWeekDefinition() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MonthlyScheduleDayOfWeekDefinition(String type) { + this.type = type; + } + + public MonthlyScheduleDayOfWeekDefinition type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public MonthlyScheduleDayOfWeekDefinition baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public MonthlyScheduleDayOfWeekDefinition schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public MonthlyScheduleDayOfWeekDefinition dayOfMonthRecurrence(List<DayOfMonthRecurrence> dayOfMonthRecurrence) { + this.dayOfMonthRecurrence = dayOfMonthRecurrence; + return this; + } + + public MonthlyScheduleDayOfWeekDefinition addDayOfMonthRecurrenceItem(DayOfMonthRecurrence dayOfMonthRecurrenceItem) { + if (this.dayOfMonthRecurrence == null) { + this.dayOfMonthRecurrence = new ArrayList<>(); + } + this.dayOfMonthRecurrence.add(dayOfMonthRecurrenceItem); + return this; + } + + /** + * Get dayOfMonthRecurrence + * @return dayOfMonthRecurrence + */ + @Valid + @Schema(name = "dayOfMonthRecurrence", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dayOfMonthRecurrence") + public List<DayOfMonthRecurrence> getDayOfMonthRecurrence() { + return dayOfMonthRecurrence; + } + + public void setDayOfMonthRecurrence(List<DayOfMonthRecurrence> dayOfMonthRecurrence) { + this.dayOfMonthRecurrence = dayOfMonthRecurrence; + } + + public MonthlyScheduleDayOfWeekDefinition recurringDaySequence(String recurringDaySequence) { + this.recurringDaySequence = recurringDaySequence; + return this; + } + + /** + * Get recurringDaySequence + * @return recurringDaySequence + */ + + @Schema(name = "recurringDaySequence", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("recurringDaySequence") + public String getRecurringDaySequence() { + return recurringDaySequence; + } + + public void setRecurringDaySequence(String recurringDaySequence) { + this.recurringDaySequence = recurringDaySequence; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MonthlyScheduleDayOfWeekDefinition monthlyScheduleDayOfWeekDefinition = (MonthlyScheduleDayOfWeekDefinition) o; + return Objects.equals(this.type, monthlyScheduleDayOfWeekDefinition.type) && + Objects.equals(this.baseType, monthlyScheduleDayOfWeekDefinition.baseType) && + Objects.equals(this.schemaLocation, monthlyScheduleDayOfWeekDefinition.schemaLocation) && + Objects.equals(this.dayOfMonthRecurrence, monthlyScheduleDayOfWeekDefinition.dayOfMonthRecurrence) && + Objects.equals(this.recurringDaySequence, monthlyScheduleDayOfWeekDefinition.recurringDaySequence); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, dayOfMonthRecurrence, recurringDaySequence); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MonthlyScheduleDayOfWeekDefinition {\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(" dayOfMonthRecurrence: ").append(toIndentedString(dayOfMonthRecurrence)).append("\n"); + sb.append(" recurringDaySequence: ").append(toIndentedString(recurringDaySequence)).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/pm628/model/MonthlyScheduleDayOfWeekDefinitionFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MonthlyScheduleDayOfWeekDefinitionFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..c5e8663d362f652fa566a4a1ae36c661cca2eb07 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MonthlyScheduleDayOfWeekDefinitionFVO.java @@ -0,0 +1,201 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * MonthlyScheduleDayOfWeekDefinitionFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MonthlyScheduleDayOfWeekDefinitionFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("dayOfMonthRecurrence") + @Valid + private List<DayOfMonthRecurrenceFVO> dayOfMonthRecurrence = new ArrayList<>(); + + @JsonProperty("recurringDaySequence") + private String recurringDaySequence; + + public MonthlyScheduleDayOfWeekDefinitionFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MonthlyScheduleDayOfWeekDefinitionFVO(String type) { + this.type = type; + } + + public MonthlyScheduleDayOfWeekDefinitionFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public MonthlyScheduleDayOfWeekDefinitionFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public MonthlyScheduleDayOfWeekDefinitionFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public MonthlyScheduleDayOfWeekDefinitionFVO dayOfMonthRecurrence(List<DayOfMonthRecurrenceFVO> dayOfMonthRecurrence) { + this.dayOfMonthRecurrence = dayOfMonthRecurrence; + return this; + } + + public MonthlyScheduleDayOfWeekDefinitionFVO addDayOfMonthRecurrenceItem(DayOfMonthRecurrenceFVO dayOfMonthRecurrenceItem) { + if (this.dayOfMonthRecurrence == null) { + this.dayOfMonthRecurrence = new ArrayList<>(); + } + this.dayOfMonthRecurrence.add(dayOfMonthRecurrenceItem); + return this; + } + + /** + * Get dayOfMonthRecurrence + * @return dayOfMonthRecurrence + */ + @Valid + @Schema(name = "dayOfMonthRecurrence", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dayOfMonthRecurrence") + public List<DayOfMonthRecurrenceFVO> getDayOfMonthRecurrence() { + return dayOfMonthRecurrence; + } + + public void setDayOfMonthRecurrence(List<DayOfMonthRecurrenceFVO> dayOfMonthRecurrence) { + this.dayOfMonthRecurrence = dayOfMonthRecurrence; + } + + public MonthlyScheduleDayOfWeekDefinitionFVO recurringDaySequence(String recurringDaySequence) { + this.recurringDaySequence = recurringDaySequence; + return this; + } + + /** + * Get recurringDaySequence + * @return recurringDaySequence + */ + + @Schema(name = "recurringDaySequence", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("recurringDaySequence") + public String getRecurringDaySequence() { + return recurringDaySequence; + } + + public void setRecurringDaySequence(String recurringDaySequence) { + this.recurringDaySequence = recurringDaySequence; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MonthlyScheduleDayOfWeekDefinitionFVO monthlyScheduleDayOfWeekDefinitionFVO = (MonthlyScheduleDayOfWeekDefinitionFVO) o; + return Objects.equals(this.type, monthlyScheduleDayOfWeekDefinitionFVO.type) && + Objects.equals(this.baseType, monthlyScheduleDayOfWeekDefinitionFVO.baseType) && + Objects.equals(this.schemaLocation, monthlyScheduleDayOfWeekDefinitionFVO.schemaLocation) && + Objects.equals(this.dayOfMonthRecurrence, monthlyScheduleDayOfWeekDefinitionFVO.dayOfMonthRecurrence) && + Objects.equals(this.recurringDaySequence, monthlyScheduleDayOfWeekDefinitionFVO.recurringDaySequence); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, dayOfMonthRecurrence, recurringDaySequence); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MonthlyScheduleDayOfWeekDefinitionFVO {\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(" dayOfMonthRecurrence: ").append(toIndentedString(dayOfMonthRecurrence)).append("\n"); + sb.append(" recurringDaySequence: ").append(toIndentedString(recurringDaySequence)).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/pm628/model/MonthlyScheduleDayOfWeekDefinitionMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/MonthlyScheduleDayOfWeekDefinitionMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..760f22c2bfdfa882eb2c41d61b4bd516c4573d6b --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/MonthlyScheduleDayOfWeekDefinitionMVO.java @@ -0,0 +1,201 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * MonthlyScheduleDayOfWeekDefinitionMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class MonthlyScheduleDayOfWeekDefinitionMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("dayOfMonthRecurrence") + @Valid + private List<DayOfMonthRecurrenceMVO> dayOfMonthRecurrence = new ArrayList<>(); + + @JsonProperty("recurringDaySequence") + private String recurringDaySequence; + + public MonthlyScheduleDayOfWeekDefinitionMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MonthlyScheduleDayOfWeekDefinitionMVO(String type) { + this.type = type; + } + + public MonthlyScheduleDayOfWeekDefinitionMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public MonthlyScheduleDayOfWeekDefinitionMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public MonthlyScheduleDayOfWeekDefinitionMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public MonthlyScheduleDayOfWeekDefinitionMVO dayOfMonthRecurrence(List<DayOfMonthRecurrenceMVO> dayOfMonthRecurrence) { + this.dayOfMonthRecurrence = dayOfMonthRecurrence; + return this; + } + + public MonthlyScheduleDayOfWeekDefinitionMVO addDayOfMonthRecurrenceItem(DayOfMonthRecurrenceMVO dayOfMonthRecurrenceItem) { + if (this.dayOfMonthRecurrence == null) { + this.dayOfMonthRecurrence = new ArrayList<>(); + } + this.dayOfMonthRecurrence.add(dayOfMonthRecurrenceItem); + return this; + } + + /** + * Get dayOfMonthRecurrence + * @return dayOfMonthRecurrence + */ + @Valid + @Schema(name = "dayOfMonthRecurrence", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dayOfMonthRecurrence") + public List<DayOfMonthRecurrenceMVO> getDayOfMonthRecurrence() { + return dayOfMonthRecurrence; + } + + public void setDayOfMonthRecurrence(List<DayOfMonthRecurrenceMVO> dayOfMonthRecurrence) { + this.dayOfMonthRecurrence = dayOfMonthRecurrence; + } + + public MonthlyScheduleDayOfWeekDefinitionMVO recurringDaySequence(String recurringDaySequence) { + this.recurringDaySequence = recurringDaySequence; + return this; + } + + /** + * Get recurringDaySequence + * @return recurringDaySequence + */ + + @Schema(name = "recurringDaySequence", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("recurringDaySequence") + public String getRecurringDaySequence() { + return recurringDaySequence; + } + + public void setRecurringDaySequence(String recurringDaySequence) { + this.recurringDaySequence = recurringDaySequence; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MonthlyScheduleDayOfWeekDefinitionMVO monthlyScheduleDayOfWeekDefinitionMVO = (MonthlyScheduleDayOfWeekDefinitionMVO) o; + return Objects.equals(this.type, monthlyScheduleDayOfWeekDefinitionMVO.type) && + Objects.equals(this.baseType, monthlyScheduleDayOfWeekDefinitionMVO.baseType) && + Objects.equals(this.schemaLocation, monthlyScheduleDayOfWeekDefinitionMVO.schemaLocation) && + Objects.equals(this.dayOfMonthRecurrence, monthlyScheduleDayOfWeekDefinitionMVO.dayOfMonthRecurrence) && + Objects.equals(this.recurringDaySequence, monthlyScheduleDayOfWeekDefinitionMVO.recurringDaySequence); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, dayOfMonthRecurrence, recurringDaySequence); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MonthlyScheduleDayOfWeekDefinitionMVO {\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(" dayOfMonthRecurrence: ").append(toIndentedString(dayOfMonthRecurrence)).append("\n"); + sb.append(" recurringDaySequence: ").append(toIndentedString(recurringDaySequence)).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/pm628/model/NoteFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/NoteFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..6d4d7ddc42339890045acc95a77e9d39a583552c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/NoteFVO.java @@ -0,0 +1,218 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * NoteFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class NoteFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("author") + private String author; + + @JsonProperty("date") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime date; + + @JsonProperty("text") + private String text; + + public NoteFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public NoteFVO(String type) { + this.type = type; + } + + public NoteFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public NoteFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public NoteFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public NoteFVO author(String author) { + this.author = author; + return this; + } + + /** + * Author of the note + * @return author + */ + + @Schema(name = "author", example = "Mr. N. Bene", description = "Author of the note", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("author") + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } + + public NoteFVO date(OffsetDateTime date) { + this.date = date; + return this; + } + + /** + * Date of the note + * @return date + */ + @Valid + @Schema(name = "date", example = "2020-11-20T08:00Z", description = "Date of the note", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("date") + public OffsetDateTime getDate() { + return date; + } + + public void setDate(OffsetDateTime date) { + this.date = date; + } + + public NoteFVO text(String text) { + this.text = text; + return this; + } + + /** + * Text of the note + * @return text + */ + + @Schema(name = "text", example = "This is important", description = "Text of the note", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("text") + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NoteFVO noteFVO = (NoteFVO) o; + return Objects.equals(this.type, noteFVO.type) && + Objects.equals(this.baseType, noteFVO.baseType) && + Objects.equals(this.schemaLocation, noteFVO.schemaLocation) && + Objects.equals(this.author, noteFVO.author) && + Objects.equals(this.date, noteFVO.date) && + Objects.equals(this.text, noteFVO.text); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, author, date, text); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NoteFVO {\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(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).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/pm628/model/NoteMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/NoteMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..7785c14f79d6db11534372f47371f57f392b9f89 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/NoteMVO.java @@ -0,0 +1,243 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.Objects; + +/** + * NoteMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class NoteMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("author") + private String author; + + @JsonProperty("date") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime date; + + @JsonProperty("text") + private String text; + + public NoteMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public NoteMVO(String type) { + this.type = type; + } + + public NoteMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public NoteMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public NoteMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public NoteMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Identifier of the note within its containing entity + * @return id + */ + + @Schema(name = "uuid", example = "afa9-3d90aaa8da0f", description = "Identifier of the note within its containing entity", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public NoteMVO author(String author) { + this.author = author; + return this; + } + + /** + * Author of the note + * @return author + */ + + @Schema(name = "author", example = "Mr. N. Bene", description = "Author of the note", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("author") + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } + + public NoteMVO date(OffsetDateTime date) { + this.date = date; + return this; + } + + /** + * Date of the note + * @return date + */ + @Valid + @Schema(name = "date", example = "2020-11-20T08:00Z", description = "Date of the note", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("date") + public OffsetDateTime getDate() { + return date; + } + + public void setDate(OffsetDateTime date) { + this.date = date; + } + + public NoteMVO text(String text) { + this.text = text; + return this; + } + + /** + * Text of the note + * @return text + */ + + @Schema(name = "text", example = "This is important", description = "Text of the note", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("text") + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NoteMVO noteMVO = (NoteMVO) o; + return Objects.equals(this.type, noteMVO.type) && + Objects.equals(this.baseType, noteMVO.baseType) && + Objects.equals(this.schemaLocation, noteMVO.schemaLocation) && + Objects.equals(this.uuid, noteMVO.uuid) && + Objects.equals(this.author, noteMVO.author) && + Objects.equals(this.date, noteMVO.date) && + Objects.equals(this.text, noteMVO.text); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, uuid, author, date, text); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NoteMVO {\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(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).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/pm628/model/PackingEnumType.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PackingEnumType.java new file mode 100644 index 0000000000000000000000000000000000000000..5f41e5df61fbcd4c850ab99458e6ccb835a3c6b2 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PackingEnumType.java @@ -0,0 +1,51 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import javax.annotation.Generated; + +/** + * Enumeration of supported packing/packaging. All extensions allowed. + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public enum PackingEnumType { + + NO_PACKING("NO_PACKING"), + + GZIP("GZIP"), + + TAR("TAR"), + + VENDOR_EXT("VENDOR_EXT"), + + MINOR_EXT("MINOR_EXT"); + + private String value; + + PackingEnumType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static PackingEnumType fromValue(String value) { + for (PackingEnumType b : PackingEnumType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PackingType.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PackingType.java new file mode 100644 index 0000000000000000000000000000000000000000..4e692f8b9c30c19e76860c90e6077c257dd6db47 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PackingType.java @@ -0,0 +1,80 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Embeddable; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * Specify if the output file(s) are to be packed. + */ + +@Schema(name = "PackingType", description = "Specify if the output file(s) are to be packed.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Embeddable +public class PackingType { + + @JsonProperty("packingEnumType") + private PackingEnumType packingEnumType; + + public PackingType packingEnumType(PackingEnumType packingEnumType) { + this.packingEnumType = packingEnumType; + return this; + } + + /** + * Get packingEnumType + * @return packingEnumType + */ + @Valid + @Schema(name = "packingEnumType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("packingEnumType") + public PackingEnumType getPackingEnumType() { + return packingEnumType; + } + + public void setPackingEnumType(PackingEnumType packingEnumType) { + this.packingEnumType = packingEnumType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PackingType packingType = (PackingType) o; + return Objects.equals(this.packingEnumType, packingType.packingEnumType); + } + + @Override + public int hashCode() { + return Objects.hash(packingEnumType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PackingType {\n"); + sb.append(" packingEnumType: ").append(toIndentedString(packingEnumType)).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/pm628/model/PartyRef.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRef.java new file mode 100644 index 0000000000000000000000000000000000000000..a620d50485b486c7dffd0de84728ea3181085298 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRef.java @@ -0,0 +1,105 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * A Party reference + */ + +@Schema(name = "PartyRef", description = "A Party reference") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_PartyRef") +public class PartyRef extends BaseRootNamedEntity implements PartyRefOrPartyRoleRef { + + @JsonProperty("@referredType") + private String referredType; + + public PartyRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PartyRef(String type, String uuid) { + this.type = type; + this.uuid = uuid; + } + + public PartyRef referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PartyRef partyRef = (PartyRef) o; + return Objects.equals(this.type, partyRef.type) && + Objects.equals(this.baseType, partyRef.baseType) && + Objects.equals(this.schemaLocation, partyRef.schemaLocation) && + Objects.equals(this.href, partyRef.href) && + Objects.equals(this.uuid, partyRef.uuid) && + Objects.equals(this.name, partyRef.name) && + Objects.equals(this.referredType, partyRef.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PartyRef {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).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/pm628/model/PartyRefFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..b7aaa1403bb15a82c45375152089b061d9462ade --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefFVO.java @@ -0,0 +1,240 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * A Party reference + */ + +@Schema(name = "PartyRef_FVO", description = "A Party reference") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PartyRefFVO implements PartyRefOrPartyRoleRefFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + public PartyRefFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PartyRefFVO(String type) { + this.type = type; + } + + public PartyRefFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PartyRefFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public PartyRefFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PartyRefFVO 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 PartyRefFVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PartyRefFVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PartyRefFVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PartyRefFVO partyRefFVO = (PartyRefFVO) o; + return Objects.equals(this.type, partyRefFVO.type) && + Objects.equals(this.baseType, partyRefFVO.baseType) && + Objects.equals(this.schemaLocation, partyRefFVO.schemaLocation) && + Objects.equals(this.href, partyRefFVO.href) && + Objects.equals(this.uuid, partyRefFVO.uuid) && + Objects.equals(this.name, partyRefFVO.name) && + Objects.equals(this.referredType, partyRefFVO.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PartyRefFVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).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/pm628/model/PartyRefMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..1d5a9d440a4f654812285e6e3910de6e6310a053 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefMVO.java @@ -0,0 +1,240 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * A Party reference + */ + +@Schema(name = "PartyRef_MVO", description = "A Party reference") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PartyRefMVO implements PartyRefOrPartyRoleRefMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + public PartyRefMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PartyRefMVO(String type) { + this.type = type; + } + + public PartyRefMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PartyRefMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public PartyRefMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PartyRefMVO 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 PartyRefMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * The identifier of the referred entity. + * @return id + */ + + @Schema(name = "uuid", description = "The identifier of the referred entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PartyRefMVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PartyRefMVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PartyRefMVO partyRefMVO = (PartyRefMVO) o; + return Objects.equals(this.type, partyRefMVO.type) && + Objects.equals(this.baseType, partyRefMVO.baseType) && + Objects.equals(this.schemaLocation, partyRefMVO.schemaLocation) && + Objects.equals(this.href, partyRefMVO.href) && + Objects.equals(this.uuid, partyRefMVO.uuid) && + Objects.equals(this.name, partyRefMVO.name) && + Objects.equals(this.referredType, partyRefMVO.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PartyRefMVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).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/pm628/model/PartyRefOrPartyRoleRef.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefOrPartyRoleRef.java new file mode 100644 index 0000000000000000000000000000000000000000..9f42c3a706d8c58dcd7a070d86cf541859c5f4ba --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefOrPartyRoleRef.java @@ -0,0 +1,23 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import javax.annotation.Generated; + + +@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 = PartyRef.class, name = "PartyRef"), + @JsonSubTypes.Type(value = PartyRoleRef.class, name = "PartyRoleRef") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface PartyRefOrPartyRoleRef { + public String getType(); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefOrPartyRoleRefFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefOrPartyRoleRefFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..eccd3c68c4c0b6a262283e60e1e87f1128a223e8 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefOrPartyRoleRefFVO.java @@ -0,0 +1,25 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import javax.annotation.Generated; + + +@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 = PartyRefFVO.class, name = "PartyRef"), + @JsonSubTypes.Type(value = PartyRoleRefFVO.class, name = "PartyRoleRef"), + @JsonSubTypes.Type(value = PartyRefFVO.class, name = "PartyRef_FVO"), + @JsonSubTypes.Type(value = PartyRoleRefFVO.class, name = "PartyRoleRef_FVO") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface PartyRefOrPartyRoleRefFVO { + public String getType(); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefOrPartyRoleRefMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefOrPartyRoleRefMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..1175dab438e736bd192c33c05a3b87deaac760d8 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefOrPartyRoleRefMVO.java @@ -0,0 +1,25 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import javax.annotation.Generated; + + +@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 = PartyRefMVO.class, name = "PartyRef"), + @JsonSubTypes.Type(value = PartyRoleRefMVO.class, name = "PartyRoleRef"), + @JsonSubTypes.Type(value = PartyRefMVO.class, name = "PartyRef_MVO"), + @JsonSubTypes.Type(value = PartyRoleRefMVO.class, name = "PartyRoleRef_MVO") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface PartyRefOrPartyRoleRefMVO { + public String getType(); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefOrPartyRoleRefMapper.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefOrPartyRoleRefMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..5beb3bc7ce67361aec2b8eff234884f77b119c30 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRefOrPartyRoleRefMapper.java @@ -0,0 +1,19 @@ +package org.etsi.osl.tmf.pm628.model; + +import org.mapstruct.*; + +@Mapper( + nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT, + nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, + subclassExhaustiveStrategy = SubclassExhaustiveStrategy.RUNTIME_EXCEPTION +) +public interface PartyRefOrPartyRoleRefMapper { + + @SubclassMapping(source = PartyRefFVO.class, target = PartyRef.class) + @SubclassMapping(source = PartyRoleRefFVO.class, target = PartyRoleRef.class) + PartyRefOrPartyRoleRef map(PartyRefOrPartyRoleRefFVO source); + + @SubclassMapping(source = PartyRefMVO.class, target = PartyRef.class) + @SubclassMapping(source = PartyRoleRefMVO.class, target = PartyRoleRef.class) + PartyRefOrPartyRoleRef map(PartyRefOrPartyRoleRefMVO source); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRoleRef.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRoleRef.java new file mode 100644 index 0000000000000000000000000000000000000000..4d8a3ec7cfbf55f3d70a4e1f43e699d8ce2678c6 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRoleRef.java @@ -0,0 +1,154 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PartyRoleRef + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_PartyRoleRef") +public class PartyRoleRef extends BaseRootNamedEntity implements PartyRefOrPartyRoleRef { + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("partyId") + private String partyId; + + @JsonProperty("partyName") + private String partyName; + + public PartyRoleRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PartyRoleRef(String type, String uuid) { + this.type = type; + this.uuid = uuid; + } + + public PartyRoleRef referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public PartyRoleRef partyId(String partyId) { + this.partyId = partyId; + return this; + } + + /** + * The identifier of the engaged party that is linked to the PartyRole object. + * @return partyId + */ + + @Schema(name = "partyId", description = "The identifier of the engaged party that is linked to the PartyRole object.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("partyId") + public String getPartyId() { + return partyId; + } + + public void setPartyId(String partyId) { + this.partyId = partyId; + } + + public PartyRoleRef partyName(String partyName) { + this.partyName = partyName; + return this; + } + + /** + * The name of the engaged party that is linked to the PartyRole object. + * @return partyName + */ + + @Schema(name = "partyName", description = "The name of the engaged party that is linked to the PartyRole object.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("partyName") + public String getPartyName() { + return partyName; + } + + public void setPartyName(String partyName) { + this.partyName = partyName; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PartyRoleRef partyRoleRef = (PartyRoleRef) o; + return Objects.equals(this.type, partyRoleRef.type) && + Objects.equals(this.baseType, partyRoleRef.baseType) && + Objects.equals(this.schemaLocation, partyRoleRef.schemaLocation) && + Objects.equals(this.href, partyRoleRef.href) && + Objects.equals(this.uuid, partyRoleRef.uuid) && + Objects.equals(this.name, partyRoleRef.name) && + Objects.equals(this.referredType, partyRoleRef.referredType) && + Objects.equals(this.partyId, partyRoleRef.partyId) && + Objects.equals(this.partyName, partyRoleRef.partyName); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType, partyId, partyName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PartyRoleRef {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" partyId: ").append(toIndentedString(partyId)).append("\n"); + sb.append(" partyName: ").append(toIndentedString(partyName)).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/pm628/model/PartyRoleRefFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRoleRefFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..fafb8ee40b87b522ac7654e5d720d95a0f93cfa0 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRoleRefFVO.java @@ -0,0 +1,289 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PartyRoleRefFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PartyRoleRefFVO implements PartyRefOrPartyRoleRefFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("partyId") + private String partyId; + + @JsonProperty("partyName") + private String partyName; + + public PartyRoleRefFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PartyRoleRefFVO(String type) { + this.type = type; + } + + public PartyRoleRefFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PartyRoleRefFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public PartyRoleRefFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PartyRoleRefFVO 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 PartyRoleRefFVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PartyRoleRefFVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PartyRoleRefFVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public PartyRoleRefFVO partyId(String partyId) { + this.partyId = partyId; + return this; + } + + /** + * The identifier of the engaged party that is linked to the PartyRole object. + * @return partyId + */ + + @Schema(name = "partyId", description = "The identifier of the engaged party that is linked to the PartyRole object.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("partyId") + public String getPartyId() { + return partyId; + } + + public void setPartyId(String partyId) { + this.partyId = partyId; + } + + public PartyRoleRefFVO partyName(String partyName) { + this.partyName = partyName; + return this; + } + + /** + * The name of the engaged party that is linked to the PartyRole object. + * @return partyName + */ + + @Schema(name = "partyName", description = "The name of the engaged party that is linked to the PartyRole object.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("partyName") + public String getPartyName() { + return partyName; + } + + public void setPartyName(String partyName) { + this.partyName = partyName; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PartyRoleRefFVO partyRoleRefFVO = (PartyRoleRefFVO) o; + return Objects.equals(this.type, partyRoleRefFVO.type) && + Objects.equals(this.baseType, partyRoleRefFVO.baseType) && + Objects.equals(this.schemaLocation, partyRoleRefFVO.schemaLocation) && + Objects.equals(this.href, partyRoleRefFVO.href) && + Objects.equals(this.uuid, partyRoleRefFVO.uuid) && + Objects.equals(this.name, partyRoleRefFVO.name) && + Objects.equals(this.referredType, partyRoleRefFVO.referredType) && + Objects.equals(this.partyId, partyRoleRefFVO.partyId) && + Objects.equals(this.partyName, partyRoleRefFVO.partyName); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType, partyId, partyName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PartyRoleRefFVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" partyId: ").append(toIndentedString(partyId)).append("\n"); + sb.append(" partyName: ").append(toIndentedString(partyName)).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/pm628/model/PartyRoleRefMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRoleRefMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..bc500b8fa6337c6f2e8236dca2fa4c70bafad71c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PartyRoleRefMVO.java @@ -0,0 +1,289 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PartyRoleRefMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PartyRoleRefMVO implements PartyRefOrPartyRoleRefMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("partyId") + private String partyId; + + @JsonProperty("partyName") + private String partyName; + + public PartyRoleRefMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PartyRoleRefMVO(String type) { + this.type = type; + } + + public PartyRoleRefMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PartyRoleRefMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public PartyRoleRefMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PartyRoleRefMVO 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 PartyRoleRefMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * The identifier of the referred entity. + * @return id + */ + + @Schema(name = "uuid", description = "The identifier of the referred entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PartyRoleRefMVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PartyRoleRefMVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public PartyRoleRefMVO partyId(String partyId) { + this.partyId = partyId; + return this; + } + + /** + * The identifier of the engaged party that is linked to the PartyRole object. + * @return partyId + */ + + @Schema(name = "partyId", description = "The identifier of the engaged party that is linked to the PartyRole object.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("partyId") + public String getPartyId() { + return partyId; + } + + public void setPartyId(String partyId) { + this.partyId = partyId; + } + + public PartyRoleRefMVO partyName(String partyName) { + this.partyName = partyName; + return this; + } + + /** + * The name of the engaged party that is linked to the PartyRole object. + * @return partyName + */ + + @Schema(name = "partyName", description = "The name of the engaged party that is linked to the PartyRole object.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("partyName") + public String getPartyName() { + return partyName; + } + + public void setPartyName(String partyName) { + this.partyName = partyName; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PartyRoleRefMVO partyRoleRefMVO = (PartyRoleRefMVO) o; + return Objects.equals(this.type, partyRoleRefMVO.type) && + Objects.equals(this.baseType, partyRoleRefMVO.baseType) && + Objects.equals(this.schemaLocation, partyRoleRefMVO.schemaLocation) && + Objects.equals(this.href, partyRoleRefMVO.href) && + Objects.equals(this.uuid, partyRoleRefMVO.uuid) && + Objects.equals(this.name, partyRoleRefMVO.name) && + Objects.equals(this.referredType, partyRoleRefMVO.referredType) && + Objects.equals(this.partyId, partyRoleRefMVO.partyId) && + Objects.equals(this.partyName, partyRoleRefMVO.partyName); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType, partyId, partyName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PartyRoleRefMVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" partyId: ").append(toIndentedString(partyId)).append("\n"); + sb.append(" partyName: ").append(toIndentedString(partyName)).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/pm628/model/PatchMeasurementCollectionJob200Response.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PatchMeasurementCollectionJob200Response.java new file mode 100644 index 0000000000000000000000000000000000000000..3f142544e1b540a3300956a379c82fd0a7d886b9 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PatchMeasurementCollectionJob200Response.java @@ -0,0 +1,8 @@ +package org.etsi.osl.tmf.pm628.model; + +import javax.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface PatchMeasurementCollectionJob200Response { +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PatchPerformanceIndicatorGroupSpecification200Response.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PatchPerformanceIndicatorGroupSpecification200Response.java new file mode 100644 index 0000000000000000000000000000000000000000..8c2a6d7934e51f4deb455637eecab347e814ed8c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PatchPerformanceIndicatorGroupSpecification200Response.java @@ -0,0 +1,8 @@ +package org.etsi.osl.tmf.pm628.model; + +import javax.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface PatchPerformanceIndicatorGroupSpecification200Response { +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PatchPerformanceIndicatorSpecification200Response.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PatchPerformanceIndicatorSpecification200Response.java new file mode 100644 index 0000000000000000000000000000000000000000..3b84fe819aa0e31fad511715d8c594994d15edf3 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PatchPerformanceIndicatorSpecification200Response.java @@ -0,0 +1,8 @@ +package org.etsi.osl.tmf.pm628.model; + +import javax.annotation.Generated; + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface PatchPerformanceIndicatorSpecification200Response { +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorGroupSpecification.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorGroupSpecification.java new file mode 100644 index 0000000000000000000000000000000000000000..d8aa88a548164f3abd07871bfc0c7f9ec1f0beee --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorGroupSpecification.java @@ -0,0 +1,156 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.*; +import jakarta.persistence.Entity; +import jakarta.validation.Valid; +import jakarta.validation.constraints.Size; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; +import org.hibernate.annotations.*; +import org.hibernate.annotations.CascadeType; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * PerformanceIndicatorGroupSpecification + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_PerfIndGroupSpec") +public class PerformanceIndicatorGroupSpecification extends BaseRootNamedEntity implements PatchPerformanceIndicatorGroupSpecification200Response, PerformanceIndicatorGroupSpecificationRefOrValue { + + @JsonProperty("groupCategory") + private String groupCategory; + + @JsonProperty("performanceIndicatorSpecification") + @Valid + @ManyToAny + @AnyDiscriminator(DiscriminatorType.STRING) + @Column(name = "performance_indicator_specification_type") + @AnyKeyJavaClass(String.class) + @AnyDiscriminatorValue(discriminator = "value", entity = PerformanceIndicatorSpecification.class) + @AnyDiscriminatorValue(discriminator = "ref", entity = PerformanceIndicatorSpecificationRef.class) + @Cascade(CascadeType.MERGE) + @JoinTable( + name = "perf_ind_group_spec_perf_ind_specs", + joinColumns = @JoinColumn(name = "perf_ind_group_spec_id"), + inverseJoinColumns = @JoinColumn(name = "perf_ind_spec_id") + ) + private List<@Valid PerformanceIndicatorSpecificationRefOrValue> performanceIndicatorSpecification = new ArrayList<>(); + + public PerformanceIndicatorGroupSpecification() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceIndicatorGroupSpecification(String type) { + this.type = type; + } + + public PerformanceIndicatorGroupSpecification groupCategory(String groupCategory) { + this.groupCategory = groupCategory; + return this; + } + + /** + * A grouping or set of PerformanceIndicatorGroupSpecifications that are classified together because of common characteristics, such as technology specific, service specific, or technology/service independent. + * @return groupCategory + */ + + @Schema(name = "groupCategory", description = "A grouping or set of PerformanceIndicatorGroupSpecifications that are classified together because of common characteristics, such as technology specific, service specific, or technology/service independent.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("groupCategory") + public String getGroupCategory() { + return groupCategory; + } + + public void setGroupCategory(String groupCategory) { + this.groupCategory = groupCategory; + } + + public PerformanceIndicatorGroupSpecification performanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValue> performanceIndicatorSpecification) { + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + return this; + } + + public PerformanceIndicatorGroupSpecification addPerformanceIndicatorSpecificationItem(PerformanceIndicatorSpecificationRefOrValue performanceIndicatorSpecificationItem) { + if (this.performanceIndicatorSpecification == null) { + this.performanceIndicatorSpecification = new ArrayList<>(); + } + this.performanceIndicatorSpecification.add(performanceIndicatorSpecificationItem); + return this; + } + + /** + * Get performanceIndicatorSpecification + * @return performanceIndicatorSpecification + */ + @Valid @Size(min = 1) + @Schema(name = "performanceIndicatorSpecification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorSpecification") + public List<@Valid PerformanceIndicatorSpecificationRefOrValue> getPerformanceIndicatorSpecification() { + return performanceIndicatorSpecification; + } + + public void setPerformanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValue> performanceIndicatorSpecification) { + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorGroupSpecification performanceIndicatorGroupSpecification = (PerformanceIndicatorGroupSpecification) o; + return Objects.equals(this.type, performanceIndicatorGroupSpecification.type) && + Objects.equals(this.baseType, performanceIndicatorGroupSpecification.baseType) && + Objects.equals(this.schemaLocation, performanceIndicatorGroupSpecification.schemaLocation) && + Objects.equals(this.href, performanceIndicatorGroupSpecification.href) && + Objects.equals(this.uuid, performanceIndicatorGroupSpecification.uuid) && + Objects.equals(this.name, performanceIndicatorGroupSpecification.name) && + Objects.equals(this.groupCategory, performanceIndicatorGroupSpecification.groupCategory) && + Objects.equals(this.performanceIndicatorSpecification, performanceIndicatorGroupSpecification.performanceIndicatorSpecification); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, groupCategory, performanceIndicatorSpecification); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorGroupSpecification {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" groupCategory: ").append(toIndentedString(groupCategory)).append("\n"); + sb.append(" performanceIndicatorSpecification: ").append(toIndentedString(performanceIndicatorSpecification)).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/pm628/model/PerformanceIndicatorGroupSpecificationFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorGroupSpecificationFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..9eef4812e681c9d2f180daeb10a499422680d256 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorGroupSpecificationFVO.java @@ -0,0 +1,229 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * PerformanceIndicatorGroupSpecificationFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceIndicatorGroupSpecificationFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String atBaseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("name") + private String name; + + @JsonProperty("groupCategory") + private String groupCategory; + + @JsonProperty("performanceIndicatorSpecification") + @Valid + private List<@Valid PerformanceIndicatorSpecificationRefOrValueFVO> performanceIndicatorSpecification = new ArrayList<>(); + + public PerformanceIndicatorGroupSpecificationFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceIndicatorGroupSpecificationFVO(String type, String name, String groupCategory) { + this.type = type; + this.name = name; + this.groupCategory = groupCategory; + } + + public PerformanceIndicatorGroupSpecificationFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PerformanceIndicatorGroupSpecificationFVO 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 getBaseType() { + return atBaseType; + } + + public void setBaseType(String atBaseType) { + this.atBaseType = atBaseType; + } + + public PerformanceIndicatorGroupSpecificationFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PerformanceIndicatorGroupSpecificationFVO name(String name) { + this.name = name; + return this; + } + + /** + * A word, term, or phrase by which a PerformanceIndicatorGroupSpecification is tagged. + * @return name + */ + @NotNull + @Schema(name = "name", description = "A word, term, or phrase by which a PerformanceIndicatorGroupSpecification is tagged.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PerformanceIndicatorGroupSpecificationFVO groupCategory(String groupCategory) { + this.groupCategory = groupCategory; + return this; + } + + /** + * A grouping or set of PerformanceIndicatorGroupSpecifications that are classified together because of common characteristics, such as technology specific, service specific, or technology/service independent. + * @return groupCategory + */ + @NotNull + @Schema(name = "groupCategory", description = "A grouping or set of PerformanceIndicatorGroupSpecifications that are classified together because of common characteristics, such as technology specific, service specific, or technology/service independent.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("groupCategory") + public String getGroupCategory() { + return groupCategory; + } + + public void setGroupCategory(String groupCategory) { + this.groupCategory = groupCategory; + } + + public PerformanceIndicatorGroupSpecificationFVO performanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValueFVO> performanceIndicatorSpecification) { + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + return this; + } + + public PerformanceIndicatorGroupSpecificationFVO addPerformanceIndicatorSpecificationItem(PerformanceIndicatorSpecificationRefOrValueFVO performanceIndicatorSpecificationItem) { + if (this.performanceIndicatorSpecification == null) { + this.performanceIndicatorSpecification = new ArrayList<>(); + } + this.performanceIndicatorSpecification.add(performanceIndicatorSpecificationItem); + return this; + } + + /** + * Get performanceIndicatorSpecification + * @return performanceIndicatorSpecification + */ + @Valid @Size(min = 1) + @Schema(name = "performanceIndicatorSpecification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorSpecification") + public List<@Valid PerformanceIndicatorSpecificationRefOrValueFVO> getPerformanceIndicatorSpecification() { + return performanceIndicatorSpecification; + } + + public void setPerformanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValueFVO> performanceIndicatorSpecification) { + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorGroupSpecificationFVO performanceIndicatorGroupSpecificationFVO = (PerformanceIndicatorGroupSpecificationFVO) o; + return Objects.equals(this.type, performanceIndicatorGroupSpecificationFVO.type) && + Objects.equals(this.atBaseType, performanceIndicatorGroupSpecificationFVO.atBaseType) && + Objects.equals(this.schemaLocation, performanceIndicatorGroupSpecificationFVO.schemaLocation) && + Objects.equals(this.name, performanceIndicatorGroupSpecificationFVO.name) && + Objects.equals(this.groupCategory, performanceIndicatorGroupSpecificationFVO.groupCategory) && + Objects.equals(this.performanceIndicatorSpecification, performanceIndicatorGroupSpecificationFVO.performanceIndicatorSpecification); + } + + @Override + public int hashCode() { + return Objects.hash(type, atBaseType, schemaLocation, name, groupCategory, performanceIndicatorSpecification); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorGroupSpecificationFVO {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n"); + sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" groupCategory: ").append(toIndentedString(groupCategory)).append("\n"); + sb.append(" performanceIndicatorSpecification: ").append(toIndentedString(performanceIndicatorSpecification)).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/pm628/model/PerformanceIndicatorGroupSpecificationMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorGroupSpecificationMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..b9f81abf78a87996557332138af7c0f5aebb4e8f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorGroupSpecificationMVO.java @@ -0,0 +1,252 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * PerformanceIndicatorGroupSpecificationMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceIndicatorGroupSpecificationMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("groupCategory") + private String groupCategory; + + @JsonProperty("performanceIndicatorSpecification") + @Valid + private List<@Valid PerformanceIndicatorSpecificationRefOrValueMVO> performanceIndicatorSpecification = new ArrayList<>(); + + public PerformanceIndicatorGroupSpecificationMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceIndicatorGroupSpecificationMVO(String type) { + this.type = type; + } + + public PerformanceIndicatorGroupSpecificationMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PerformanceIndicatorGroupSpecificationMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public PerformanceIndicatorGroupSpecificationMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PerformanceIndicatorGroupSpecificationMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PerformanceIndicatorGroupSpecificationMVO name(String name) { + this.name = name; + return this; + } + + /** + * A word, term, or phrase by which a PerformanceIndicatorGroupSpecification is tagged. + * @return name + */ + + @Schema(name = "name", description = "A word, term, or phrase by which a PerformanceIndicatorGroupSpecification is tagged.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PerformanceIndicatorGroupSpecificationMVO groupCategory(String groupCategory) { + this.groupCategory = groupCategory; + return this; + } + + /** + * A grouping or set of PerformanceIndicatorGroupSpecifications that are classified together because of common characteristics, such as technology specific, service specific, or technology/service independent. + * @return groupCategory + */ + + @Schema(name = "groupCategory", description = "A grouping or set of PerformanceIndicatorGroupSpecifications that are classified together because of common characteristics, such as technology specific, service specific, or technology/service independent.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("groupCategory") + public String getGroupCategory() { + return groupCategory; + } + + public void setGroupCategory(String groupCategory) { + this.groupCategory = groupCategory; + } + + public PerformanceIndicatorGroupSpecificationMVO performanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValueMVO> performanceIndicatorSpecification) { + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + return this; + } + + public PerformanceIndicatorGroupSpecificationMVO addPerformanceIndicatorSpecificationItem(PerformanceIndicatorSpecificationRefOrValueMVO performanceIndicatorSpecificationItem) { + if (this.performanceIndicatorSpecification == null) { + this.performanceIndicatorSpecification = new ArrayList<>(); + } + this.performanceIndicatorSpecification.add(performanceIndicatorSpecificationItem); + return this; + } + + /** + * Get performanceIndicatorSpecification + * @return performanceIndicatorSpecification + */ + @Valid @Size(min = 1) + @Schema(name = "performanceIndicatorSpecification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorSpecification") + public List<@Valid PerformanceIndicatorSpecificationRefOrValueMVO> getPerformanceIndicatorSpecification() { + return performanceIndicatorSpecification; + } + + public void setPerformanceIndicatorSpecification(List<@Valid PerformanceIndicatorSpecificationRefOrValueMVO> performanceIndicatorSpecification) { + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorGroupSpecificationMVO performanceIndicatorGroupSpecificationMVO = (PerformanceIndicatorGroupSpecificationMVO) o; + return Objects.equals(this.type, performanceIndicatorGroupSpecificationMVO.type) && + Objects.equals(this.baseType, performanceIndicatorGroupSpecificationMVO.baseType) && + Objects.equals(this.schemaLocation, performanceIndicatorGroupSpecificationMVO.schemaLocation) && + Objects.equals(this.uuid, performanceIndicatorGroupSpecificationMVO.uuid) && + Objects.equals(this.name, performanceIndicatorGroupSpecificationMVO.name) && + Objects.equals(this.groupCategory, performanceIndicatorGroupSpecificationMVO.groupCategory) && + Objects.equals(this.performanceIndicatorSpecification, performanceIndicatorGroupSpecificationMVO.performanceIndicatorSpecification); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, uuid, name, groupCategory, performanceIndicatorSpecification); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorGroupSpecificationMVO {\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(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" groupCategory: ").append(toIndentedString(groupCategory)).append("\n"); + sb.append(" performanceIndicatorSpecification: ").append(toIndentedString(performanceIndicatorSpecification)).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/pm628/model/PerformanceIndicatorGroupSpecificationRef.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorGroupSpecificationRef.java new file mode 100644 index 0000000000000000000000000000000000000000..d699bf46a720c65681da732df81d9d5ba9304f3e --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorGroupSpecificationRef.java @@ -0,0 +1,127 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PerformanceIndicatorGroupSpecificationRef + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceIndicatorGroupSpecificationRef extends BaseRootNamedEntity implements PerformanceIndicatorGroupSpecificationRefOrValue { + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("version") + private String version; + + public PerformanceIndicatorGroupSpecificationRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceIndicatorGroupSpecificationRef(String type, String uuid) { + this.type = type; + this.uuid = uuid; + } + + public PerformanceIndicatorGroupSpecificationRef referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public PerformanceIndicatorGroupSpecificationRef version(String version) { + this.version = version; + return this; + } + + /** + * Version of the performance indicator group specification + * @return version + */ + + @Schema(name = "version", description = "Version of the performance indicator group specification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("version") + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorGroupSpecificationRef performanceIndicatorGroupSpecificationRef = (PerformanceIndicatorGroupSpecificationRef) o; + return Objects.equals(this.type, performanceIndicatorGroupSpecificationRef.type) && + Objects.equals(this.baseType, performanceIndicatorGroupSpecificationRef.baseType) && + Objects.equals(this.schemaLocation, performanceIndicatorGroupSpecificationRef.schemaLocation) && + Objects.equals(this.href, performanceIndicatorGroupSpecificationRef.href) && + Objects.equals(this.uuid, performanceIndicatorGroupSpecificationRef.uuid) && + Objects.equals(this.name, performanceIndicatorGroupSpecificationRef.name) && + Objects.equals(this.referredType, performanceIndicatorGroupSpecificationRef.referredType) && + Objects.equals(this.version, performanceIndicatorGroupSpecificationRef.version); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorGroupSpecificationRef {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/pm628/model/PerformanceIndicatorGroupSpecificationRefOrValue.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorGroupSpecificationRefOrValue.java new file mode 100644 index 0000000000000000000000000000000000000000..8e9d0d4498a46be0c26c2c735e1083a8d292002d --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorGroupSpecificationRefOrValue.java @@ -0,0 +1,23 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import javax.annotation.Generated; + + +@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 = PerformanceIndicatorGroupSpecification.class, name = "PerformanceIndicatorGroupSpecification"), + @JsonSubTypes.Type(value = PerformanceIndicatorGroupSpecificationRef.class, name = "PerformanceIndicatorGroupSpecificationRef") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface PerformanceIndicatorGroupSpecificationRefOrValue { + public String getType(); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorGroupValue.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorGroupValue.java new file mode 100644 index 0000000000000000000000000000000000000000..3fae6032f22132dc457c51d8a211bf8f41493df9 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorGroupValue.java @@ -0,0 +1,137 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.Size; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * A value of a performance indicator. + */ + +@Schema(name = "PerformanceIndicatorGroupValue", description = "A value of a performance indicator.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceIndicatorGroupValue { + + private PerformanceIndicatorGroupSpecificationRefOrValue performanceIndicatorGroupSpecification; + + @Valid + private List<@Valid PerformanceIndicatorValue> observedGroupValue = new ArrayList<>(); + + private Object tag; + + public PerformanceIndicatorGroupValue performanceIndicatorGroupSpecification(PerformanceIndicatorGroupSpecificationRefOrValue performanceIndicatorGroupSpecification) { + this.performanceIndicatorGroupSpecification = performanceIndicatorGroupSpecification; + return this; + } + + /** + * Get performanceIndicatorGroupSpecification + * @return performanceIndicatorGroupSpecification + */ + @Valid + @Schema(name = "performanceIndicatorGroupSpecification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorGroupSpecification") + public PerformanceIndicatorGroupSpecificationRefOrValue getPerformanceIndicatorGroupSpecification() { + return performanceIndicatorGroupSpecification; + } + + public void setPerformanceIndicatorGroupSpecification(PerformanceIndicatorGroupSpecificationRefOrValue performanceIndicatorGroupSpecification) { + this.performanceIndicatorGroupSpecification = performanceIndicatorGroupSpecification; + } + + public PerformanceIndicatorGroupValue observedGroupValue(List<@Valid PerformanceIndicatorValue> observedGroupValue) { + this.observedGroupValue = observedGroupValue; + return this; + } + + public PerformanceIndicatorGroupValue addObservedGroupValueItem(PerformanceIndicatorValue observedGroupValueItem) { + if (this.observedGroupValue == null) { + this.observedGroupValue = new ArrayList<>(); + } + this.observedGroupValue.add(observedGroupValueItem); + return this; + } + + /** + * The measurement group (array) values + * @return observedGroupValue + */ + @Valid @Size(min = 1) + @Schema(name = "observedGroupValue", description = "The measurement group (array) values", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("observedGroupValue") + public List<@Valid PerformanceIndicatorValue> getObservedGroupValue() { + return observedGroupValue; + } + + public void setObservedGroupValue(List<@Valid PerformanceIndicatorValue> observedGroupValue) { + this.observedGroupValue = observedGroupValue; + } + + public PerformanceIndicatorGroupValue tag(Object tag) { + this.tag = tag; + return this; + } + + /** + * The optional tag object attached to this observed group value + * @return tag + */ + + @Schema(name = "tag", description = "The optional tag object attached to this observed group value", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("tag") + public Object getTag() { + return tag; + } + + public void setTag(Object tag) { + this.tag = tag; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorGroupValue performanceIndicatorGroupValue = (PerformanceIndicatorGroupValue) o; + return Objects.equals(this.performanceIndicatorGroupSpecification, performanceIndicatorGroupValue.performanceIndicatorGroupSpecification) && + Objects.equals(this.observedGroupValue, performanceIndicatorGroupValue.observedGroupValue) && + Objects.equals(this.tag, performanceIndicatorGroupValue.tag); + } + + @Override + public int hashCode() { + return Objects.hash(performanceIndicatorGroupSpecification, observedGroupValue, tag); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorGroupValue {\n"); + sb.append(" performanceIndicatorGroupSpecification: ").append(toIndentedString(performanceIndicatorGroupSpecification)).append("\n"); + sb.append(" observedGroupValue: ").append(toIndentedString(observedGroupValue)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).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/pm628/model/PerformanceIndicatorSpecRelationship.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecRelationship.java new file mode 100644 index 0000000000000000000000000000000000000000..38b35e0713aefedc9605cf7e895268f8052652cd --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecRelationship.java @@ -0,0 +1,155 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Embedded; +import jakarta.persistence.Entity; +import jakarta.validation.Valid; +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.common.model.TimePeriod; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PerformanceIndicatorSpecRelationship + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_PerfIndSpecRel") +public class PerformanceIndicatorSpecRelationship extends BaseRootEntity { + + @JsonProperty("relationshipType") + private String relationshipType; + + @JsonProperty("role") + private String role; + + @JsonProperty("validFor") + @Embedded + private TimePeriod validFor; + + public PerformanceIndicatorSpecRelationship() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceIndicatorSpecRelationship(String type) { + this.type = type; + } + + public PerformanceIndicatorSpecRelationship relationshipType(String relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + /** + * + * @return relationshipType + */ + + @Schema(name = "relationshipType", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("relationshipType") + public String getRelationshipType() { + return relationshipType; + } + + public void setRelationshipType(String relationshipType) { + this.relationshipType = relationshipType; + } + + public PerformanceIndicatorSpecRelationship role(String role) { + this.role = role; + return this; + } + + /** + * The association role for this service specification + * @return role + */ + + @Schema(name = "role", description = "The association role for this service specification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("role") + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public PerformanceIndicatorSpecRelationship 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; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorSpecRelationship performanceIndicatorSpecRelationship = (PerformanceIndicatorSpecRelationship) o; + return Objects.equals(this.type, performanceIndicatorSpecRelationship.type) && + Objects.equals(this.baseType, performanceIndicatorSpecRelationship.baseType) && + Objects.equals(this.schemaLocation, performanceIndicatorSpecRelationship.schemaLocation) && + Objects.equals(this.href, performanceIndicatorSpecRelationship.href) && + Objects.equals(this.uuid, performanceIndicatorSpecRelationship.uuid) && + Objects.equals(this.relationshipType, performanceIndicatorSpecRelationship.relationshipType) && + Objects.equals(this.role, performanceIndicatorSpecRelationship.role) && + Objects.equals(this.validFor, performanceIndicatorSpecRelationship.validFor); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, relationshipType, role, validFor); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorSpecRelationship {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" relationshipType: ").append(toIndentedString(relationshipType)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" validFor: ").append(toIndentedString(validFor)).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/pm628/model/PerformanceIndicatorSpecRelationshipFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecRelationshipFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..bc47f4991df35d68de0302a2691751f329f37bf0 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecRelationshipFVO.java @@ -0,0 +1,268 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.common.model.TimePeriod; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PerformanceIndicatorSpecRelationshipFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceIndicatorSpecRelationshipFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("relationshipType") + private String relationshipType; + + @JsonProperty("role") + private String role; + + @JsonProperty("validFor") + private TimePeriod validFor; + + public PerformanceIndicatorSpecRelationshipFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceIndicatorSpecRelationshipFVO(String type, String relationshipType, TimePeriod validFor) { + this.type = type; + this.relationshipType = relationshipType; + this.validFor = validFor; + } + + public PerformanceIndicatorSpecRelationshipFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PerformanceIndicatorSpecRelationshipFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public PerformanceIndicatorSpecRelationshipFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PerformanceIndicatorSpecRelationshipFVO 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 PerformanceIndicatorSpecRelationshipFVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PerformanceIndicatorSpecRelationshipFVO relationshipType(String relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + /** + * + * @return relationshipType + */ + @NotNull + @Schema(name = "relationshipType", description = "", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("relationshipType") + public String getRelationshipType() { + return relationshipType; + } + + public void setRelationshipType(String relationshipType) { + this.relationshipType = relationshipType; + } + + public PerformanceIndicatorSpecRelationshipFVO role(String role) { + this.role = role; + return this; + } + + /** + * The association role for this service specification + * @return role + */ + + @Schema(name = "role", description = "The association role for this service specification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("role") + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public PerformanceIndicatorSpecRelationshipFVO validFor(TimePeriod validFor) { + this.validFor = validFor; + return this; + } + + /** + * Get validFor + * @return validFor + */ + @NotNull @Valid + @Schema(name = "validFor", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("validFor") + public TimePeriod getValidFor() { + return validFor; + } + + public void setValidFor(TimePeriod validFor) { + this.validFor = validFor; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorSpecRelationshipFVO performanceIndicatorSpecRelationshipFVO = (PerformanceIndicatorSpecRelationshipFVO) o; + return Objects.equals(this.type, performanceIndicatorSpecRelationshipFVO.type) && + Objects.equals(this.baseType, performanceIndicatorSpecRelationshipFVO.baseType) && + Objects.equals(this.schemaLocation, performanceIndicatorSpecRelationshipFVO.schemaLocation) && + Objects.equals(this.href, performanceIndicatorSpecRelationshipFVO.href) && + Objects.equals(this.uuid, performanceIndicatorSpecRelationshipFVO.uuid) && + Objects.equals(this.relationshipType, performanceIndicatorSpecRelationshipFVO.relationshipType) && + Objects.equals(this.role, performanceIndicatorSpecRelationshipFVO.role) && + Objects.equals(this.validFor, performanceIndicatorSpecRelationshipFVO.validFor); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, relationshipType, role, validFor); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorSpecRelationshipFVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" relationshipType: ").append(toIndentedString(relationshipType)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" validFor: ").append(toIndentedString(validFor)).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/pm628/model/PerformanceIndicatorSpecRelationshipMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecRelationshipMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..5202124897734da90623393418eeadbea1661237 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecRelationshipMVO.java @@ -0,0 +1,266 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.common.model.TimePeriod; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PerformanceIndicatorSpecRelationshipMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceIndicatorSpecRelationshipMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("relationshipType") + private String relationshipType; + + @JsonProperty("role") + private String role; + + @JsonProperty("validFor") + private TimePeriod validFor; + + public PerformanceIndicatorSpecRelationshipMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceIndicatorSpecRelationshipMVO(String type) { + this.type = type; + } + + public PerformanceIndicatorSpecRelationshipMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PerformanceIndicatorSpecRelationshipMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public PerformanceIndicatorSpecRelationshipMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PerformanceIndicatorSpecRelationshipMVO 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 PerformanceIndicatorSpecRelationshipMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PerformanceIndicatorSpecRelationshipMVO relationshipType(String relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + /** + * + * @return relationshipType + */ + + @Schema(name = "relationshipType", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("relationshipType") + public String getRelationshipType() { + return relationshipType; + } + + public void setRelationshipType(String relationshipType) { + this.relationshipType = relationshipType; + } + + public PerformanceIndicatorSpecRelationshipMVO role(String role) { + this.role = role; + return this; + } + + /** + * The association role for this service specification + * @return role + */ + + @Schema(name = "role", description = "The association role for this service specification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("role") + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public PerformanceIndicatorSpecRelationshipMVO 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; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorSpecRelationshipMVO performanceIndicatorSpecRelationshipMVO = (PerformanceIndicatorSpecRelationshipMVO) o; + return Objects.equals(this.type, performanceIndicatorSpecRelationshipMVO.type) && + Objects.equals(this.baseType, performanceIndicatorSpecRelationshipMVO.baseType) && + Objects.equals(this.schemaLocation, performanceIndicatorSpecRelationshipMVO.schemaLocation) && + Objects.equals(this.href, performanceIndicatorSpecRelationshipMVO.href) && + Objects.equals(this.uuid, performanceIndicatorSpecRelationshipMVO.uuid) && + Objects.equals(this.relationshipType, performanceIndicatorSpecRelationshipMVO.relationshipType) && + Objects.equals(this.role, performanceIndicatorSpecRelationshipMVO.role) && + Objects.equals(this.validFor, performanceIndicatorSpecRelationshipMVO.validFor); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, relationshipType, role, validFor); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorSpecRelationshipMVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" relationshipType: ").append(toIndentedString(relationshipType)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" validFor: ").append(toIndentedString(validFor)).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/pm628/model/PerformanceIndicatorSpecification.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecification.java new file mode 100644 index 0000000000000000000000000000000000000000..013009b4fead80d551a32ad41d397504d39feef0 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecification.java @@ -0,0 +1,348 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.*; +import jakarta.validation.Valid; +import jakarta.validation.constraints.Size; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; +import org.etsi.osl.tmf.common.model.TimePeriod; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * PerformanceIndicatorSpecification + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_PerfIndSpec") +public class PerformanceIndicatorSpecification extends BaseRootNamedEntity implements PatchPerformanceIndicatorSpecification200Response, PerformanceIndicatorSpecificationRefOrValue { + + @JsonProperty("description") + private String description; + + @JsonProperty("perspective") + private String perspective; + + @JsonProperty("indicatorCategory") + private String indicatorCategory; + + @JsonProperty("indicatorType") + private IndicatorType indicatorType; + + @JsonProperty("derivationAlgorithm") + private String derivationAlgorithm; + + @JsonProperty("derivationMethod") + private String derivationMethod; + + @JsonProperty("validFor") + private TimePeriod validFor; + + @JsonProperty("collectionType") + private CollectionType collectionType; + + @JsonProperty("indicatorUnit") + private String indicatorUnit; + + @JsonProperty("performanceIndicatorSpecRelationship") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_perf_ind_spec_perf_ind_spec_rel", + joinColumns = @JoinColumn(name = "perf_ind_spec_uuid"), + inverseJoinColumns = @JoinColumn(name = "perf_ind_spec_rel_uuid") + ) + private List<PerformanceIndicatorSpecRelationship> performanceIndicatorSpecRelationship = new ArrayList<>(); + + public PerformanceIndicatorSpecification() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceIndicatorSpecification(String type) { + this.type = type; + } + + public PerformanceIndicatorSpecification description(String description) { + this.description = description; + return this; + } + + /** + * A narrative that explains in detail what the PerformanceIndicatorSpecification is. + * @return description + */ + + @Schema(name = "description", description = "A narrative that explains in detail what the PerformanceIndicatorSpecification is.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public PerformanceIndicatorSpecification perspective(String perspective) { + this.perspective = perspective; + return this; + } + + /** + * The point of view for the PerformanceIndicatorSpecification, such as a single user instance or aggregation. + * @return perspective + */ + + @Schema(name = "perspective", description = "The point of view for the PerformanceIndicatorSpecification, such as a single user instance or aggregation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("perspective") + public String getPerspective() { + return perspective; + } + + public void setPerspective(String perspective) { + this.perspective = perspective; + } + + public PerformanceIndicatorSpecification indicatorCategory(String indicatorCategory) { + this.indicatorCategory = indicatorCategory; + return this; + } + + /** + * A grouping or set of PerformanceIndicatorSpecifications that are classified together because of common characteristics, such as technology specific, service specific, or technology/service independent. + * @return indicatorCategory + */ + + @Schema(name = "indicatorCategory", description = "A grouping or set of PerformanceIndicatorSpecifications that are classified together because of common characteristics, such as technology specific, service specific, or technology/service independent.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("indicatorCategory") + public String getIndicatorCategory() { + return indicatorCategory; + } + + public void setIndicatorCategory(String indicatorCategory) { + this.indicatorCategory = indicatorCategory; + } + + public PerformanceIndicatorSpecification indicatorType(IndicatorType indicatorType) { + this.indicatorType = indicatorType; + return this; + } + + /** + * Get indicatorType + * @return indicatorType + */ + @Valid + @Schema(name = "indicatorType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("indicatorType") + public IndicatorType getIndicatorType() { + return indicatorType; + } + + public void setIndicatorType(IndicatorType indicatorType) { + this.indicatorType = indicatorType; + } + + public PerformanceIndicatorSpecification derivationAlgorithm(String derivationAlgorithm) { + this.derivationAlgorithm = derivationAlgorithm; + return this; + } + + /** + * A step-by-step procedure used to calculate the value of PerformanceIndicator. + * @return derivationAlgorithm + */ + + @Schema(name = "derivationAlgorithm", description = "A step-by-step procedure used to calculate the value of PerformanceIndicator.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("derivationAlgorithm") + public String getDerivationAlgorithm() { + return derivationAlgorithm; + } + + public void setDerivationAlgorithm(String derivationAlgorithm) { + this.derivationAlgorithm = derivationAlgorithm; + } + + public PerformanceIndicatorSpecification derivationMethod(String derivationMethod) { + this.derivationMethod = derivationMethod; + return this; + } + + /** + * For simple calculations, the method used to calculate the value of a PerformanceIndicator, such as average, minimum, maximum, sum and so forth. + * @return derivationMethod + */ + + @Schema(name = "derivationMethod", description = "For simple calculations, the method used to calculate the value of a PerformanceIndicator, such as average, minimum, maximum, sum and so forth.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("derivationMethod") + public String getDerivationMethod() { + return derivationMethod; + } + + public void setDerivationMethod(String derivationMethod) { + this.derivationMethod = derivationMethod; + } + + public PerformanceIndicatorSpecification 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 PerformanceIndicatorSpecification collectionType(CollectionType collectionType) { + this.collectionType = collectionType; + return this; + } + + /** + * Get collectionType + * @return collectionType + */ + @Valid + @Schema(name = "collectionType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("collectionType") + public CollectionType getCollectionType() { + return collectionType; + } + + public void setCollectionType(CollectionType collectionType) { + this.collectionType = collectionType; + } + + public PerformanceIndicatorSpecification indicatorUnit(String indicatorUnit) { + this.indicatorUnit = indicatorUnit; + return this; + } + + /** + * The unit by which the indicator is measured. For example, seconds, KBs, rate per second, etc. + * @return indicatorUnit + */ + + @Schema(name = "indicatorUnit", description = "The unit by which the indicator is measured. For example, seconds, KBs, rate per second, etc.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("indicatorUnit") + public String getIndicatorUnit() { + return indicatorUnit; + } + + public void setIndicatorUnit(String indicatorUnit) { + this.indicatorUnit = indicatorUnit; + } + + public PerformanceIndicatorSpecification performanceIndicatorSpecRelationship(List<PerformanceIndicatorSpecRelationship> performanceIndicatorSpecRelationship) { + this.performanceIndicatorSpecRelationship = performanceIndicatorSpecRelationship; + return this; + } + + public PerformanceIndicatorSpecification addPerformanceIndicatorSpecRelationshipItem(PerformanceIndicatorSpecRelationship performanceIndicatorSpecRelationshipItem) { + if (this.performanceIndicatorSpecRelationship == null) { + this.performanceIndicatorSpecRelationship = new ArrayList<>(); + } + this.performanceIndicatorSpecRelationship.add(performanceIndicatorSpecRelationshipItem); + return this; + } + + /** + * Get performanceIndicatorSpecRelationship + * @return performanceIndicatorSpecRelationship + */ + @Valid @Size(min = 0) + @Schema(name = "performanceIndicatorSpecRelationship", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorSpecRelationship") + public List<PerformanceIndicatorSpecRelationship> getPerformanceIndicatorSpecRelationship() { + return performanceIndicatorSpecRelationship; + } + + public void setPerformanceIndicatorSpecRelationship(List<PerformanceIndicatorSpecRelationship> performanceIndicatorSpecRelationship) { + this.performanceIndicatorSpecRelationship = performanceIndicatorSpecRelationship; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorSpecification performanceIndicatorSpecification = (PerformanceIndicatorSpecification) o; + return Objects.equals(this.type, performanceIndicatorSpecification.type) && + Objects.equals(this.baseType, performanceIndicatorSpecification.baseType) && + Objects.equals(this.schemaLocation, performanceIndicatorSpecification.schemaLocation) && + Objects.equals(this.href, performanceIndicatorSpecification.href) && + Objects.equals(this.uuid, performanceIndicatorSpecification.uuid) && + Objects.equals(this.name, performanceIndicatorSpecification.name) && + Objects.equals(this.description, performanceIndicatorSpecification.description) && + Objects.equals(this.perspective, performanceIndicatorSpecification.perspective) && + Objects.equals(this.indicatorCategory, performanceIndicatorSpecification.indicatorCategory) && + Objects.equals(this.indicatorType, performanceIndicatorSpecification.indicatorType) && + Objects.equals(this.derivationAlgorithm, performanceIndicatorSpecification.derivationAlgorithm) && + Objects.equals(this.derivationMethod, performanceIndicatorSpecification.derivationMethod) && + Objects.equals(this.validFor, performanceIndicatorSpecification.validFor) && + Objects.equals(this.collectionType, performanceIndicatorSpecification.collectionType) && + Objects.equals(this.indicatorUnit, performanceIndicatorSpecification.indicatorUnit) && + Objects.equals(this.performanceIndicatorSpecRelationship, performanceIndicatorSpecification.performanceIndicatorSpecRelationship); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, description, perspective, indicatorCategory, indicatorType, derivationAlgorithm, derivationMethod, validFor, collectionType, indicatorUnit, performanceIndicatorSpecRelationship); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorSpecification {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" perspective: ").append(toIndentedString(perspective)).append("\n"); + sb.append(" indicatorCategory: ").append(toIndentedString(indicatorCategory)).append("\n"); + sb.append(" indicatorType: ").append(toIndentedString(indicatorType)).append("\n"); + sb.append(" derivationAlgorithm: ").append(toIndentedString(derivationAlgorithm)).append("\n"); + sb.append(" derivationMethod: ").append(toIndentedString(derivationMethod)).append("\n"); + sb.append(" validFor: ").append(toIndentedString(validFor)).append("\n"); + sb.append(" collectionType: ").append(toIndentedString(collectionType)).append("\n"); + sb.append(" indicatorUnit: ").append(toIndentedString(indicatorUnit)).append("\n"); + sb.append(" performanceIndicatorSpecRelationship: ").append(toIndentedString(performanceIndicatorSpecRelationship)).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/pm628/model/PerformanceIndicatorSpecificationFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..41aeac4c2a37fd2164b3b4538a6fe7500bbac653 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationFVO.java @@ -0,0 +1,483 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import org.etsi.osl.tmf.common.model.TimePeriod; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * PerformanceIndicatorSpecificationFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceIndicatorSpecificationFVO implements PerformanceIndicatorSpecificationRefOrValueFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("description") + private String description; + + @JsonProperty("perspective") + private String perspective; + + @JsonProperty("indicatorCategory") + private String indicatorCategory; + + @JsonProperty("indicatorType") + private IndicatorType indicatorType; + + @JsonProperty("derivationAlgorithm") + private String derivationAlgorithm; + + @JsonProperty("derivationMethod") + private String derivationMethod; + + @JsonProperty("validFor") + private TimePeriod validFor; + + @JsonProperty("collectionType") + private CollectionType collectionType; + + @JsonProperty("indicatorUnit") + private String indicatorUnit; + + @JsonProperty("performanceIndicatorSpecRelationship") + @Valid + private List<PerformanceIndicatorSpecRelationshipFVO> performanceIndicatorSpecRelationship = new ArrayList<>(); + + public PerformanceIndicatorSpecificationFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceIndicatorSpecificationFVO(String type, String name, String indicatorCategory, IndicatorType indicatorType, CollectionType collectionType, String indicatorUnit) { + this.type = type; + this.name = name; + this.indicatorCategory = indicatorCategory; + this.indicatorType = indicatorType; + this.collectionType = collectionType; + this.indicatorUnit = indicatorUnit; + } + + public PerformanceIndicatorSpecificationFVO type(String type) { + this.type = type; + 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 getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PerformanceIndicatorSpecificationFVO baseType(String baseType) { + this.baseType = baseType; + 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 getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public PerformanceIndicatorSpecificationFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + 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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PerformanceIndicatorSpecificationFVO 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 PerformanceIndicatorSpecificationFVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PerformanceIndicatorSpecificationFVO name(String name) { + this.name = name; + return this; + } + + /** + * A word, term, or phrase by which a PerformanceIndicatorSpecification is known and distinguished from other PerformanceIndicatorSpecifications. + * @return name + */ + @NotNull + @Schema(name = "name", description = "A word, term, or phrase by which a PerformanceIndicatorSpecification is known and distinguished from other PerformanceIndicatorSpecifications.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PerformanceIndicatorSpecificationFVO description(String description) { + this.description = description; + return this; + } + + /** + * A narrative that explains in detail what the PerformanceIndicatorSpecification is. + * @return description + */ + + @Schema(name = "description", description = "A narrative that explains in detail what the PerformanceIndicatorSpecification is.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public PerformanceIndicatorSpecificationFVO perspective(String perspective) { + this.perspective = perspective; + return this; + } + + /** + * The point of view for the PerformanceIndicatorSpecification, such as a single user instance or aggregation. + * @return perspective + */ + + @Schema(name = "perspective", description = "The point of view for the PerformanceIndicatorSpecification, such as a single user instance or aggregation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("perspective") + public String getPerspective() { + return perspective; + } + + public void setPerspective(String perspective) { + this.perspective = perspective; + } + + public PerformanceIndicatorSpecificationFVO indicatorCategory(String indicatorCategory) { + this.indicatorCategory = indicatorCategory; + return this; + } + + /** + * A grouping or set of PerformanceIndicatorSpecifications that are classified together because of common characteristics, such as technology specific, service specific, or technology/service independent. + * @return indicatorCategory + */ + @NotNull + @Schema(name = "indicatorCategory", description = "A grouping or set of PerformanceIndicatorSpecifications that are classified together because of common characteristics, such as technology specific, service specific, or technology/service independent.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("indicatorCategory") + public String getIndicatorCategory() { + return indicatorCategory; + } + + public void setIndicatorCategory(String indicatorCategory) { + this.indicatorCategory = indicatorCategory; + } + + public PerformanceIndicatorSpecificationFVO indicatorType(IndicatorType indicatorType) { + this.indicatorType = indicatorType; + return this; + } + + /** + * Get indicatorType + * @return indicatorType + */ + @NotNull @Valid + @Schema(name = "indicatorType", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("indicatorType") + public IndicatorType getIndicatorType() { + return indicatorType; + } + + public void setIndicatorType(IndicatorType indicatorType) { + this.indicatorType = indicatorType; + } + + public PerformanceIndicatorSpecificationFVO derivationAlgorithm(String derivationAlgorithm) { + this.derivationAlgorithm = derivationAlgorithm; + return this; + } + + /** + * A step-by-step procedure used to calculate the value of PerformanceIndicator. + * @return derivationAlgorithm + */ + + @Schema(name = "derivationAlgorithm", description = "A step-by-step procedure used to calculate the value of PerformanceIndicator.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("derivationAlgorithm") + public String getDerivationAlgorithm() { + return derivationAlgorithm; + } + + public void setDerivationAlgorithm(String derivationAlgorithm) { + this.derivationAlgorithm = derivationAlgorithm; + } + + public PerformanceIndicatorSpecificationFVO derivationMethod(String derivationMethod) { + this.derivationMethod = derivationMethod; + return this; + } + + /** + * For simple calculations, the method used to calculate the value of a PerformanceIndicator, such as average, minimum, maximum, sum and so forth. + * @return derivationMethod + */ + + @Schema(name = "derivationMethod", description = "For simple calculations, the method used to calculate the value of a PerformanceIndicator, such as average, minimum, maximum, sum and so forth.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("derivationMethod") + public String getDerivationMethod() { + return derivationMethod; + } + + public void setDerivationMethod(String derivationMethod) { + this.derivationMethod = derivationMethod; + } + + public PerformanceIndicatorSpecificationFVO 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 PerformanceIndicatorSpecificationFVO collectionType(CollectionType collectionType) { + this.collectionType = collectionType; + return this; + } + + /** + * Get collectionType + * @return collectionType + */ + @NotNull @Valid + @Schema(name = "collectionType", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("collectionType") + public CollectionType getCollectionType() { + return collectionType; + } + + public void setCollectionType(CollectionType collectionType) { + this.collectionType = collectionType; + } + + public PerformanceIndicatorSpecificationFVO indicatorUnit(String indicatorUnit) { + this.indicatorUnit = indicatorUnit; + return this; + } + + /** + * The unit by which the indicator is measured. For example, seconds, KBs, rate per second, etc. + * @return indicatorUnit + */ + @NotNull + @Schema(name = "indicatorUnit", description = "The unit by which the indicator is measured. For example, seconds, KBs, rate per second, etc.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("indicatorUnit") + public String getIndicatorUnit() { + return indicatorUnit; + } + + public void setIndicatorUnit(String indicatorUnit) { + this.indicatorUnit = indicatorUnit; + } + + public PerformanceIndicatorSpecificationFVO performanceIndicatorSpecRelationship(List<PerformanceIndicatorSpecRelationshipFVO> performanceIndicatorSpecRelationship) { + this.performanceIndicatorSpecRelationship = performanceIndicatorSpecRelationship; + return this; + } + + public PerformanceIndicatorSpecificationFVO addPerformanceIndicatorSpecRelationshipItem(PerformanceIndicatorSpecRelationshipFVO performanceIndicatorSpecRelationshipItem) { + if (this.performanceIndicatorSpecRelationship == null) { + this.performanceIndicatorSpecRelationship = new ArrayList<>(); + } + this.performanceIndicatorSpecRelationship.add(performanceIndicatorSpecRelationshipItem); + return this; + } + + /** + * Get performanceIndicatorSpecRelationship + * @return performanceIndicatorSpecRelationship + */ + @Valid @Size(min = 0) + @Schema(name = "performanceIndicatorSpecRelationship", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorSpecRelationship") + public List<PerformanceIndicatorSpecRelationshipFVO> getPerformanceIndicatorSpecRelationship() { + return performanceIndicatorSpecRelationship; + } + + public void setPerformanceIndicatorSpecRelationship(List<PerformanceIndicatorSpecRelationshipFVO> performanceIndicatorSpecRelationship) { + this.performanceIndicatorSpecRelationship = performanceIndicatorSpecRelationship; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorSpecificationFVO performanceIndicatorSpecificationFVO = (PerformanceIndicatorSpecificationFVO) o; + return Objects.equals(this.type, performanceIndicatorSpecificationFVO.type) && + Objects.equals(this.baseType, performanceIndicatorSpecificationFVO.baseType) && + Objects.equals(this.schemaLocation, performanceIndicatorSpecificationFVO.schemaLocation) && + Objects.equals(this.href, performanceIndicatorSpecificationFVO.href) && + Objects.equals(this.uuid, performanceIndicatorSpecificationFVO.uuid) && + Objects.equals(this.name, performanceIndicatorSpecificationFVO.name) && + Objects.equals(this.description, performanceIndicatorSpecificationFVO.description) && + Objects.equals(this.perspective, performanceIndicatorSpecificationFVO.perspective) && + Objects.equals(this.indicatorCategory, performanceIndicatorSpecificationFVO.indicatorCategory) && + Objects.equals(this.indicatorType, performanceIndicatorSpecificationFVO.indicatorType) && + Objects.equals(this.derivationAlgorithm, performanceIndicatorSpecificationFVO.derivationAlgorithm) && + Objects.equals(this.derivationMethod, performanceIndicatorSpecificationFVO.derivationMethod) && + Objects.equals(this.validFor, performanceIndicatorSpecificationFVO.validFor) && + Objects.equals(this.collectionType, performanceIndicatorSpecificationFVO.collectionType) && + Objects.equals(this.indicatorUnit, performanceIndicatorSpecificationFVO.indicatorUnit) && + Objects.equals(this.performanceIndicatorSpecRelationship, performanceIndicatorSpecificationFVO.performanceIndicatorSpecRelationship); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, description, perspective, indicatorCategory, indicatorType, derivationAlgorithm, derivationMethod, validFor, collectionType, indicatorUnit, performanceIndicatorSpecRelationship); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorSpecificationFVO {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" perspective: ").append(toIndentedString(perspective)).append("\n"); + sb.append(" indicatorCategory: ").append(toIndentedString(indicatorCategory)).append("\n"); + sb.append(" indicatorType: ").append(toIndentedString(indicatorType)).append("\n"); + sb.append(" derivationAlgorithm: ").append(toIndentedString(derivationAlgorithm)).append("\n"); + sb.append(" derivationMethod: ").append(toIndentedString(derivationMethod)).append("\n"); + sb.append(" validFor: ").append(toIndentedString(validFor)).append("\n"); + sb.append(" collectionType: ").append(toIndentedString(collectionType)).append("\n"); + sb.append(" indicatorUnit: ").append(toIndentedString(indicatorUnit)).append("\n"); + sb.append(" performanceIndicatorSpecRelationship: ").append(toIndentedString(performanceIndicatorSpecRelationship)).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/pm628/model/PerformanceIndicatorSpecificationMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..a84bab65ea8f0a5e1cef22003e77033a5a943f81 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationMVO.java @@ -0,0 +1,477 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import org.etsi.osl.tmf.common.model.TimePeriod; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * PerformanceIndicatorSpecificationMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceIndicatorSpecificationMVO implements PerformanceIndicatorSpecificationRefOrValueMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("description") + private String description; + + @JsonProperty("perspective") + private String perspective; + + @JsonProperty("indicatorCategory") + private String indicatorCategory; + + @JsonProperty("indicatorType") + private IndicatorType indicatorType; + + @JsonProperty("derivationAlgorithm") + private String derivationAlgorithm; + + @JsonProperty("derivationMethod") + private String derivationMethod; + + @JsonProperty("validFor") + private TimePeriod validFor; + + @JsonProperty("collectionType") + private CollectionType collectionType; + + @JsonProperty("indicatorUnit") + private String indicatorUnit; + + @JsonProperty("performanceIndicatorSpecRelationship") + @Valid + private List<PerformanceIndicatorSpecRelationshipMVO> performanceIndicatorSpecRelationship = new ArrayList<>(); + + public PerformanceIndicatorSpecificationMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceIndicatorSpecificationMVO(String type) { + this.type = type; + } + + public PerformanceIndicatorSpecificationMVO type(String type) { + this.type = type; + 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 getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PerformanceIndicatorSpecificationMVO baseType(String baseType) { + this.baseType = baseType; + 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 getbaseType() { + return baseType; + } + + public void setbaseType(String baseType) { + this.baseType = baseType; + } + + public PerformanceIndicatorSpecificationMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + 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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PerformanceIndicatorSpecificationMVO 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 PerformanceIndicatorSpecificationMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PerformanceIndicatorSpecificationMVO name(String name) { + this.name = name; + return this; + } + + /** + * A word, term, or phrase by which a PerformanceIndicatorSpecification is known and distinguished from other PerformanceIndicatorSpecifications. + * @return name + */ + + @Schema(name = "name", description = "A word, term, or phrase by which a PerformanceIndicatorSpecification is known and distinguished from other PerformanceIndicatorSpecifications.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PerformanceIndicatorSpecificationMVO description(String description) { + this.description = description; + return this; + } + + /** + * A narrative that explains in detail what the PerformanceIndicatorSpecification is. + * @return description + */ + + @Schema(name = "description", description = "A narrative that explains in detail what the PerformanceIndicatorSpecification is.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public PerformanceIndicatorSpecificationMVO perspective(String perspective) { + this.perspective = perspective; + return this; + } + + /** + * The point of view for the PerformanceIndicatorSpecification, such as a single user instance or aggregation. + * @return perspective + */ + + @Schema(name = "perspective", description = "The point of view for the PerformanceIndicatorSpecification, such as a single user instance or aggregation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("perspective") + public String getPerspective() { + return perspective; + } + + public void setPerspective(String perspective) { + this.perspective = perspective; + } + + public PerformanceIndicatorSpecificationMVO indicatorCategory(String indicatorCategory) { + this.indicatorCategory = indicatorCategory; + return this; + } + + /** + * A grouping or set of PerformanceIndicatorSpecifications that are classified together because of common characteristics, such as technology specific, service specific, or technology/service independent. + * @return indicatorCategory + */ + + @Schema(name = "indicatorCategory", description = "A grouping or set of PerformanceIndicatorSpecifications that are classified together because of common characteristics, such as technology specific, service specific, or technology/service independent.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("indicatorCategory") + public String getIndicatorCategory() { + return indicatorCategory; + } + + public void setIndicatorCategory(String indicatorCategory) { + this.indicatorCategory = indicatorCategory; + } + + public PerformanceIndicatorSpecificationMVO indicatorType(IndicatorType indicatorType) { + this.indicatorType = indicatorType; + return this; + } + + /** + * Get indicatorType + * @return indicatorType + */ + @Valid + @Schema(name = "indicatorType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("indicatorType") + public IndicatorType getIndicatorType() { + return indicatorType; + } + + public void setIndicatorType(IndicatorType indicatorType) { + this.indicatorType = indicatorType; + } + + public PerformanceIndicatorSpecificationMVO derivationAlgorithm(String derivationAlgorithm) { + this.derivationAlgorithm = derivationAlgorithm; + return this; + } + + /** + * A step-by-step procedure used to calculate the value of PerformanceIndicator. + * @return derivationAlgorithm + */ + + @Schema(name = "derivationAlgorithm", description = "A step-by-step procedure used to calculate the value of PerformanceIndicator.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("derivationAlgorithm") + public String getDerivationAlgorithm() { + return derivationAlgorithm; + } + + public void setDerivationAlgorithm(String derivationAlgorithm) { + this.derivationAlgorithm = derivationAlgorithm; + } + + public PerformanceIndicatorSpecificationMVO derivationMethod(String derivationMethod) { + this.derivationMethod = derivationMethod; + return this; + } + + /** + * For simple calculations, the method used to calculate the value of a PerformanceIndicator, such as average, minimum, maximum, sum and so forth. + * @return derivationMethod + */ + + @Schema(name = "derivationMethod", description = "For simple calculations, the method used to calculate the value of a PerformanceIndicator, such as average, minimum, maximum, sum and so forth.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("derivationMethod") + public String getDerivationMethod() { + return derivationMethod; + } + + public void setDerivationMethod(String derivationMethod) { + this.derivationMethod = derivationMethod; + } + + public PerformanceIndicatorSpecificationMVO 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 PerformanceIndicatorSpecificationMVO collectionType(CollectionType collectionType) { + this.collectionType = collectionType; + return this; + } + + /** + * Get collectionType + * @return collectionType + */ + @Valid + @Schema(name = "collectionType", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("collectionType") + public CollectionType getCollectionType() { + return collectionType; + } + + public void setCollectionType(CollectionType collectionType) { + this.collectionType = collectionType; + } + + public PerformanceIndicatorSpecificationMVO indicatorUnit(String indicatorUnit) { + this.indicatorUnit = indicatorUnit; + return this; + } + + /** + * The unit by which the indicator is measured. For example, seconds, KBs, rate per second, etc. + * @return indicatorUnit + */ + + @Schema(name = "indicatorUnit", description = "The unit by which the indicator is measured. For example, seconds, KBs, rate per second, etc.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("indicatorUnit") + public String getIndicatorUnit() { + return indicatorUnit; + } + + public void setIndicatorUnit(String indicatorUnit) { + this.indicatorUnit = indicatorUnit; + } + + public PerformanceIndicatorSpecificationMVO performanceIndicatorSpecRelationship(List<PerformanceIndicatorSpecRelationshipMVO> performanceIndicatorSpecRelationship) { + this.performanceIndicatorSpecRelationship = performanceIndicatorSpecRelationship; + return this; + } + + public PerformanceIndicatorSpecificationMVO addPerformanceIndicatorSpecRelationshipItem(PerformanceIndicatorSpecRelationshipMVO performanceIndicatorSpecRelationshipItem) { + if (this.performanceIndicatorSpecRelationship == null) { + this.performanceIndicatorSpecRelationship = new ArrayList<>(); + } + this.performanceIndicatorSpecRelationship.add(performanceIndicatorSpecRelationshipItem); + return this; + } + + /** + * Get performanceIndicatorSpecRelationship + * @return performanceIndicatorSpecRelationship + */ + @Valid @Size(min = 0) + @Schema(name = "performanceIndicatorSpecRelationship", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorSpecRelationship") + public List<PerformanceIndicatorSpecRelationshipMVO> getPerformanceIndicatorSpecRelationship() { + return performanceIndicatorSpecRelationship; + } + + public void setPerformanceIndicatorSpecRelationship(List<PerformanceIndicatorSpecRelationshipMVO> performanceIndicatorSpecRelationship) { + this.performanceIndicatorSpecRelationship = performanceIndicatorSpecRelationship; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorSpecificationMVO performanceIndicatorSpecificationMVO = (PerformanceIndicatorSpecificationMVO) o; + return Objects.equals(this.type, performanceIndicatorSpecificationMVO.type) && + Objects.equals(this.baseType, performanceIndicatorSpecificationMVO.baseType) && + Objects.equals(this.schemaLocation, performanceIndicatorSpecificationMVO.schemaLocation) && + Objects.equals(this.href, performanceIndicatorSpecificationMVO.href) && + Objects.equals(this.uuid, performanceIndicatorSpecificationMVO.uuid) && + Objects.equals(this.name, performanceIndicatorSpecificationMVO.name) && + Objects.equals(this.description, performanceIndicatorSpecificationMVO.description) && + Objects.equals(this.perspective, performanceIndicatorSpecificationMVO.perspective) && + Objects.equals(this.indicatorCategory, performanceIndicatorSpecificationMVO.indicatorCategory) && + Objects.equals(this.indicatorType, performanceIndicatorSpecificationMVO.indicatorType) && + Objects.equals(this.derivationAlgorithm, performanceIndicatorSpecificationMVO.derivationAlgorithm) && + Objects.equals(this.derivationMethod, performanceIndicatorSpecificationMVO.derivationMethod) && + Objects.equals(this.validFor, performanceIndicatorSpecificationMVO.validFor) && + Objects.equals(this.collectionType, performanceIndicatorSpecificationMVO.collectionType) && + Objects.equals(this.indicatorUnit, performanceIndicatorSpecificationMVO.indicatorUnit) && + Objects.equals(this.performanceIndicatorSpecRelationship, performanceIndicatorSpecificationMVO.performanceIndicatorSpecRelationship); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, description, perspective, indicatorCategory, indicatorType, derivationAlgorithm, derivationMethod, validFor, collectionType, indicatorUnit, performanceIndicatorSpecRelationship); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorSpecificationMVO {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" perspective: ").append(toIndentedString(perspective)).append("\n"); + sb.append(" indicatorCategory: ").append(toIndentedString(indicatorCategory)).append("\n"); + sb.append(" indicatorType: ").append(toIndentedString(indicatorType)).append("\n"); + sb.append(" derivationAlgorithm: ").append(toIndentedString(derivationAlgorithm)).append("\n"); + sb.append(" derivationMethod: ").append(toIndentedString(derivationMethod)).append("\n"); + sb.append(" validFor: ").append(toIndentedString(validFor)).append("\n"); + sb.append(" collectionType: ").append(toIndentedString(collectionType)).append("\n"); + sb.append(" indicatorUnit: ").append(toIndentedString(indicatorUnit)).append("\n"); + sb.append(" performanceIndicatorSpecRelationship: ").append(toIndentedString(performanceIndicatorSpecRelationship)).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/pm628/model/PerformanceIndicatorSpecificationMapper.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..34f352297045d7f9078c2852767d0eb1ee10d05f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationMapper.java @@ -0,0 +1,21 @@ +package org.etsi.osl.tmf.pm628.model; + +import org.mapstruct.*; + +@Mapper( + nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT, + nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, + collectionMappingStrategy = CollectionMappingStrategy.ACCESSOR_ONLY // Collection- or map-typed properties of the target bean to be updated will be cleared and then populated with the values from the corresponding source collection or map +) +public interface PerformanceIndicatorSpecificationMapper { + + PerformanceIndicatorSpecification createPerformanceIndicatorSpecification(PerformanceIndicatorSpecificationFVO performanceIndicatorSpecificationFVO); + + @Mapping(target = "type", ignore = true) + @Mapping(target = "baseType", ignore = true) + @Mapping(target = "schemaLocation", ignore = true) + @Mapping(target = "href", ignore = true) + @Mapping(target = "uuid", ignore = true) + @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE) + PerformanceIndicatorSpecification updatePerformanceIndicatorSpecification(PerformanceIndicatorSpecificationMVO performanceIndicatorSpecificationMVO, @MappingTarget PerformanceIndicatorSpecification performanceIndicatorSpecification); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRef.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRef.java new file mode 100644 index 0000000000000000000000000000000000000000..a9b0d63fd6122f59a05c31f146c12937aa8b4707 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRef.java @@ -0,0 +1,129 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PerformanceIndicatorSpecificationRef + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_PerfIndSpecRef") +public class PerformanceIndicatorSpecificationRef extends BaseRootNamedEntity implements PerformanceIndicatorSpecificationRefOrValue { + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("version") + private String version; + + public PerformanceIndicatorSpecificationRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceIndicatorSpecificationRef(String type, String uuid) { + this.type = type; + this.uuid = uuid; + } + + public PerformanceIndicatorSpecificationRef referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public PerformanceIndicatorSpecificationRef version(String version) { + this.version = version; + return this; + } + + /** + * Version of the performance indicator specification + * @return version + */ + + @Schema(name = "version", description = "Version of the performance indicator specification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("version") + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorSpecificationRef performanceIndicatorSpecificationRef = (PerformanceIndicatorSpecificationRef) o; + return Objects.equals(this.type, performanceIndicatorSpecificationRef.type) && + Objects.equals(this.baseType, performanceIndicatorSpecificationRef.baseType) && + Objects.equals(this.schemaLocation, performanceIndicatorSpecificationRef.schemaLocation) && + Objects.equals(this.href, performanceIndicatorSpecificationRef.href) && + Objects.equals(this.uuid, performanceIndicatorSpecificationRef.uuid) && + Objects.equals(this.name, performanceIndicatorSpecificationRef.name) && + Objects.equals(this.referredType, performanceIndicatorSpecificationRef.referredType) && + Objects.equals(this.version, performanceIndicatorSpecificationRef.version); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorSpecificationRef {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/pm628/model/PerformanceIndicatorSpecificationRefFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..9c47680cf7d95963fd5fd9f961264f7122e09a85 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefFVO.java @@ -0,0 +1,264 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PerformanceIndicatorSpecificationRefFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceIndicatorSpecificationRefFVO implements PerformanceIndicatorSpecificationRefOrValueFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("version") + private String version; + + public PerformanceIndicatorSpecificationRefFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceIndicatorSpecificationRefFVO(String type) { + this.type = type; + } + + public PerformanceIndicatorSpecificationRefFVO type(String type) { + this.type = type; + 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 getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PerformanceIndicatorSpecificationRefFVO baseType(String baseType) { + this.baseType = baseType; + 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 getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public PerformanceIndicatorSpecificationRefFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + 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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PerformanceIndicatorSpecificationRefFVO 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 PerformanceIndicatorSpecificationRefFVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PerformanceIndicatorSpecificationRefFVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PerformanceIndicatorSpecificationRefFVO referredType(String referredType) { + this.referredType = referredType; + 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) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public PerformanceIndicatorSpecificationRefFVO version(String version) { + this.version = version; + return this; + } + + /** + * Version of the performance indicator specification + * @return version + */ + + @Schema(name = "version", description = "Version of the performance indicator specification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("version") + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorSpecificationRefFVO performanceIndicatorSpecificationRefFVO = (PerformanceIndicatorSpecificationRefFVO) o; + return Objects.equals(this.type, performanceIndicatorSpecificationRefFVO.type) && + Objects.equals(this.baseType, performanceIndicatorSpecificationRefFVO.baseType) && + Objects.equals(this.schemaLocation, performanceIndicatorSpecificationRefFVO.schemaLocation) && + Objects.equals(this.href, performanceIndicatorSpecificationRefFVO.href) && + Objects.equals(this.uuid, performanceIndicatorSpecificationRefFVO.uuid) && + Objects.equals(this.name, performanceIndicatorSpecificationRefFVO.name) && + Objects.equals(this.referredType, performanceIndicatorSpecificationRefFVO.referredType) && + Objects.equals(this.version, performanceIndicatorSpecificationRefFVO.version); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorSpecificationRefFVO {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" atReferredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/pm628/model/PerformanceIndicatorSpecificationRefMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..d1f799e2e85ba58b689389e8e96da7c4510ea3a4 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefMVO.java @@ -0,0 +1,263 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PerformanceIndicatorSpecificationRefMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceIndicatorSpecificationRefMVO implements PerformanceIndicatorSpecificationRefOrValueMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("version") + private String version; + + public PerformanceIndicatorSpecificationRefMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceIndicatorSpecificationRefMVO(String type) { + this.type = type; + } + + public PerformanceIndicatorSpecificationRefMVO type(String type) { + this.type = type; + 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 getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PerformanceIndicatorSpecificationRefMVO baseType(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 getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public PerformanceIndicatorSpecificationRefMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + 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 getschemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PerformanceIndicatorSpecificationRefMVO 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 PerformanceIndicatorSpecificationRefMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * The identifier of the referred entity. + * @return id + */ + + @Schema(name = "id", description = "The identifier of the referred entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PerformanceIndicatorSpecificationRefMVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PerformanceIndicatorSpecificationRefMVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public PerformanceIndicatorSpecificationRefMVO version(String version) { + this.version = version; + return this; + } + + /** + * Version of the performance indicator specification + * @return version + */ + + @Schema(name = "version", description = "Version of the performance indicator specification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("version") + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorSpecificationRefMVO performanceIndicatorSpecificationRefMVO = (PerformanceIndicatorSpecificationRefMVO) o; + return Objects.equals(this.type, performanceIndicatorSpecificationRefMVO.type) && + Objects.equals(this.baseType, performanceIndicatorSpecificationRefMVO.baseType) && + Objects.equals(this.schemaLocation, performanceIndicatorSpecificationRefMVO.schemaLocation) && + Objects.equals(this.href, performanceIndicatorSpecificationRefMVO.href) && + Objects.equals(this.uuid, performanceIndicatorSpecificationRefMVO.uuid) && + Objects.equals(this.name, performanceIndicatorSpecificationRefMVO.name) && + Objects.equals(this.referredType, performanceIndicatorSpecificationRefMVO.referredType) && + Objects.equals(this.version, performanceIndicatorSpecificationRefMVO.version); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorSpecificationRefMVO {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/pm628/model/PerformanceIndicatorSpecificationRefOrValue.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefOrValue.java new file mode 100644 index 0000000000000000000000000000000000000000..a8d9bfa949a0aaf86064951b1a53dd65ae7badf0 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefOrValue.java @@ -0,0 +1,23 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import javax.annotation.Generated; + + +@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 = PerformanceIndicatorSpecification.class, name = "PerformanceIndicatorSpecification"), + @JsonSubTypes.Type(value = PerformanceIndicatorSpecificationRef.class, name = "PerformanceIndicatorSpecificationRef") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface PerformanceIndicatorSpecificationRefOrValue { + public String getType(); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefOrValueFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefOrValueFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..1873ec736f894d342cf50d5a507c5fc8c866c22b --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefOrValueFVO.java @@ -0,0 +1,25 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import javax.annotation.Generated; + + +@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 = PerformanceIndicatorSpecificationFVO.class, name = "PerformanceIndicatorSpecification"), + @JsonSubTypes.Type(value = PerformanceIndicatorSpecificationRefFVO.class, name = "PerformanceIndicatorSpecificationRef"), + @JsonSubTypes.Type(value = PerformanceIndicatorSpecificationRefFVO.class, name = "PerformanceIndicatorSpecificationRef_FVO"), + @JsonSubTypes.Type(value = PerformanceIndicatorSpecificationFVO.class, name = "PerformanceIndicatorSpecification_FVO") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface PerformanceIndicatorSpecificationRefOrValueFVO { + public String getType(); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefOrValueMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefOrValueMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..113942718becfe5e1503057d0aa7984015072155 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefOrValueMVO.java @@ -0,0 +1,25 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import javax.annotation.Generated; + + +@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 = PerformanceIndicatorSpecificationMVO.class, name = "PerformanceIndicatorSpecification"), + @JsonSubTypes.Type(value = PerformanceIndicatorSpecificationRefMVO.class, name = "PerformanceIndicatorSpecificationRef"), + @JsonSubTypes.Type(value = PerformanceIndicatorSpecificationRefMVO.class, name = "PerformanceIndicatorSpecificationRef_MVO"), + @JsonSubTypes.Type(value = PerformanceIndicatorSpecificationMVO.class, name = "PerformanceIndicatorSpecification_MVO") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface PerformanceIndicatorSpecificationRefOrValueMVO { + public String getType(); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefOrValueMapper.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefOrValueMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..f3979cb7ff9ae66e6d49b5b9c776fb79dbcbc101 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorSpecificationRefOrValueMapper.java @@ -0,0 +1,19 @@ +package org.etsi.osl.tmf.pm628.model; + +import org.mapstruct.*; + +@Mapper( + nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT, + nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, + subclassExhaustiveStrategy = SubclassExhaustiveStrategy.RUNTIME_EXCEPTION +) +public interface PerformanceIndicatorSpecificationRefOrValueMapper { + + @SubclassMapping(source = PerformanceIndicatorSpecificationRefFVO.class, target = PerformanceIndicatorSpecificationRef.class) + @SubclassMapping(source = PerformanceIndicatorSpecificationFVO.class, target = PerformanceIndicatorSpecification.class) + PerformanceIndicatorSpecificationRefOrValue map(PerformanceIndicatorSpecificationRefOrValueFVO source); + + @SubclassMapping(source = PerformanceIndicatorSpecificationRefMVO.class, target = PerformanceIndicatorSpecificationRef.class) + @SubclassMapping(source = PerformanceIndicatorSpecificationMVO.class, target = PerformanceIndicatorSpecification.class) + PerformanceIndicatorSpecificationRefOrValue map(PerformanceIndicatorSpecificationRefOrValueMVO source); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorValue.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorValue.java new file mode 100644 index 0000000000000000000000000000000000000000..4fcdc0e166bf9ce9f39578556ac84bd2ec3b671d --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceIndicatorValue.java @@ -0,0 +1,125 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * A value of a performance indicator. + */ + +@Schema(name = "PerformanceIndicatorValue", description = "A value of a performance indicator.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceIndicatorValue { + + private PerformanceIndicatorSpecificationRefOrValue performanceIndicatorSpecification; + + private String observedValue; + + private Object tag; + + public PerformanceIndicatorValue performanceIndicatorSpecification(PerformanceIndicatorSpecificationRefOrValue performanceIndicatorSpecification) { + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + return this; + } + + /** + * Get performanceIndicatorSpecification + * @return performanceIndicatorSpecification + */ + @Valid + @Schema(name = "performanceIndicatorSpecification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorSpecification") + public PerformanceIndicatorSpecificationRefOrValue getPerformanceIndicatorSpecification() { + return performanceIndicatorSpecification; + } + + public void setPerformanceIndicatorSpecification(PerformanceIndicatorSpecificationRefOrValue performanceIndicatorSpecification) { + this.performanceIndicatorSpecification = performanceIndicatorSpecification; + } + + public PerformanceIndicatorValue observedValue(String observedValue) { + this.observedValue = observedValue; + return this; + } + + /** + * The measurement value + * @return observedValue + */ + + @Schema(name = "observedValue", description = "The measurement value", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("observedValue") + public String getObservedValue() { + return observedValue; + } + + public void setObservedValue(String observedValue) { + this.observedValue = observedValue; + } + + public PerformanceIndicatorValue tag(Object tag) { + this.tag = tag; + return this; + } + + /** + * The optional tag object attached to this observed value + * @return tag + */ + + @Schema(name = "tag", description = "The optional tag object attached to this observed value", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("tag") + public Object getTag() { + return tag; + } + + public void setTag(Object tag) { + this.tag = tag; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceIndicatorValue performanceIndicatorValue = (PerformanceIndicatorValue) o; + return Objects.equals(this.performanceIndicatorSpecification, performanceIndicatorValue.performanceIndicatorSpecification) && + Objects.equals(this.observedValue, performanceIndicatorValue.observedValue) && + Objects.equals(this.tag, performanceIndicatorValue.tag); + } + + @Override + public int hashCode() { + return Objects.hash(performanceIndicatorSpecification, observedValue, tag); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceIndicatorValue {\n"); + sb.append(" performanceIndicatorSpecification: ").append(toIndentedString(performanceIndicatorSpecification)).append("\n"); + sb.append(" observedValue: ").append(toIndentedString(observedValue)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).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/pm628/model/PerformanceMeasurement.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurement.java new file mode 100644 index 0000000000000000000000000000000000000000..edfacf6d0b652301c84f5acc9f360e460039cb9c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurement.java @@ -0,0 +1,331 @@ +package org.etsi.osl.tmf.pm628.model; + +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.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import org.etsi.osl.tmf.common.model.TimePeriod; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * PerformanceMeasurement + */ + +@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 = PerformanceMeasurement.class, name = "PerformanceMeasurement"), + @JsonSubTypes.Type(value = PerformanceMeasurementAtomic.class, name = "PerformanceMeasurementAtomic"), + @JsonSubTypes.Type(value = PerformanceMeasurementGroup.class, name = "PerformanceMeasurementGroup") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceMeasurement implements PerformanceMeasurementRefOrValue { + + private String atType; + + private String atBaseType; + + private String atSchemaLocation; + + private String href; + + private String id; + + private String description; + + private MeasurementCollectionJobRef measurementCollectionJob; + + private TimePeriod validFor; + + @Valid + private List<PerformanceMeasurementRelationship> relatedMeasurement = new ArrayList<>(); + + private Object tag; + + public PerformanceMeasurement() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceMeasurement(String atType) { + this.atType = atType; + } + + public PerformanceMeasurement 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) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public PerformanceMeasurement 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 PerformanceMeasurement 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 PerformanceMeasurement 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 PerformanceMeasurement id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public PerformanceMeasurement description(String description) { + this.description = description; + return this; + } + + /** + * A free-text description of the performance measurement + * @return description + */ + + @Schema(name = "description", description = "A free-text description of the performance measurement", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public PerformanceMeasurement measurementCollectionJob(MeasurementCollectionJobRef measurementCollectionJob) { + this.measurementCollectionJob = measurementCollectionJob; + return this; + } + + /** + * Get measurementCollectionJob + * @return measurementCollectionJob + */ + @Valid + @Schema(name = "measurementCollectionJob", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("measurementCollectionJob") + public MeasurementCollectionJobRef getMeasurementCollectionJob() { + return measurementCollectionJob; + } + + public void setMeasurementCollectionJob(MeasurementCollectionJobRef measurementCollectionJob) { + this.measurementCollectionJob = measurementCollectionJob; + } + + public PerformanceMeasurement 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 PerformanceMeasurement relatedMeasurement(List<PerformanceMeasurementRelationship> relatedMeasurement) { + this.relatedMeasurement = relatedMeasurement; + return this; + } + + public PerformanceMeasurement addRelatedMeasurementItem(PerformanceMeasurementRelationship relatedMeasurementItem) { + if (this.relatedMeasurement == null) { + this.relatedMeasurement = new ArrayList<>(); + } + this.relatedMeasurement.add(relatedMeasurementItem); + return this; + } + + /** + * related Performance measurements array + * @return relatedMeasurement + */ + @Valid @Size(min = 0) + @Schema(name = "relatedMeasurement", description = "related Performance measurements array", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("relatedMeasurement") + public List<PerformanceMeasurementRelationship> getRelatedMeasurement() { + return relatedMeasurement; + } + + public void setRelatedMeasurement(List<PerformanceMeasurementRelationship> relatedMeasurement) { + this.relatedMeasurement = relatedMeasurement; + } + + public PerformanceMeasurement tag(Object tag) { + this.tag = tag; + return this; + } + + /** + * The optional tag object attached to this entire measurement + * @return tag + */ + + @Schema(name = "tag", description = "The optional tag object attached to this entire measurement", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("tag") + public Object getTag() { + return tag; + } + + public void setTag(Object tag) { + this.tag = tag; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceMeasurement performanceMeasurement = (PerformanceMeasurement) o; + return Objects.equals(this.atType, performanceMeasurement.atType) && + Objects.equals(this.atBaseType, performanceMeasurement.atBaseType) && + Objects.equals(this.atSchemaLocation, performanceMeasurement.atSchemaLocation) && + Objects.equals(this.href, performanceMeasurement.href) && + Objects.equals(this.id, performanceMeasurement.id) && + Objects.equals(this.description, performanceMeasurement.description) && + Objects.equals(this.measurementCollectionJob, performanceMeasurement.measurementCollectionJob) && + Objects.equals(this.validFor, performanceMeasurement.validFor) && + Objects.equals(this.relatedMeasurement, performanceMeasurement.relatedMeasurement) && + Objects.equals(this.tag, performanceMeasurement.tag); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation, href, id, description, measurementCollectionJob, validFor, relatedMeasurement, tag); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceMeasurement {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" measurementCollectionJob: ").append(toIndentedString(measurementCollectionJob)).append("\n"); + sb.append(" validFor: ").append(toIndentedString(validFor)).append("\n"); + sb.append(" relatedMeasurement: ").append(toIndentedString(relatedMeasurement)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).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/pm628/model/PerformanceMeasurementAtomic.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementAtomic.java new file mode 100644 index 0000000000000000000000000000000000000000..0288670b0c946757be3986a80876de4c78480816 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementAtomic.java @@ -0,0 +1,158 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.Size; +import org.etsi.osl.tmf.common.model.TimePeriod; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * PerformanceMeasurementAtomic + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceMeasurementAtomic extends PerformanceMeasurement { + + @Valid + private List<@Valid PerformanceIndicatorValue> performanceIndicatorValue = new ArrayList<>(); + + public PerformanceMeasurementAtomic() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceMeasurementAtomic(String atType) { + super(atType); + } + + public PerformanceMeasurementAtomic performanceIndicatorValue(List<@Valid PerformanceIndicatorValue> performanceIndicatorValue) { + this.performanceIndicatorValue = performanceIndicatorValue; + return this; + } + + public PerformanceMeasurementAtomic addPerformanceIndicatorValueItem(PerformanceIndicatorValue performanceIndicatorValueItem) { + if (this.performanceIndicatorValue == null) { + this.performanceIndicatorValue = new ArrayList<>(); + } + this.performanceIndicatorValue.add(performanceIndicatorValueItem); + return this; + } + + /** + * Get performanceIndicatorValue + * @return performanceIndicatorValue + */ + @Valid @Size(min = 1) + @Schema(name = "performanceIndicatorValue", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorValue") + public List<@Valid PerformanceIndicatorValue> getPerformanceIndicatorValue() { + return performanceIndicatorValue; + } + + public void setPerformanceIndicatorValue(List<@Valid PerformanceIndicatorValue> performanceIndicatorValue) { + this.performanceIndicatorValue = performanceIndicatorValue; + } + + + public PerformanceMeasurementAtomic atType(String atType) { + super.atType(atType); + return this; + } + + public PerformanceMeasurementAtomic atBaseType(String atBaseType) { + super.atBaseType(atBaseType); + return this; + } + + public PerformanceMeasurementAtomic atSchemaLocation(String atSchemaLocation) { + super.atSchemaLocation(atSchemaLocation); + return this; + } + + public PerformanceMeasurementAtomic href(String href) { + super.href(href); + return this; + } + + public PerformanceMeasurementAtomic id(String id) { + super.id(id); + return this; + } + + public PerformanceMeasurementAtomic description(String description) { + super.description(description); + return this; + } + + public PerformanceMeasurementAtomic measurementCollectionJob(MeasurementCollectionJobRef measurementCollectionJob) { + super.measurementCollectionJob(measurementCollectionJob); + return this; + } + + public PerformanceMeasurementAtomic validFor(TimePeriod validFor) { + super.validFor(validFor); + return this; + } + + public PerformanceMeasurementAtomic relatedMeasurement(List<PerformanceMeasurementRelationship> relatedMeasurement) { + super.relatedMeasurement(relatedMeasurement); + return this; + } + + public PerformanceMeasurementAtomic addRelatedMeasurementItem(PerformanceMeasurementRelationship relatedMeasurementItem) { + super.addRelatedMeasurementItem(relatedMeasurementItem); + return this; + } + + public PerformanceMeasurementAtomic tag(Object tag) { + super.tag(tag); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceMeasurementAtomic performanceMeasurementAtomic = (PerformanceMeasurementAtomic) o; + return Objects.equals(this.performanceIndicatorValue, performanceMeasurementAtomic.performanceIndicatorValue) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(performanceIndicatorValue, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceMeasurementAtomic {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" performanceIndicatorValue: ").append(toIndentedString(performanceIndicatorValue)).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/pm628/model/PerformanceMeasurementCollectionReadyEvent.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementCollectionReadyEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..9e10b3473acb08e5b6f543ec0a51e3f690294833 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementCollectionReadyEvent.java @@ -0,0 +1,546 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.ri639.model.EntityRef; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * PerformanceMeasurementCollectionReadyEvent + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceMeasurementCollectionReadyEvent { + + private String atType; + + private String atBaseType; + + private String atSchemaLocation; + + private String href; + + private String id; + + private String correlationId; + + private String domain; + + private String title; + + private String description; + + private String priority; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime timeOccurred; + + private EntityRef source; + + private EntityRef reportingSystem; + + @Valid + private List<RelatedPartyRefOrPartyRoleRef> relatedParty = new ArrayList<>(); + + @Valid + private List<Characteristic> analyticCharacteristic = new ArrayList<>(); + + private String eventId; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime eventTime; + + private String eventType; + + private PerformanceMeasurementCollectionReadyEventPayload event; + + public PerformanceMeasurementCollectionReadyEvent() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceMeasurementCollectionReadyEvent(String atType) { + this.atType = atType; + } + + public PerformanceMeasurementCollectionReadyEvent 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) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public PerformanceMeasurementCollectionReadyEvent 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 PerformanceMeasurementCollectionReadyEvent 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 PerformanceMeasurementCollectionReadyEvent 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 PerformanceMeasurementCollectionReadyEvent id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public PerformanceMeasurementCollectionReadyEvent 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) + @JsonProperty("correlationId") + public String getCorrelationId() { + return correlationId; + } + + public void setCorrelationId(String correlationId) { + this.correlationId = correlationId; + } + + public PerformanceMeasurementCollectionReadyEvent 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) + @JsonProperty("domain") + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public PerformanceMeasurementCollectionReadyEvent 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) + @JsonProperty("title") + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public PerformanceMeasurementCollectionReadyEvent description(String description) { + this.description = description; + return this; + } + + /** + * An explanation of the event. + * @return description + */ + + @Schema(name = "description", description = "An explanation of the event.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public PerformanceMeasurementCollectionReadyEvent priority(String priority) { + this.priority = priority; + return this; + } + + /** + * A priority. + * @return priority + */ + + @Schema(name = "priority", description = "A priority.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("priority") + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public PerformanceMeasurementCollectionReadyEvent timeOccurred(OffsetDateTime timeOccurred) { + this.timeOccurred = timeOccurred; + return this; + } + + /** + * The time the event occurred. + * @return timeOccurred + */ + @Valid + @Schema(name = "timeOccurred", description = "The time the event occurred.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("timeOccurred") + public OffsetDateTime getTimeOccurred() { + return timeOccurred; + } + + public void setTimeOccurred(OffsetDateTime timeOccurred) { + this.timeOccurred = timeOccurred; + } + + public PerformanceMeasurementCollectionReadyEvent source(EntityRef source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @Valid + @Schema(name = "source", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("source") + public EntityRef getSource() { + return source; + } + + public void setSource(EntityRef source) { + this.source = source; + } + + public PerformanceMeasurementCollectionReadyEvent reportingSystem(EntityRef reportingSystem) { + this.reportingSystem = reportingSystem; + return this; + } + + /** + * Get reportingSystem + * @return reportingSystem + */ + @Valid + @Schema(name = "reportingSystem", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("reportingSystem") + public EntityRef getReportingSystem() { + return reportingSystem; + } + + public void setReportingSystem(EntityRef reportingSystem) { + this.reportingSystem = reportingSystem; + } + + public PerformanceMeasurementCollectionReadyEvent relatedParty(List<RelatedPartyRefOrPartyRoleRef> relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public PerformanceMeasurementCollectionReadyEvent addRelatedPartyItem(RelatedPartyRefOrPartyRoleRef relatedPartyItem) { + if (this.relatedParty == null) { + this.relatedParty = new ArrayList<>(); + } + this.relatedParty.add(relatedPartyItem); + return this; + } + + /** + * Collection of related parties + * @return relatedParty + */ + @Valid + @Schema(name = "relatedParty", description = "Collection of related parties", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("relatedParty") + public List<RelatedPartyRefOrPartyRoleRef> getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List<RelatedPartyRefOrPartyRoleRef> relatedParty) { + this.relatedParty = relatedParty; + } + + public PerformanceMeasurementCollectionReadyEvent analyticCharacteristic(List<Characteristic> analyticCharacteristic) { + this.analyticCharacteristic = analyticCharacteristic; + return this; + } + + public PerformanceMeasurementCollectionReadyEvent addAnalyticCharacteristicItem(Characteristic analyticCharacteristicItem) { + if (this.analyticCharacteristic == null) { + this.analyticCharacteristic = new ArrayList<>(); + } + this.analyticCharacteristic.add(analyticCharacteristicItem); + return this; + } + + /** + * Collection of analytic characteristics + * @return analyticCharacteristic + */ + @Valid + @Schema(name = "analyticCharacteristic", description = "Collection of analytic characteristics", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("analyticCharacteristic") + public List<Characteristic> getAnalyticCharacteristic() { + return analyticCharacteristic; + } + + public void setAnalyticCharacteristic(List<Characteristic> analyticCharacteristic) { + this.analyticCharacteristic = analyticCharacteristic; + } + + public PerformanceMeasurementCollectionReadyEvent 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) + @JsonProperty("eventId") + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + public PerformanceMeasurementCollectionReadyEvent 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) + @JsonProperty("eventTime") + public OffsetDateTime getEventTime() { + return eventTime; + } + + public void setEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + } + + public PerformanceMeasurementCollectionReadyEvent 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) + @JsonProperty("eventType") + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public PerformanceMeasurementCollectionReadyEvent event(PerformanceMeasurementCollectionReadyEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + @Valid + @Schema(name = "event", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("event") + public PerformanceMeasurementCollectionReadyEventPayload getEvent() { + return event; + } + + public void setEvent(PerformanceMeasurementCollectionReadyEventPayload event) { + this.event = event; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceMeasurementCollectionReadyEvent performanceMeasurementCollectionReadyEvent = (PerformanceMeasurementCollectionReadyEvent) o; + return Objects.equals(this.atType, performanceMeasurementCollectionReadyEvent.atType) && + Objects.equals(this.atBaseType, performanceMeasurementCollectionReadyEvent.atBaseType) && + Objects.equals(this.atSchemaLocation, performanceMeasurementCollectionReadyEvent.atSchemaLocation) && + Objects.equals(this.href, performanceMeasurementCollectionReadyEvent.href) && + Objects.equals(this.id, performanceMeasurementCollectionReadyEvent.id) && + Objects.equals(this.correlationId, performanceMeasurementCollectionReadyEvent.correlationId) && + Objects.equals(this.domain, performanceMeasurementCollectionReadyEvent.domain) && + Objects.equals(this.title, performanceMeasurementCollectionReadyEvent.title) && + Objects.equals(this.description, performanceMeasurementCollectionReadyEvent.description) && + Objects.equals(this.priority, performanceMeasurementCollectionReadyEvent.priority) && + Objects.equals(this.timeOccurred, performanceMeasurementCollectionReadyEvent.timeOccurred) && + Objects.equals(this.source, performanceMeasurementCollectionReadyEvent.source) && + Objects.equals(this.reportingSystem, performanceMeasurementCollectionReadyEvent.reportingSystem) && + Objects.equals(this.relatedParty, performanceMeasurementCollectionReadyEvent.relatedParty) && + Objects.equals(this.analyticCharacteristic, performanceMeasurementCollectionReadyEvent.analyticCharacteristic) && + Objects.equals(this.eventId, performanceMeasurementCollectionReadyEvent.eventId) && + Objects.equals(this.eventTime, performanceMeasurementCollectionReadyEvent.eventTime) && + Objects.equals(this.eventType, performanceMeasurementCollectionReadyEvent.eventType) && + Objects.equals(this.event, performanceMeasurementCollectionReadyEvent.event); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation, href, id, correlationId, domain, title, description, priority, timeOccurred, source, reportingSystem, relatedParty, analyticCharacteristic, eventId, eventTime, eventType, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceMeasurementCollectionReadyEvent {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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(" timeOccurred: ").append(toIndentedString(timeOccurred)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" reportingSystem: ").append(toIndentedString(reportingSystem)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" analyticCharacteristic: ").append(toIndentedString(analyticCharacteristic)).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(" 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/pm628/model/PerformanceMeasurementCollectionReadyEventPayload.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementCollectionReadyEventPayload.java new file mode 100644 index 0000000000000000000000000000000000000000..5db0dc59c68361f5f610c6442de39be916d6da33 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementCollectionReadyEventPayload.java @@ -0,0 +1,77 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PerformanceMeasurementCollectionReadyEventPayload generic structure + */ + +@Schema(name = "PerformanceMeasurementCollectionReadyEventPayload", description = "PerformanceMeasurementCollectionReadyEventPayload generic structure") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceMeasurementCollectionReadyEventPayload { + + private PerformanceMeasurement performanceMeasurement; + + public PerformanceMeasurementCollectionReadyEventPayload performanceMeasurement(PerformanceMeasurement performanceMeasurement) { + this.performanceMeasurement = performanceMeasurement; + return this; + } + + /** + * Get performanceMeasurement + * @return performanceMeasurement + */ + @Valid + @Schema(name = "performanceMeasurement", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceMeasurement") + public PerformanceMeasurement getPerformanceMeasurement() { + return performanceMeasurement; + } + + public void setPerformanceMeasurement(PerformanceMeasurement performanceMeasurement) { + this.performanceMeasurement = performanceMeasurement; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceMeasurementCollectionReadyEventPayload performanceMeasurementCollectionReadyEventPayload = (PerformanceMeasurementCollectionReadyEventPayload) o; + return Objects.equals(this.performanceMeasurement, performanceMeasurementCollectionReadyEventPayload.performanceMeasurement); + } + + @Override + public int hashCode() { + return Objects.hash(performanceMeasurement); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceMeasurementCollectionReadyEventPayload {\n"); + sb.append(" performanceMeasurement: ").append(toIndentedString(performanceMeasurement)).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/pm628/model/PerformanceMeasurementCreateEvent.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementCreateEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..96937a4746c167ac6f5a75339c9d325dc1233e8b --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementCreateEvent.java @@ -0,0 +1,546 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.ri639.model.EntityRef; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * PerformanceMeasurementCreateEvent + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceMeasurementCreateEvent { + + private String atType; + + private String atBaseType; + + private String atSchemaLocation; + + private String href; + + private String id; + + private String correlationId; + + private String domain; + + private String title; + + private String description; + + private String priority; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime timeOccurred; + + private EntityRef source; + + private EntityRef reportingSystem; + + @Valid + private List<RelatedPartyRefOrPartyRoleRef> relatedParty = new ArrayList<>(); + + @Valid + private List<Characteristic> analyticCharacteristic = new ArrayList<>(); + + private String eventId; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime eventTime; + + private String eventType; + + private PerformanceMeasurementCreateEventPayload event; + + public PerformanceMeasurementCreateEvent() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceMeasurementCreateEvent(String atType) { + this.atType = atType; + } + + public PerformanceMeasurementCreateEvent 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) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public PerformanceMeasurementCreateEvent 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 PerformanceMeasurementCreateEvent 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 PerformanceMeasurementCreateEvent 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 PerformanceMeasurementCreateEvent id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public PerformanceMeasurementCreateEvent 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) + @JsonProperty("correlationId") + public String getCorrelationId() { + return correlationId; + } + + public void setCorrelationId(String correlationId) { + this.correlationId = correlationId; + } + + public PerformanceMeasurementCreateEvent 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) + @JsonProperty("domain") + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public PerformanceMeasurementCreateEvent 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) + @JsonProperty("title") + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public PerformanceMeasurementCreateEvent description(String description) { + this.description = description; + return this; + } + + /** + * An explanation of the event. + * @return description + */ + + @Schema(name = "description", description = "An explanation of the event.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public PerformanceMeasurementCreateEvent priority(String priority) { + this.priority = priority; + return this; + } + + /** + * A priority. + * @return priority + */ + + @Schema(name = "priority", description = "A priority.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("priority") + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public PerformanceMeasurementCreateEvent timeOccurred(OffsetDateTime timeOccurred) { + this.timeOccurred = timeOccurred; + return this; + } + + /** + * The time the event occurred. + * @return timeOccurred + */ + @Valid + @Schema(name = "timeOccurred", description = "The time the event occurred.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("timeOccurred") + public OffsetDateTime getTimeOccurred() { + return timeOccurred; + } + + public void setTimeOccurred(OffsetDateTime timeOccurred) { + this.timeOccurred = timeOccurred; + } + + public PerformanceMeasurementCreateEvent source(EntityRef source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + */ + @Valid + @Schema(name = "source", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("source") + public EntityRef getSource() { + return source; + } + + public void setSource(EntityRef source) { + this.source = source; + } + + public PerformanceMeasurementCreateEvent reportingSystem(EntityRef reportingSystem) { + this.reportingSystem = reportingSystem; + return this; + } + + /** + * Get reportingSystem + * @return reportingSystem + */ + @Valid + @Schema(name = "reportingSystem", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("reportingSystem") + public EntityRef getReportingSystem() { + return reportingSystem; + } + + public void setReportingSystem(EntityRef reportingSystem) { + this.reportingSystem = reportingSystem; + } + + public PerformanceMeasurementCreateEvent relatedParty(List<RelatedPartyRefOrPartyRoleRef> relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public PerformanceMeasurementCreateEvent addRelatedPartyItem(RelatedPartyRefOrPartyRoleRef relatedPartyItem) { + if (this.relatedParty == null) { + this.relatedParty = new ArrayList<>(); + } + this.relatedParty.add(relatedPartyItem); + return this; + } + + /** + * Collection of related parties + * @return relatedParty + */ + @Valid + @Schema(name = "relatedParty", description = "Collection of related parties", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("relatedParty") + public List<RelatedPartyRefOrPartyRoleRef> getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List<RelatedPartyRefOrPartyRoleRef> relatedParty) { + this.relatedParty = relatedParty; + } + + public PerformanceMeasurementCreateEvent analyticCharacteristic(List<Characteristic> analyticCharacteristic) { + this.analyticCharacteristic = analyticCharacteristic; + return this; + } + + public PerformanceMeasurementCreateEvent addAnalyticCharacteristicItem(Characteristic analyticCharacteristicItem) { + if (this.analyticCharacteristic == null) { + this.analyticCharacteristic = new ArrayList<>(); + } + this.analyticCharacteristic.add(analyticCharacteristicItem); + return this; + } + + /** + * Collection of analytic characteristics + * @return analyticCharacteristic + */ + @Valid + @Schema(name = "analyticCharacteristic", description = "Collection of analytic characteristics", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("analyticCharacteristic") + public List<Characteristic> getAnalyticCharacteristic() { + return analyticCharacteristic; + } + + public void setAnalyticCharacteristic(List<Characteristic> analyticCharacteristic) { + this.analyticCharacteristic = analyticCharacteristic; + } + + public PerformanceMeasurementCreateEvent 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) + @JsonProperty("eventId") + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + public PerformanceMeasurementCreateEvent 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) + @JsonProperty("eventTime") + public OffsetDateTime getEventTime() { + return eventTime; + } + + public void setEventTime(OffsetDateTime eventTime) { + this.eventTime = eventTime; + } + + public PerformanceMeasurementCreateEvent 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) + @JsonProperty("eventType") + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public PerformanceMeasurementCreateEvent event(PerformanceMeasurementCreateEventPayload event) { + this.event = event; + return this; + } + + /** + * Get event + * @return event + */ + @Valid + @Schema(name = "event", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("event") + public PerformanceMeasurementCreateEventPayload getEvent() { + return event; + } + + public void setEvent(PerformanceMeasurementCreateEventPayload event) { + this.event = event; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceMeasurementCreateEvent performanceMeasurementCreateEvent = (PerformanceMeasurementCreateEvent) o; + return Objects.equals(this.atType, performanceMeasurementCreateEvent.atType) && + Objects.equals(this.atBaseType, performanceMeasurementCreateEvent.atBaseType) && + Objects.equals(this.atSchemaLocation, performanceMeasurementCreateEvent.atSchemaLocation) && + Objects.equals(this.href, performanceMeasurementCreateEvent.href) && + Objects.equals(this.id, performanceMeasurementCreateEvent.id) && + Objects.equals(this.correlationId, performanceMeasurementCreateEvent.correlationId) && + Objects.equals(this.domain, performanceMeasurementCreateEvent.domain) && + Objects.equals(this.title, performanceMeasurementCreateEvent.title) && + Objects.equals(this.description, performanceMeasurementCreateEvent.description) && + Objects.equals(this.priority, performanceMeasurementCreateEvent.priority) && + Objects.equals(this.timeOccurred, performanceMeasurementCreateEvent.timeOccurred) && + Objects.equals(this.source, performanceMeasurementCreateEvent.source) && + Objects.equals(this.reportingSystem, performanceMeasurementCreateEvent.reportingSystem) && + Objects.equals(this.relatedParty, performanceMeasurementCreateEvent.relatedParty) && + Objects.equals(this.analyticCharacteristic, performanceMeasurementCreateEvent.analyticCharacteristic) && + Objects.equals(this.eventId, performanceMeasurementCreateEvent.eventId) && + Objects.equals(this.eventTime, performanceMeasurementCreateEvent.eventTime) && + Objects.equals(this.eventType, performanceMeasurementCreateEvent.eventType) && + Objects.equals(this.event, performanceMeasurementCreateEvent.event); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation, href, id, correlationId, domain, title, description, priority, timeOccurred, source, reportingSystem, relatedParty, analyticCharacteristic, eventId, eventTime, eventType, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceMeasurementCreateEvent {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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(" timeOccurred: ").append(toIndentedString(timeOccurred)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" reportingSystem: ").append(toIndentedString(reportingSystem)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" analyticCharacteristic: ").append(toIndentedString(analyticCharacteristic)).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(" 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/pm628/model/PerformanceMeasurementCreateEventPayload.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementCreateEventPayload.java new file mode 100644 index 0000000000000000000000000000000000000000..5b6f1b1b5cbeabd8b5b9de0d73808bf22dfde01a --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementCreateEventPayload.java @@ -0,0 +1,77 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PerformanceMeasurementCreateEventPayload generic structure + */ + +@Schema(name = "PerformanceMeasurementCreateEventPayload", description = "PerformanceMeasurementCreateEventPayload generic structure") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceMeasurementCreateEventPayload { + + private PerformanceMeasurement performanceMeasurement; + + public PerformanceMeasurementCreateEventPayload performanceMeasurement(PerformanceMeasurement performanceMeasurement) { + this.performanceMeasurement = performanceMeasurement; + return this; + } + + /** + * Get performanceMeasurement + * @return performanceMeasurement + */ + @Valid + @Schema(name = "performanceMeasurement", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceMeasurement") + public PerformanceMeasurement getPerformanceMeasurement() { + return performanceMeasurement; + } + + public void setPerformanceMeasurement(PerformanceMeasurement performanceMeasurement) { + this.performanceMeasurement = performanceMeasurement; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceMeasurementCreateEventPayload performanceMeasurementCreateEventPayload = (PerformanceMeasurementCreateEventPayload) o; + return Objects.equals(this.performanceMeasurement, performanceMeasurementCreateEventPayload.performanceMeasurement); + } + + @Override + public int hashCode() { + return Objects.hash(performanceMeasurement); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceMeasurementCreateEventPayload {\n"); + sb.append(" performanceMeasurement: ").append(toIndentedString(performanceMeasurement)).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/pm628/model/PerformanceMeasurementGroup.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementGroup.java new file mode 100644 index 0000000000000000000000000000000000000000..0644d436f195e9d177fa2a96e4d1af48c1befcf0 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementGroup.java @@ -0,0 +1,158 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.Size; +import org.etsi.osl.tmf.common.model.TimePeriod; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * PerformanceMeasurementGroup + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceMeasurementGroup extends PerformanceMeasurement { + + @Valid + private List<@Valid PerformanceIndicatorGroupValue> performanceIndicatorGroupValue = new ArrayList<>(); + + public PerformanceMeasurementGroup() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceMeasurementGroup(String atType) { + super(atType); + } + + public PerformanceMeasurementGroup performanceIndicatorGroupValue(List<@Valid PerformanceIndicatorGroupValue> performanceIndicatorGroupValue) { + this.performanceIndicatorGroupValue = performanceIndicatorGroupValue; + return this; + } + + public PerformanceMeasurementGroup addPerformanceIndicatorGroupValueItem(PerformanceIndicatorGroupValue performanceIndicatorGroupValueItem) { + if (this.performanceIndicatorGroupValue == null) { + this.performanceIndicatorGroupValue = new ArrayList<>(); + } + this.performanceIndicatorGroupValue.add(performanceIndicatorGroupValueItem); + return this; + } + + /** + * Get performanceIndicatorGroupValue + * @return performanceIndicatorGroupValue + */ + @Valid @Size(min = 1) + @Schema(name = "performanceIndicatorGroupValue", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("performanceIndicatorGroupValue") + public List<@Valid PerformanceIndicatorGroupValue> getPerformanceIndicatorGroupValue() { + return performanceIndicatorGroupValue; + } + + public void setPerformanceIndicatorGroupValue(List<@Valid PerformanceIndicatorGroupValue> performanceIndicatorGroupValue) { + this.performanceIndicatorGroupValue = performanceIndicatorGroupValue; + } + + + public PerformanceMeasurementGroup atType(String atType) { + super.atType(atType); + return this; + } + + public PerformanceMeasurementGroup atBaseType(String atBaseType) { + super.atBaseType(atBaseType); + return this; + } + + public PerformanceMeasurementGroup atSchemaLocation(String atSchemaLocation) { + super.atSchemaLocation(atSchemaLocation); + return this; + } + + public PerformanceMeasurementGroup href(String href) { + super.href(href); + return this; + } + + public PerformanceMeasurementGroup id(String id) { + super.id(id); + return this; + } + + public PerformanceMeasurementGroup description(String description) { + super.description(description); + return this; + } + + public PerformanceMeasurementGroup measurementCollectionJob(MeasurementCollectionJobRef measurementCollectionJob) { + super.measurementCollectionJob(measurementCollectionJob); + return this; + } + + public PerformanceMeasurementGroup validFor(TimePeriod validFor) { + super.validFor(validFor); + return this; + } + + public PerformanceMeasurementGroup relatedMeasurement(List<PerformanceMeasurementRelationship> relatedMeasurement) { + super.relatedMeasurement(relatedMeasurement); + return this; + } + + public PerformanceMeasurementGroup addRelatedMeasurementItem(PerformanceMeasurementRelationship relatedMeasurementItem) { + super.addRelatedMeasurementItem(relatedMeasurementItem); + return this; + } + + public PerformanceMeasurementGroup tag(Object tag) { + super.tag(tag); + return this; + } + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceMeasurementGroup performanceMeasurementGroup = (PerformanceMeasurementGroup) o; + return Objects.equals(this.performanceIndicatorGroupValue, performanceMeasurementGroup.performanceIndicatorGroupValue) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(performanceIndicatorGroupValue, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceMeasurementGroup {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" performanceIndicatorGroupValue: ").append(toIndentedString(performanceIndicatorGroupValue)).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/pm628/model/PerformanceMeasurementRef.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementRef.java new file mode 100644 index 0000000000000000000000000000000000000000..569a02c8dbdb57e341d1ccc37bd381b34805ec03 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementRef.java @@ -0,0 +1,257 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PerformanceMeasurementRef + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceMeasurementRef implements PerformanceMeasurementRefOrValue { + + private String atType; + + private String atBaseType; + + private String atSchemaLocation; + + private String href; + + private String id; + + private String name; + + private String atReferredType; + + private String version; + + public PerformanceMeasurementRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceMeasurementRef(String atType, String id) { + this.atType = atType; + this.id = id; + } + + public PerformanceMeasurementRef 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) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public PerformanceMeasurementRef 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 PerformanceMeasurementRef 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 PerformanceMeasurementRef href(String href) { + this.href = href; + return this; + } + + /** + * The URI of the referred entity. + * @return href + */ + + @Schema(name = "href", description = "The URI of the referred entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("href") + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public PerformanceMeasurementRef id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the referred entity. + * @return id + */ + @NotNull + @Schema(name = "id", description = "The identifier of the referred entity.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public PerformanceMeasurementRef 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PerformanceMeasurementRef 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) + @JsonProperty("@referredType") + public String getAtReferredType() { + return atReferredType; + } + + public void setAtReferredType(String atReferredType) { + this.atReferredType = atReferredType; + } + + public PerformanceMeasurementRef version(String version) { + this.version = version; + return this; + } + + /** + * Version of the PerformanceMeasurement + * @return version + */ + + @Schema(name = "version", description = "Version of the PerformanceMeasurement", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("version") + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceMeasurementRef performanceMeasurementRef = (PerformanceMeasurementRef) o; + return Objects.equals(this.atType, performanceMeasurementRef.atType) && + Objects.equals(this.atBaseType, performanceMeasurementRef.atBaseType) && + Objects.equals(this.atSchemaLocation, performanceMeasurementRef.atSchemaLocation) && + Objects.equals(this.href, performanceMeasurementRef.href) && + Objects.equals(this.id, performanceMeasurementRef.id) && + Objects.equals(this.name, performanceMeasurementRef.name) && + Objects.equals(this.atReferredType, performanceMeasurementRef.atReferredType) && + Objects.equals(this.version, performanceMeasurementRef.version); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation, href, id, name, atReferredType, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceMeasurementRef {\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(" href: ").append(toIndentedString(href)).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(" version: ").append(toIndentedString(version)).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/pm628/model/PerformanceMeasurementRefOrValue.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementRefOrValue.java new file mode 100644 index 0000000000000000000000000000000000000000..655efcb1489460ba2b1b664d4d9ccda78b3d2dcd --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementRefOrValue.java @@ -0,0 +1,25 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import javax.annotation.Generated; + + +@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 = PerformanceMeasurement.class, name = "PerformanceMeasurement"), + @JsonSubTypes.Type(value = PerformanceMeasurementAtomic.class, name = "PerformanceMeasurementAtomic"), + @JsonSubTypes.Type(value = PerformanceMeasurementGroup.class, name = "PerformanceMeasurementGroup"), + @JsonSubTypes.Type(value = PerformanceMeasurementRef.class, name = "PerformanceMeasurementRef") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface PerformanceMeasurementRefOrValue { + public String getAtType(); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementRelationship.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementRelationship.java new file mode 100644 index 0000000000000000000000000000000000000000..e53ef6e0465924a409bb1e2ebaa8192ac28ee45a --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PerformanceMeasurementRelationship.java @@ -0,0 +1,282 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.common.model.TimePeriod; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PerformanceMeasurementRelationship + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PerformanceMeasurementRelationship { + + private String atType; + + private String atBaseType; + + private String atSchemaLocation; + + private String href; + + private String id; + + private String relationshipType; + + private PerformanceMeasurementRefOrValue relatedMeasurement; + + private String role; + + private TimePeriod validFor; + + public PerformanceMeasurementRelationship() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PerformanceMeasurementRelationship(String atType) { + this.atType = atType; + } + + public PerformanceMeasurementRelationship 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) + @JsonProperty("@type") + public String getAtType() { + return atType; + } + + public void setAtType(String atType) { + this.atType = atType; + } + + public PerformanceMeasurementRelationship 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 PerformanceMeasurementRelationship 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 PerformanceMeasurementRelationship 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 PerformanceMeasurementRelationship id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public PerformanceMeasurementRelationship relationshipType(String relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + /** + * + * @return relationshipType + */ + + @Schema(name = "relationshipType", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("relationshipType") + public String getRelationshipType() { + return relationshipType; + } + + public void setRelationshipType(String relationshipType) { + this.relationshipType = relationshipType; + } + + public PerformanceMeasurementRelationship relatedMeasurement(PerformanceMeasurementRefOrValue relatedMeasurement) { + this.relatedMeasurement = relatedMeasurement; + return this; + } + + /** + * Get relatedMeasurement + * @return relatedMeasurement + */ + @Valid + @Schema(name = "relatedMeasurement", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("relatedMeasurement") + public PerformanceMeasurementRefOrValue getRelatedMeasurement() { + return relatedMeasurement; + } + + public void setRelatedMeasurement(PerformanceMeasurementRefOrValue relatedMeasurement) { + this.relatedMeasurement = relatedMeasurement; + } + + public PerformanceMeasurementRelationship role(String role) { + this.role = role; + return this; + } + + /** + * The association role for this PerformanceMeasurement + * @return role + */ + + @Schema(name = "role", description = "The association role for this PerformanceMeasurement", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("role") + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public PerformanceMeasurementRelationship 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; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PerformanceMeasurementRelationship performanceMeasurementRelationship = (PerformanceMeasurementRelationship) o; + return Objects.equals(this.atType, performanceMeasurementRelationship.atType) && + Objects.equals(this.atBaseType, performanceMeasurementRelationship.atBaseType) && + Objects.equals(this.atSchemaLocation, performanceMeasurementRelationship.atSchemaLocation) && + Objects.equals(this.href, performanceMeasurementRelationship.href) && + Objects.equals(this.id, performanceMeasurementRelationship.id) && + Objects.equals(this.relationshipType, performanceMeasurementRelationship.relationshipType) && + Objects.equals(this.relatedMeasurement, performanceMeasurementRelationship.relatedMeasurement) && + Objects.equals(this.role, performanceMeasurementRelationship.role) && + Objects.equals(this.validFor, performanceMeasurementRelationship.validFor); + } + + @Override + public int hashCode() { + return Objects.hash(atType, atBaseType, atSchemaLocation, href, id, relationshipType, relatedMeasurement, role, validFor); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PerformanceMeasurementRelationship {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationshipType: ").append(toIndentedString(relationshipType)).append("\n"); + sb.append(" relatedMeasurement: ").append(toIndentedString(relatedMeasurement)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" validFor: ").append(toIndentedString(validFor)).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/pm628/model/PlaceRefFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PlaceRefFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..d731eb1b7186200bc85f34e51951268144c2610f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PlaceRefFVO.java @@ -0,0 +1,240 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * Place reference. + */ + +@Schema(name = "PlaceRef_FVO", description = "Place reference.") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PlaceRefFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + public PlaceRefFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PlaceRefFVO(String type) { + this.type = type; + } + + public PlaceRefFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PlaceRefFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public PlaceRefFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PlaceRefFVO 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 PlaceRefFVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PlaceRefFVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PlaceRefFVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlaceRefFVO placeRefFVO = (PlaceRefFVO) o; + return Objects.equals(this.type, placeRefFVO.type) && + Objects.equals(this.baseType, placeRefFVO.baseType) && + Objects.equals(this.schemaLocation, placeRefFVO.schemaLocation) && + Objects.equals(this.href, placeRefFVO.href) && + Objects.equals(this.uuid, placeRefFVO.uuid) && + Objects.equals(this.name, placeRefFVO.name) && + Objects.equals(this.referredType, placeRefFVO.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PlaceRefFVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).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/pm628/model/PlaceRefMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PlaceRefMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..8b3dadfd4dac80882d992d4039483a8c5e84f17c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PlaceRefMVO.java @@ -0,0 +1,240 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * Place reference. + */ + +@Schema(name = "PlaceRef_MVO", description = "Place reference.") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PlaceRefMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + public PlaceRefMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PlaceRefMVO(String type) { + this.type = type; + } + + public PlaceRefMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PlaceRefMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public PlaceRefMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PlaceRefMVO 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 PlaceRefMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * The identifier of the referred entity. + * @return id + */ + + @Schema(name = "uuid", description = "The identifier of the referred entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PlaceRefMVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PlaceRefMVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PlaceRefMVO placeRefMVO = (PlaceRefMVO) o; + return Objects.equals(this.type, placeRefMVO.type) && + Objects.equals(this.baseType, placeRefMVO.baseType) && + Objects.equals(this.schemaLocation, placeRefMVO.schemaLocation) && + Objects.equals(this.href, placeRefMVO.href) && + Objects.equals(this.uuid, placeRefMVO.uuid) && + Objects.equals(this.name, placeRefMVO.name) && + Objects.equals(this.referredType, placeRefMVO.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PlaceRefMVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).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/pm628/model/PolicyRef.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PolicyRef.java new file mode 100644 index 0000000000000000000000000000000000000000..ae4fa994677b317b0e5dd7ac377cb649fe1c287c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PolicyRef.java @@ -0,0 +1,129 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PolicyRef + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_PolicyRef") +public class PolicyRef extends BaseRootNamedEntity { + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("version") + private String version; + + public PolicyRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PolicyRef(String type, String uuid) { + this.type = type; + this.uuid = uuid; + } + + public PolicyRef referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public PolicyRef version(String version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + + @Schema(name = "version", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("version") + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PolicyRef policyRef = (PolicyRef) o; + return Objects.equals(this.type, policyRef.type) && + Objects.equals(this.baseType, policyRef.baseType) && + Objects.equals(this.schemaLocation, policyRef.schemaLocation) && + Objects.equals(this.href, policyRef.href) && + Objects.equals(this.uuid, policyRef.uuid) && + Objects.equals(this.name, policyRef.name) && + Objects.equals(this.referredType, policyRef.referredType) && + Objects.equals(this.version, policyRef.version); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PolicyRef {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/pm628/model/PolicyRefFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PolicyRefFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..161957cf6c433c728c6e7362b6f32f633441f3a0 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PolicyRefFVO.java @@ -0,0 +1,264 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PolicyRefFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PolicyRefFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("version") + private String version; + + public PolicyRefFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PolicyRefFVO(String type) { + this.type = type; + } + + public PolicyRefFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PolicyRefFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public PolicyRefFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PolicyRefFVO 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 PolicyRefFVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PolicyRefFVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PolicyRefFVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public PolicyRefFVO version(String version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + + @Schema(name = "version", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("version") + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PolicyRefFVO policyRefFVO = (PolicyRefFVO) o; + return Objects.equals(this.type, policyRefFVO.type) && + Objects.equals(this.baseType, policyRefFVO.baseType) && + Objects.equals(this.schemaLocation, policyRefFVO.schemaLocation) && + Objects.equals(this.href, policyRefFVO.href) && + Objects.equals(this.uuid, policyRefFVO.uuid) && + Objects.equals(this.name, policyRefFVO.name) && + Objects.equals(this.referredType, policyRefFVO.referredType) && + Objects.equals(this.version, policyRefFVO.version); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PolicyRefFVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/pm628/model/PolicyRefMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/PolicyRefMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..bf33af52d89dda38f12962d3ff17a0ddc9e21ade --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/PolicyRefMVO.java @@ -0,0 +1,264 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * PolicyRefMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PolicyRefMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("version") + private String version; + + public PolicyRefMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PolicyRefMVO(String type) { + this.type = type; + } + + public PolicyRefMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public PolicyRefMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public PolicyRefMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public PolicyRefMVO 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 PolicyRefMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public PolicyRefMVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PolicyRefMVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public PolicyRefMVO version(String version) { + this.version = version; + return this; + } + + /** + * Get version + * @return version + */ + + @Schema(name = "version", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("version") + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PolicyRefMVO policyRefMVO = (PolicyRefMVO) o; + return Objects.equals(this.type, policyRefMVO.type) && + Objects.equals(this.baseType, policyRefMVO.baseType) && + Objects.equals(this.schemaLocation, policyRefMVO.schemaLocation) && + Objects.equals(this.href, policyRefMVO.href) && + Objects.equals(this.uuid, policyRefMVO.uuid) && + Objects.equals(this.name, policyRefMVO.name) && + Objects.equals(this.referredType, policyRefMVO.referredType) && + Objects.equals(this.version, policyRefMVO.version); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PolicyRefMVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/pm628/model/ProtocolTransferData.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ProtocolTransferData.java new file mode 100644 index 0000000000000000000000000000000000000000..d359615136fb2945cc825e3a2d217ee46b93782c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ProtocolTransferData.java @@ -0,0 +1,91 @@ +package org.etsi.osl.tmf.pm628.model; + +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.Embeddable; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * ProtocolTransferData + */ + +@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 = FileTransferData.class, name = "FileTransferData"), + @JsonSubTypes.Type(value = FileTransferDataMVO.class, name = "FileTransferData_MVO") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Embeddable +public class ProtocolTransferData { + + @JsonProperty("transportProtocol") + private String transportProtocol; + + public ProtocolTransferData transportProtocol(String transportProtocol) { + this.transportProtocol = transportProtocol; + return this; + } + + /** + * Get transportProtocol + * @return transportProtocol + */ + + @Schema(name = "transportProtocol", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("transportProtocol") + public String getTransportProtocol() { + return transportProtocol; + } + + public void setTransportProtocol(String transportProtocol) { + this.transportProtocol = transportProtocol; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProtocolTransferData protocolTransferData = (ProtocolTransferData) o; + return Objects.equals(this.transportProtocol, protocolTransferData.transportProtocol); + } + + @Override + public int hashCode() { + return Objects.hash(transportProtocol); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProtocolTransferData {\n"); + sb.append(" transportProtocol: ").append(toIndentedString(transportProtocol)).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/pm628/model/ProtocolTransferDataFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ProtocolTransferDataFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..87ccdfa202a08a4e921213d61a1a02a8deff9b84 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ProtocolTransferDataFVO.java @@ -0,0 +1,88 @@ +package org.etsi.osl.tmf.pm628.model; + +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 javax.annotation.Generated; +import java.util.Objects; + +/** + * ProtocolTransferDataFVO + */ + +@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 = FileTransferDataFVO.class, name = "FileTransferData") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ProtocolTransferDataFVO { + + @JsonProperty("transportProtocol") + private String transportProtocol; + + public ProtocolTransferDataFVO transportProtocol(String transportProtocol) { + this.transportProtocol = transportProtocol; + return this; + } + + /** + * Get transportProtocol + * @return transportProtocol + */ + + @Schema(name = "transportProtocol", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("transportProtocol") + public String getTransportProtocol() { + return transportProtocol; + } + + public void setTransportProtocol(String transportProtocol) { + this.transportProtocol = transportProtocol; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProtocolTransferDataFVO protocolTransferDataFVO = (ProtocolTransferDataFVO) o; + return Objects.equals(this.transportProtocol, protocolTransferDataFVO.transportProtocol); + } + + @Override + public int hashCode() { + return Objects.hash(transportProtocol); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProtocolTransferDataFVO {\n"); + sb.append(" transportProtocol: ").append(toIndentedString(transportProtocol)).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/pm628/model/ProtocolTransferDataMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ProtocolTransferDataMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..9c47362206189f4fd4a838ea8864c2a1b3046851 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ProtocolTransferDataMVO.java @@ -0,0 +1,77 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * ProtocolTransferDataMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ProtocolTransferDataMVO { + + @JsonProperty("transportProtocol") + private String transportProtocol; + + public ProtocolTransferDataMVO transportProtocol(String transportProtocol) { + this.transportProtocol = transportProtocol; + return this; + } + + /** + * Get transportProtocol + * @return transportProtocol + */ + + @Schema(name = "transportProtocol", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("transportProtocol") + public String getTransportProtocol() { + return transportProtocol; + } + + public void setTransportProtocol(String transportProtocol) { + this.transportProtocol = transportProtocol; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProtocolTransferDataMVO protocolTransferDataMVO = (ProtocolTransferDataMVO) o; + return Objects.equals(this.transportProtocol, protocolTransferDataMVO.transportProtocol); + } + + @Override + public int hashCode() { + return Objects.hash(transportProtocol); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProtocolTransferDataMVO {\n"); + sb.append(" transportProtocol: ").append(toIndentedString(transportProtocol)).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/pm628/model/RelatedPartyRefOrPartyRoleRef.java b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedPartyRefOrPartyRoleRef.java new file mode 100644 index 0000000000000000000000000000000000000000..4acb35bfbcea03e48a7ec345a7ea2e09952c07ba --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedPartyRefOrPartyRoleRef.java @@ -0,0 +1,209 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Column; +import jakarta.persistence.DiscriminatorType; +import jakarta.persistence.Embeddable; +import jakarta.persistence.JoinColumn; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.hibernate.annotations.Any; +import org.hibernate.annotations.AnyDiscriminator; +import org.hibernate.annotations.AnyDiscriminatorValue; +import org.hibernate.annotations.AnyKeyJavaClass; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * RelatedPartyRefOrPartyRoleRef + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Embeddable +public class RelatedPartyRefOrPartyRoleRef { + + @JsonProperty("@type") + @Column(name = "rproprr_type") + private String type; + + @JsonProperty("@baseType") + @Column(name = "rproprr_base_type") + private String baseType; + + @JsonProperty("@schemaLocation") + @Column(name = "rproprr_schema_location") + private String schemaLocation; + + @JsonProperty("role") + private String role; + + @JsonProperty("partyOrPartyRole") + @Any + @AnyDiscriminator(DiscriminatorType.STRING) + @AnyDiscriminatorValue(discriminator = "pr", entity = PartyRef.class) + @AnyDiscriminatorValue(discriminator = "prr", entity = PartyRoleRef.class) + @AnyKeyJavaClass(String.class) + @Column(name = "party_or_party_role_type") + @JoinColumn(name = "party_ref_or_party_role_ref_id") + private PartyRefOrPartyRoleRef partyOrPartyRole; + + public RelatedPartyRefOrPartyRoleRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public RelatedPartyRefOrPartyRoleRef(String type) { + this.type = type; + } + + public RelatedPartyRefOrPartyRoleRef type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public RelatedPartyRefOrPartyRoleRef baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public RelatedPartyRefOrPartyRoleRef schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public RelatedPartyRefOrPartyRoleRef role(String role) { + this.role = role; + return this; + } + + /** + * Role played by the related party or party role in the context of the specific entity it is linked to. Such as 'initiator', 'customer', 'salesAgent', 'user' + * @return role + */ + + @Schema(name = "role", description = "Role played by the related party or party role in the context of the specific entity it is linked to. Such as 'initiator', 'customer', 'salesAgent', 'user'", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("role") + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public RelatedPartyRefOrPartyRoleRef partyOrPartyRole(PartyRefOrPartyRoleRef partyOrPartyRole) { + this.partyOrPartyRole = partyOrPartyRole; + return this; + } + + /** + * Get partyOrPartyRole + * @return partyOrPartyRole + */ + @Valid + @Schema(name = "partyOrPartyRole", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("partyOrPartyRole") + public PartyRefOrPartyRoleRef getPartyOrPartyRole() { + return partyOrPartyRole; + } + + public void setPartyOrPartyRole(PartyRefOrPartyRoleRef partyOrPartyRole) { + this.partyOrPartyRole = partyOrPartyRole; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelatedPartyRefOrPartyRoleRef relatedPartyRefOrPartyRoleRef = (RelatedPartyRefOrPartyRoleRef) o; + return Objects.equals(this.type, relatedPartyRefOrPartyRoleRef.type) && + Objects.equals(this.baseType, relatedPartyRefOrPartyRoleRef.baseType) && + Objects.equals(this.schemaLocation, relatedPartyRefOrPartyRoleRef.schemaLocation) && + Objects.equals(this.role, relatedPartyRefOrPartyRoleRef.role) && + Objects.equals(this.partyOrPartyRole, relatedPartyRefOrPartyRoleRef.partyOrPartyRole); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, role, partyOrPartyRole); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelatedPartyRefOrPartyRoleRef {\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(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" partyOrPartyRole: ").append(toIndentedString(partyOrPartyRole)).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/pm628/model/RelatedPartyRefOrPartyRoleRefFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedPartyRefOrPartyRoleRefFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..af9af1004ffd42dc18353b7bdfdda70de2f30496 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedPartyRefOrPartyRoleRefFVO.java @@ -0,0 +1,191 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * RelatedPartyRefOrPartyRoleRefFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class RelatedPartyRefOrPartyRoleRefFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("role") + private String role; + + @JsonProperty("partyOrPartyRole") + private PartyRefOrPartyRoleRefFVO partyOrPartyRole; + + public RelatedPartyRefOrPartyRoleRefFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public RelatedPartyRefOrPartyRoleRefFVO(String type, String role) { + this.type = type; + this.role = role; + } + + public RelatedPartyRefOrPartyRoleRefFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public RelatedPartyRefOrPartyRoleRefFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public RelatedPartyRefOrPartyRoleRefFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public RelatedPartyRefOrPartyRoleRefFVO role(String role) { + this.role = role; + return this; + } + + /** + * Role played by the related party or party role in the context of the specific entity it is linked to. Such as 'initiator', 'customer', 'salesAgent', 'user' + * @return role + */ + @NotNull + @Schema(name = "role", description = "Role played by the related party or party role in the context of the specific entity it is linked to. Such as 'initiator', 'customer', 'salesAgent', 'user'", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("role") + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public RelatedPartyRefOrPartyRoleRefFVO partyOrPartyRole(PartyRefOrPartyRoleRefFVO partyOrPartyRole) { + this.partyOrPartyRole = partyOrPartyRole; + return this; + } + + /** + * Get partyOrPartyRole + * @return partyOrPartyRole + */ + @Valid + @Schema(name = "partyOrPartyRole", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("partyOrPartyRole") + public PartyRefOrPartyRoleRefFVO getPartyOrPartyRole() { + return partyOrPartyRole; + } + + public void setPartyOrPartyRole(PartyRefOrPartyRoleRefFVO partyOrPartyRole) { + this.partyOrPartyRole = partyOrPartyRole; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelatedPartyRefOrPartyRoleRefFVO relatedPartyRefOrPartyRoleRefFVO = (RelatedPartyRefOrPartyRoleRefFVO) o; + return Objects.equals(this.type, relatedPartyRefOrPartyRoleRefFVO.type) && + Objects.equals(this.baseType, relatedPartyRefOrPartyRoleRefFVO.baseType) && + Objects.equals(this.schemaLocation, relatedPartyRefOrPartyRoleRefFVO.schemaLocation) && + Objects.equals(this.role, relatedPartyRefOrPartyRoleRefFVO.role) && + Objects.equals(this.partyOrPartyRole, relatedPartyRefOrPartyRoleRefFVO.partyOrPartyRole); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, role, partyOrPartyRole); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelatedPartyRefOrPartyRoleRefFVO {\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(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" partyOrPartyRole: ").append(toIndentedString(partyOrPartyRole)).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/pm628/model/RelatedPartyRefOrPartyRoleRefMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedPartyRefOrPartyRoleRefMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..241aaaed6bf594c31495f682f306954ca431c303 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedPartyRefOrPartyRoleRefMVO.java @@ -0,0 +1,191 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * RelatedPartyRefOrPartyRoleRefMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class RelatedPartyRefOrPartyRoleRefMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("role") + private String role; + + @JsonProperty("partyOrPartyRole") + private PartyRefOrPartyRoleRefMVO partyOrPartyRole; + + public RelatedPartyRefOrPartyRoleRefMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public RelatedPartyRefOrPartyRoleRefMVO(String type, String role) { + this.type = type; + this.role = role; + } + + public RelatedPartyRefOrPartyRoleRefMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public RelatedPartyRefOrPartyRoleRefMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public RelatedPartyRefOrPartyRoleRefMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public RelatedPartyRefOrPartyRoleRefMVO role(String role) { + this.role = role; + return this; + } + + /** + * Role played by the related party or party role in the context of the specific entity it is linked to. Such as 'initiator', 'customer', 'salesAgent', 'user' + * @return role + */ + @NotNull + @Schema(name = "role", description = "Role played by the related party or party role in the context of the specific entity it is linked to. Such as 'initiator', 'customer', 'salesAgent', 'user'", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("role") + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public RelatedPartyRefOrPartyRoleRefMVO partyOrPartyRole(PartyRefOrPartyRoleRefMVO partyOrPartyRole) { + this.partyOrPartyRole = partyOrPartyRole; + return this; + } + + /** + * Get partyOrPartyRole + * @return partyOrPartyRole + */ + @Valid + @Schema(name = "partyOrPartyRole", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("partyOrPartyRole") + public PartyRefOrPartyRoleRefMVO getPartyOrPartyRole() { + return partyOrPartyRole; + } + + public void setPartyOrPartyRole(PartyRefOrPartyRoleRefMVO partyOrPartyRole) { + this.partyOrPartyRole = partyOrPartyRole; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelatedPartyRefOrPartyRoleRefMVO relatedPartyRefOrPartyRoleRefMVO = (RelatedPartyRefOrPartyRoleRefMVO) o; + return Objects.equals(this.type, relatedPartyRefOrPartyRoleRefMVO.type) && + Objects.equals(this.baseType, relatedPartyRefOrPartyRoleRefMVO.baseType) && + Objects.equals(this.schemaLocation, relatedPartyRefOrPartyRoleRefMVO.schemaLocation) && + Objects.equals(this.role, relatedPartyRefOrPartyRoleRefMVO.role) && + Objects.equals(this.partyOrPartyRole, relatedPartyRefOrPartyRoleRefMVO.partyOrPartyRole); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, role, partyOrPartyRole); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelatedPartyRefOrPartyRoleRefMVO {\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(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" partyOrPartyRole: ").append(toIndentedString(partyOrPartyRole)).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/pm628/model/RelatedPlaceRef.java b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedPlaceRef.java new file mode 100644 index 0000000000000000000000000000000000000000..efeea7ac8ab5622228eccaab2ce656630ef72534 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedPlaceRef.java @@ -0,0 +1,187 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.*; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.pcm620.model.PlaceRef; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * RelatedPlaceRef + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_RelPlaceRef") +public class RelatedPlaceRef extends BaseRootEntity { + + @JsonProperty("role") + private String role; + + @JsonProperty("place") + @ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinColumn(name = "place_id") + private PlaceRef place; + + public RelatedPlaceRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public RelatedPlaceRef(String type) { + this.type = type; + } + + public RelatedPlaceRef type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public RelatedPlaceRef baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public RelatedPlaceRef schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public RelatedPlaceRef role(String role) { + this.role = role; + return this; + } + + /** + * Get role + * @return role + */ + + @Schema(name = "role", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("role") + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public RelatedPlaceRef place(PlaceRef place) { + this.place = place; + return this; + } + + /** + * Get place + * @return place + */ + @Valid + @Schema(name = "place", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("place") + public PlaceRef getPlace() { + return place; + } + + public void setPlace(PlaceRef place) { + this.place = place; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelatedPlaceRef relatedPlaceRef = (RelatedPlaceRef) o; + return Objects.equals(this.type, relatedPlaceRef.type) && + Objects.equals(this.baseType, relatedPlaceRef.baseType) && + Objects.equals(this.schemaLocation, relatedPlaceRef.schemaLocation) && + Objects.equals(this.role, relatedPlaceRef.role) && + Objects.equals(this.place, relatedPlaceRef.place); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, role, place); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelatedPlaceRef {\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(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" place: ").append(toIndentedString(place)).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/pm628/model/RelatedPlaceRefFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedPlaceRefFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..43ca4b450a5807ae5781b89f70a8bb419e388ad4 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedPlaceRefFVO.java @@ -0,0 +1,192 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * RelatedPlaceRefFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class RelatedPlaceRefFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("role") + private String role; + + @JsonProperty("place") + private PlaceRefFVO place; + + public RelatedPlaceRefFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public RelatedPlaceRefFVO(String type, String role, PlaceRefFVO place) { + this.type = type; + this.role = role; + this.place = place; + } + + public RelatedPlaceRefFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public RelatedPlaceRefFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public RelatedPlaceRefFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public RelatedPlaceRefFVO role(String role) { + this.role = role; + return this; + } + + /** + * Get role + * @return role + */ + @NotNull + @Schema(name = "role", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("role") + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public RelatedPlaceRefFVO place(PlaceRefFVO place) { + this.place = place; + return this; + } + + /** + * Get place + * @return place + */ + @NotNull @Valid + @Schema(name = "place", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("place") + public PlaceRefFVO getPlace() { + return place; + } + + public void setPlace(PlaceRefFVO place) { + this.place = place; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelatedPlaceRefFVO relatedPlaceRefFVO = (RelatedPlaceRefFVO) o; + return Objects.equals(this.type, relatedPlaceRefFVO.type) && + Objects.equals(this.baseType, relatedPlaceRefFVO.baseType) && + Objects.equals(this.schemaLocation, relatedPlaceRefFVO.schemaLocation) && + Objects.equals(this.role, relatedPlaceRefFVO.role) && + Objects.equals(this.place, relatedPlaceRefFVO.place); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, role, place); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelatedPlaceRefFVO {\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(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" place: ").append(toIndentedString(place)).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/pm628/model/RelatedPlaceRefMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedPlaceRefMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..f0e5b6dd3ba92e5afbedcca5a8dd8de1d5c3b92f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedPlaceRefMVO.java @@ -0,0 +1,192 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * RelatedPlaceRefMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class RelatedPlaceRefMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("role") + private String role; + + @JsonProperty("place") + private PlaceRefMVO place; + + public RelatedPlaceRefMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public RelatedPlaceRefMVO(String type, String role, PlaceRefMVO place) { + this.type = type; + this.role = role; + this.place = place; + } + + public RelatedPlaceRefMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public RelatedPlaceRefMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public RelatedPlaceRefMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public RelatedPlaceRefMVO role(String role) { + this.role = role; + return this; + } + + /** + * Get role + * @return role + */ + @NotNull + @Schema(name = "role", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("role") + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public RelatedPlaceRefMVO place(PlaceRefMVO place) { + this.place = place; + return this; + } + + /** + * Get place + * @return place + */ + @NotNull @Valid + @Schema(name = "place", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("place") + public PlaceRefMVO getPlace() { + return place; + } + + public void setPlace(PlaceRefMVO place) { + this.place = place; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelatedPlaceRefMVO relatedPlaceRefMVO = (RelatedPlaceRefMVO) o; + return Objects.equals(this.type, relatedPlaceRefMVO.type) && + Objects.equals(this.baseType, relatedPlaceRefMVO.baseType) && + Objects.equals(this.schemaLocation, relatedPlaceRefMVO.schemaLocation) && + Objects.equals(this.role, relatedPlaceRefMVO.role) && + Objects.equals(this.place, relatedPlaceRefMVO.place); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, role, place); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelatedPlaceRefMVO {\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(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" place: ").append(toIndentedString(place)).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/pm628/model/RelatedResourceOrderItem.java b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedResourceOrderItem.java new file mode 100644 index 0000000000000000000000000000000000000000..db5a49d10ca7dd61c0a18089b114b47742b81016 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedResourceOrderItem.java @@ -0,0 +1,298 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Column; +import jakarta.persistence.Embeddable; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.po622.model.OrderItemActionType; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * RelatedResourceOrderItem + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Embeddable +public class RelatedResourceOrderItem { + + @JsonProperty("@type") + @Column(name = "rroi_type") + private String type; + + @JsonProperty("@baseType") + @Column(name = "rroi_base_type") + private String baseType; + + @JsonProperty("@schemaLocation") + @Column(name = "rroi_schema_location") + private String schemaLocation; + + @JsonProperty("@referredType") + @Column(name = "rroi_referred_type") + private String referredType; + + @JsonProperty("resourceOrderHref") + private String resourceOrderHref; + + @JsonProperty("resourceOrderId") + private String resourceOrderId; + + @JsonProperty("itemAction") + private OrderItemActionType itemAction; + + @JsonProperty("itemId") + private String itemId; + + @JsonProperty("role") + private String role; + + public RelatedResourceOrderItem() { + super(); + } + + /** + * Constructor with only required parameters + */ + public RelatedResourceOrderItem(String type) { + this.type = type; + } + + public RelatedResourceOrderItem type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public RelatedResourceOrderItem baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public RelatedResourceOrderItem schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public RelatedResourceOrderItem referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public RelatedResourceOrderItem resourceOrderHref(String resourceOrderHref) { + this.resourceOrderHref = resourceOrderHref; + return this; + } + + /** + * Reference of the related entity. + * @return resourceOrderHref + */ + + @Schema(name = "resourceOrderHref", description = "Reference of the related entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceOrderHref") + public String getResourceOrderHref() { + return resourceOrderHref; + } + + public void setResourceOrderHref(String resourceOrderHref) { + this.resourceOrderHref = resourceOrderHref; + } + + public RelatedResourceOrderItem resourceOrderId(String resourceOrderId) { + this.resourceOrderId = resourceOrderId; + return this; + } + + /** + * Unique identifier of a related entity. + * @return resourceOrderId + */ + + @Schema(name = "resourceOrderId", description = "Unique identifier of a related entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceOrderId") + public String getResourceOrderId() { + return resourceOrderId; + } + + public void setResourceOrderId(String resourceOrderId) { + this.resourceOrderId = resourceOrderId; + } + + public RelatedResourceOrderItem itemAction(OrderItemActionType itemAction) { + this.itemAction = itemAction; + return this; + } + + /** + * Get itemAction + * @return itemAction + */ + @Valid + @Schema(name = "itemAction", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("itemAction") + public OrderItemActionType getItemAction() { + return itemAction; + } + + public void setItemAction(OrderItemActionType itemAction) { + this.itemAction = itemAction; + } + + public RelatedResourceOrderItem itemId(String itemId) { + this.itemId = itemId; + return this; + } + + /** + * Identifier of the order item where the resource was managed + * @return itemId + */ + + @Schema(name = "itemId", description = "Identifier of the order item where the resource was managed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("itemId") + public String getItemId() { + return itemId; + } + + public void setItemId(String itemId) { + this.itemId = itemId; + } + + public RelatedResourceOrderItem role(String role) { + this.role = role; + return this; + } + + /** + * role of the resource order item for this resource + * @return role + */ + + @Schema(name = "role", description = "role of the resource order item for this resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("role") + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelatedResourceOrderItem relatedResourceOrderItem = (RelatedResourceOrderItem) o; + return Objects.equals(this.type, relatedResourceOrderItem.type) && + Objects.equals(this.baseType, relatedResourceOrderItem.baseType) && + Objects.equals(this.schemaLocation, relatedResourceOrderItem.schemaLocation) && + Objects.equals(this.referredType, relatedResourceOrderItem.referredType) && + Objects.equals(this.resourceOrderHref, relatedResourceOrderItem.resourceOrderHref) && + Objects.equals(this.resourceOrderId, relatedResourceOrderItem.resourceOrderId) && + Objects.equals(this.itemAction, relatedResourceOrderItem.itemAction) && + Objects.equals(this.itemId, relatedResourceOrderItem.itemId) && + Objects.equals(this.role, relatedResourceOrderItem.role); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, referredType, resourceOrderHref, resourceOrderId, itemAction, itemId, role); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelatedResourceOrderItem {\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(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" resourceOrderHref: ").append(toIndentedString(resourceOrderHref)).append("\n"); + sb.append(" resourceOrderId: ").append(toIndentedString(resourceOrderId)).append("\n"); + sb.append(" itemAction: ").append(toIndentedString(itemAction)).append("\n"); + sb.append(" itemId: ").append(toIndentedString(itemId)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).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/pm628/model/RelatedResourceOrderItemFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedResourceOrderItemFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..20c72707a4f5d322af95a00ff0f35593670dad93 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedResourceOrderItemFVO.java @@ -0,0 +1,291 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.po622.model.OrderItemActionType; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * RelatedResourceOrderItemFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class RelatedResourceOrderItemFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("resourceOrderHref") + private String resourceOrderHref; + + @JsonProperty("resourceOrderId") + private String resourceOrderId; + + @JsonProperty("itemAction") + private OrderItemActionType itemAction; + + @JsonProperty("itemId") + private String itemId; + + @JsonProperty("role") + private String role; + + public RelatedResourceOrderItemFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public RelatedResourceOrderItemFVO(String type) { + this.type = type; + } + + public RelatedResourceOrderItemFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public RelatedResourceOrderItemFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public RelatedResourceOrderItemFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public RelatedResourceOrderItemFVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public RelatedResourceOrderItemFVO resourceOrderHref(String resourceOrderHref) { + this.resourceOrderHref = resourceOrderHref; + return this; + } + + /** + * Reference of the related entity. + * @return resourceOrderHref + */ + + @Schema(name = "resourceOrderHref", description = "Reference of the related entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceOrderHref") + public String getResourceOrderHref() { + return resourceOrderHref; + } + + public void setResourceOrderHref(String resourceOrderHref) { + this.resourceOrderHref = resourceOrderHref; + } + + public RelatedResourceOrderItemFVO resourceOrderId(String resourceOrderId) { + this.resourceOrderId = resourceOrderId; + return this; + } + + /** + * Unique identifier of a related entity. + * @return resourceOrderId + */ + + @Schema(name = "resourceOrderId", description = "Unique identifier of a related entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceOrderId") + public String getResourceOrderId() { + return resourceOrderId; + } + + public void setResourceOrderId(String resourceOrderId) { + this.resourceOrderId = resourceOrderId; + } + + public RelatedResourceOrderItemFVO itemAction(OrderItemActionType itemAction) { + this.itemAction = itemAction; + return this; + } + + /** + * Get itemAction + * @return itemAction + */ + @Valid + @Schema(name = "itemAction", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("itemAction") + public OrderItemActionType getItemAction() { + return itemAction; + } + + public void setItemAction(OrderItemActionType itemAction) { + this.itemAction = itemAction; + } + + public RelatedResourceOrderItemFVO itemId(String itemId) { + this.itemId = itemId; + return this; + } + + /** + * Identifier of the order item where the resource was managed + * @return itemId + */ + + @Schema(name = "itemId", description = "Identifier of the order item where the resource was managed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("itemId") + public String getItemId() { + return itemId; + } + + public void setItemId(String itemId) { + this.itemId = itemId; + } + + public RelatedResourceOrderItemFVO role(String role) { + this.role = role; + return this; + } + + /** + * role of the resource order item for this resource + * @return role + */ + + @Schema(name = "role", description = "role of the resource order item for this resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("role") + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelatedResourceOrderItemFVO relatedResourceOrderItemFVO = (RelatedResourceOrderItemFVO) o; + return Objects.equals(this.type, relatedResourceOrderItemFVO.type) && + Objects.equals(this.baseType, relatedResourceOrderItemFVO.baseType) && + Objects.equals(this.schemaLocation, relatedResourceOrderItemFVO.schemaLocation) && + Objects.equals(this.referredType, relatedResourceOrderItemFVO.referredType) && + Objects.equals(this.resourceOrderHref, relatedResourceOrderItemFVO.resourceOrderHref) && + Objects.equals(this.resourceOrderId, relatedResourceOrderItemFVO.resourceOrderId) && + Objects.equals(this.itemAction, relatedResourceOrderItemFVO.itemAction) && + Objects.equals(this.itemId, relatedResourceOrderItemFVO.itemId) && + Objects.equals(this.role, relatedResourceOrderItemFVO.role); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, referredType, resourceOrderHref, resourceOrderId, itemAction, itemId, role); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelatedResourceOrderItemFVO {\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(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" resourceOrderHref: ").append(toIndentedString(resourceOrderHref)).append("\n"); + sb.append(" resourceOrderId: ").append(toIndentedString(resourceOrderId)).append("\n"); + sb.append(" itemAction: ").append(toIndentedString(itemAction)).append("\n"); + sb.append(" itemId: ").append(toIndentedString(itemId)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).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/pm628/model/RelatedResourceOrderItemMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedResourceOrderItemMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..3627a63ad9ecb147133410df4732b890c715b882 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/RelatedResourceOrderItemMVO.java @@ -0,0 +1,291 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.po622.model.OrderItemActionType; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * RelatedResourceOrderItemMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class RelatedResourceOrderItemMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("resourceOrderHref") + private String resourceOrderHref; + + @JsonProperty("resourceOrderId") + private String resourceOrderId; + + @JsonProperty("itemAction") + private OrderItemActionType itemAction; + + @JsonProperty("itemId") + private String itemId; + + @JsonProperty("role") + private String role; + + public RelatedResourceOrderItemMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public RelatedResourceOrderItemMVO(String type) { + this.type = type; + } + + public RelatedResourceOrderItemMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public RelatedResourceOrderItemMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public RelatedResourceOrderItemMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public RelatedResourceOrderItemMVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public RelatedResourceOrderItemMVO resourceOrderHref(String resourceOrderHref) { + this.resourceOrderHref = resourceOrderHref; + return this; + } + + /** + * Reference of the related entity. + * @return resourceOrderHref + */ + + @Schema(name = "resourceOrderHref", description = "Reference of the related entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceOrderHref") + public String getResourceOrderHref() { + return resourceOrderHref; + } + + public void setResourceOrderHref(String resourceOrderHref) { + this.resourceOrderHref = resourceOrderHref; + } + + public RelatedResourceOrderItemMVO resourceOrderId(String resourceOrderId) { + this.resourceOrderId = resourceOrderId; + return this; + } + + /** + * Unique identifier of a related entity. + * @return resourceOrderId + */ + + @Schema(name = "resourceOrderId", description = "Unique identifier of a related entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceOrderId") + public String getResourceOrderId() { + return resourceOrderId; + } + + public void setResourceOrderId(String resourceOrderId) { + this.resourceOrderId = resourceOrderId; + } + + public RelatedResourceOrderItemMVO itemAction(OrderItemActionType itemAction) { + this.itemAction = itemAction; + return this; + } + + /** + * Get itemAction + * @return itemAction + */ + @Valid + @Schema(name = "itemAction", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("itemAction") + public OrderItemActionType getItemAction() { + return itemAction; + } + + public void setItemAction(OrderItemActionType itemAction) { + this.itemAction = itemAction; + } + + public RelatedResourceOrderItemMVO itemId(String itemId) { + this.itemId = itemId; + return this; + } + + /** + * Identifier of the order item where the resource was managed + * @return itemId + */ + + @Schema(name = "itemId", description = "Identifier of the order item where the resource was managed", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("itemId") + public String getItemId() { + return itemId; + } + + public void setItemId(String itemId) { + this.itemId = itemId; + } + + public RelatedResourceOrderItemMVO role(String role) { + this.role = role; + return this; + } + + /** + * role of the resource order item for this resource + * @return role + */ + + @Schema(name = "role", description = "role of the resource order item for this resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("role") + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RelatedResourceOrderItemMVO relatedResourceOrderItemMVO = (RelatedResourceOrderItemMVO) o; + return Objects.equals(this.type, relatedResourceOrderItemMVO.type) && + Objects.equals(this.baseType, relatedResourceOrderItemMVO.baseType) && + Objects.equals(this.schemaLocation, relatedResourceOrderItemMVO.schemaLocation) && + Objects.equals(this.referredType, relatedResourceOrderItemMVO.referredType) && + Objects.equals(this.resourceOrderHref, relatedResourceOrderItemMVO.resourceOrderHref) && + Objects.equals(this.resourceOrderId, relatedResourceOrderItemMVO.resourceOrderId) && + Objects.equals(this.itemAction, relatedResourceOrderItemMVO.itemAction) && + Objects.equals(this.itemId, relatedResourceOrderItemMVO.itemId) && + Objects.equals(this.role, relatedResourceOrderItemMVO.role); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, referredType, resourceOrderHref, resourceOrderId, itemAction, itemId, role); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelatedResourceOrderItemMVO {\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(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" resourceOrderHref: ").append(toIndentedString(resourceOrderHref)).append("\n"); + sb.append(" resourceOrderId: ").append(toIndentedString(resourceOrderId)).append("\n"); + sb.append(" itemAction: ").append(toIndentedString(itemAction)).append("\n"); + sb.append(" itemId: ").append(toIndentedString(itemId)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).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/pm628/model/ReportingPeriod.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ReportingPeriod.java new file mode 100644 index 0000000000000000000000000000000000000000..4837b94ef5bed4ac571aefc909349424d37ba66f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ReportingPeriod.java @@ -0,0 +1,55 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import javax.annotation.Generated; + +/** + * Possible values for the reporting period + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public enum ReportingPeriod { + + R_1MN("r_1mn"), + + R_5MN("r_5mn"), + + R_15MN("r_15mn"), + + R_30MN("r_30mn"), + + R_1H("r_1h"), + + R_24H("r_24h"), + + NA("na"); + + private String value; + + ReportingPeriod(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ReportingPeriod fromValue(String value) { + for (ReportingPeriod b : ReportingPeriod.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/Resource.java b/src/main/java/org/etsi/osl/tmf/pm628/model/Resource.java new file mode 100644 index 0000000000000000000000000000000000000000..01cd210b30ef75a5d857409685e4b35589cfaa8e --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/Resource.java @@ -0,0 +1,761 @@ +package org.etsi.osl.tmf.pm628.model; + +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.*; +import jakarta.persistence.Entity; +import jakarta.validation.Valid; +import org.etsi.osl.tmf.common.model.AttachmentRef; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; +import org.etsi.osl.tmf.common.model.TimePeriod; +import org.etsi.osl.tmf.common.model.service.Note; +import org.etsi.osl.tmf.rcm634.model.ResourceSpecificationRef; +import org.etsi.osl.tmf.ri639.model.ResourceAdministrativeStateType; +import org.etsi.osl.tmf.ri639.model.ResourceOperationalStateType; +import org.etsi.osl.tmf.ri639.model.ResourceUsageStateType; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * Resource + */ + +@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 = DataAccessEndpoint.class, name = "DataAccessEndpoint"), + @JsonSubTypes.Type(value = LogicalResource.class, name = "LogicalResource"), + @JsonSubTypes.Type(value = Resource.class, name = "Resource") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_Resource") +public class Resource extends BaseRootNamedEntity implements ResourceRefOrValue { + + @JsonProperty("category") + private String category; + + @JsonProperty("description") + private String description; + + @JsonProperty("endOperatingDate") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime endOperatingDate; + + @JsonProperty("administrativeState") + private ResourceAdministrativeStateType administrativeState; + + @JsonProperty("operationalState") + private ResourceOperationalStateType operationalState; + + @JsonProperty("resourceStatus") + private ResourceStatusType resourceStatus; + + @JsonProperty("usageState") + private ResourceUsageStateType usageState; + + @JsonProperty("validFor") + @Embedded + private TimePeriod validFor; + + @JsonProperty("note") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_resource_note", + joinColumns = @JoinColumn(name = "resource_uuid"), + inverseJoinColumns = @JoinColumn(name = "note_uuid") + ) + private List<Note> note = new ArrayList<>(); + + @JsonProperty("resourceOrderItem") + @Valid + @ElementCollection(targetClass = RelatedResourceOrderItem.class) + @CollectionTable( + name = "pm628_resource_roi", + joinColumns = @JoinColumn(name = "resource_uid") + ) + private List<RelatedResourceOrderItem> resourceOrderItem = new ArrayList<>(); + + @JsonProperty("place") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private List<RelatedPlaceRef> place = new ArrayList<>(); + + @JsonProperty("relatedParty") + @Valid + @ElementCollection(targetClass = RelatedPartyRefOrPartyRoleRef.class) + @CollectionTable( + name = "pm628_resource_rp", + joinColumns = @JoinColumn(name = "resource_uuid") + ) + private List<RelatedPartyRefOrPartyRoleRef> relatedParty = new ArrayList<>(); + + @JsonProperty("resourceRelationship") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_resource_res_rel", + joinColumns = @JoinColumn(name = "resource_uuid"), + inverseJoinColumns = @JoinColumn(name = "res_rel_uuid") + ) + private List<ResourceRelationship> resourceRelationship = new ArrayList<>(); + + @JsonProperty("resourceCharacteristic") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_resource_res_char", + joinColumns = @JoinColumn(name = "resource_uuid"), + inverseJoinColumns = @JoinColumn(name = "res_char_uuid") + ) + private List<Characteristic> resourceCharacteristic = new ArrayList<>(); + + @JsonProperty("attachment") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_resource_att", + joinColumns = @JoinColumn(name = "resource_uuid"), + inverseJoinColumns = @JoinColumn(name = "att_uuid") + ) + private List<AttachmentRef> attachment = new ArrayList<>(); + + @JsonProperty("resourceSpecification") + @ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinColumn(name = "res_spec_id") + private ResourceSpecificationRef resourceSpecification; + + @JsonProperty("startOperatingDate") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime startOperatingDate; + + @JsonProperty("resourceVersion") + private String resourceVersion; + + @JsonProperty("activationFeature") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_resource_act_feat", + joinColumns = @JoinColumn(name = "resource_uuid"), + inverseJoinColumns = @JoinColumn(name = "act_feat_uuid") + ) + private List<Feature> activationFeature = new ArrayList<>(); + + @JsonProperty("intent") + private IntentRef intent; + + @JsonProperty("externalIdentifier") + @Valid + @ElementCollection(targetClass = ExternalIdentifier.class) + @CollectionTable( + name = "pm628_resource_ext_idf", + joinColumns = @JoinColumn(name = "resource_uuid") + ) + private List<ExternalIdentifier> externalIdentifier = new ArrayList<>(); + + public Resource() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Resource(String type) { + this.type = type; + } + + public Resource category(String category) { + this.category = category; + return this; + } + + /** + * Category of the concrete resource. e.g Gold, Silver for MSISDN concrete resource + * @return category + */ + + @Schema(name = "category", description = "Category of the concrete resource. e.g Gold, Silver for MSISDN concrete resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("category") + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public Resource description(String description) { + this.description = description; + return this; + } + + /** + * free-text description of the resource + * @return description + */ + + @Schema(name = "description", description = "free-text description of the resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Resource endOperatingDate(OffsetDateTime endOperatingDate) { + this.endOperatingDate = endOperatingDate; + return this; + } + + /** + * A date time( DateTime). The date till the resource is operating + * @return endOperatingDate + */ + @Valid + @Schema(name = "endOperatingDate", description = "A date time( DateTime). The date till the resource is operating", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("endOperatingDate") + public OffsetDateTime getEndOperatingDate() { + return endOperatingDate; + } + + public void setEndOperatingDate(OffsetDateTime endOperatingDate) { + this.endOperatingDate = endOperatingDate; + } + + public Resource administrativeState(ResourceAdministrativeStateType administrativeState) { + this.administrativeState = administrativeState; + return this; + } + + /** + * Get administrativeState + * @return administrativeState + */ + @Valid + @Schema(name = "administrativeState", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("administrativeState") + public ResourceAdministrativeStateType getAdministrativeState() { + return administrativeState; + } + + public void setAdministrativeState(ResourceAdministrativeStateType administrativeState) { + this.administrativeState = administrativeState; + } + + public Resource operationalState(ResourceOperationalStateType operationalState) { + this.operationalState = operationalState; + return this; + } + + /** + * Get operationalState + * @return operationalState + */ + @Valid + @Schema(name = "operationalState", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("operationalState") + public ResourceOperationalStateType getOperationalState() { + return operationalState; + } + + public void setOperationalState(ResourceOperationalStateType operationalState) { + this.operationalState = operationalState; + } + + public Resource resourceStatus(ResourceStatusType resourceStatus) { + this.resourceStatus = resourceStatus; + return this; + } + + /** + * Get resourceStatus + * @return resourceStatus + */ + @Valid + @Schema(name = "resourceStatus", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceStatus") + public ResourceStatusType getResourceStatus() { + return resourceStatus; + } + + public void setResourceStatus(ResourceStatusType resourceStatus) { + this.resourceStatus = resourceStatus; + } + + public Resource usageState(ResourceUsageStateType usageState) { + this.usageState = usageState; + return this; + } + + /** + * Get usageState + * @return usageState + */ + @Valid + @Schema(name = "usageState", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("usageState") + public ResourceUsageStateType getUsageState() { + return usageState; + } + + public void setUsageState(ResourceUsageStateType usageState) { + this.usageState = usageState; + } + + public Resource 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 Resource note(List<Note> note) { + this.note = note; + return this; + } + + public Resource addNoteItem(Note noteItem) { + if (this.note == null) { + this.note = new ArrayList<>(); + } + this.note.add(noteItem); + return this; + } + + /** + * Get note + * @return note + */ + @Valid + @Schema(name = "note", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("note") + public List<Note> getNote() { + return note; + } + + public void setNote(List<Note> note) { + this.note = note; + } + + public Resource resourceOrderItem(List<RelatedResourceOrderItem> resourceOrderItem) { + this.resourceOrderItem = resourceOrderItem; + return this; + } + + public Resource addResourceOrderItemItem(RelatedResourceOrderItem resourceOrderItemItem) { + if (this.resourceOrderItem == null) { + this.resourceOrderItem = new ArrayList<>(); + } + this.resourceOrderItem.add(resourceOrderItemItem); + return this; + } + + /** + * A list of resource order items related to this resource + * @return resourceOrderItem + */ + @Valid + @Schema(name = "resourceOrderItem", description = "A list of resource order items related to this resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceOrderItem") + public List<RelatedResourceOrderItem> getResourceOrderItem() { + return resourceOrderItem; + } + + public void setResourceOrderItem(List<RelatedResourceOrderItem> resourceOrderItem) { + this.resourceOrderItem = resourceOrderItem; + } + + public Resource place(List<RelatedPlaceRef> place) { + this.place = place; + return this; + } + + public Resource addPlaceItem(RelatedPlaceRef 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) + @JsonProperty("place") + public List<RelatedPlaceRef> getPlace() { + return place; + } + + public void setPlace(List<RelatedPlaceRef> place) { + this.place = place; + } + + public Resource relatedParty(List<RelatedPartyRefOrPartyRoleRef> relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public Resource addRelatedPartyItem(RelatedPartyRefOrPartyRoleRef 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) + @JsonProperty("relatedParty") + public List<RelatedPartyRefOrPartyRoleRef> getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List<RelatedPartyRefOrPartyRoleRef> relatedParty) { + this.relatedParty = relatedParty; + } + + public Resource resourceRelationship(List<ResourceRelationship> resourceRelationship) { + this.resourceRelationship = resourceRelationship; + return this; + } + + public Resource addResourceRelationshipItem(ResourceRelationship resourceRelationshipItem) { + if (this.resourceRelationship == null) { + this.resourceRelationship = new ArrayList<>(); + } + this.resourceRelationship.add(resourceRelationshipItem); + return this; + } + + /** + * Get resourceRelationship + * @return resourceRelationship + */ + @Valid + @Schema(name = "resourceRelationship", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceRelationship") + public List<ResourceRelationship> getResourceRelationship() { + return resourceRelationship; + } + + public void setResourceRelationship(List<ResourceRelationship> resourceRelationship) { + this.resourceRelationship = resourceRelationship; + } + + public Resource resourceCharacteristic(List<Characteristic> resourceCharacteristic) { + this.resourceCharacteristic = resourceCharacteristic; + return this; + } + + public Resource addResourceCharacteristicItem(Characteristic resourceCharacteristicItem) { + if (this.resourceCharacteristic == null) { + this.resourceCharacteristic = new ArrayList<>(); + } + this.resourceCharacteristic.add(resourceCharacteristicItem); + return this; + } + + /** + * Get resourceCharacteristic + * @return resourceCharacteristic + */ + @Valid + @Schema(name = "resourceCharacteristic", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceCharacteristic") + public List<Characteristic> getResourceCharacteristic() { + return resourceCharacteristic; + } + + public void setResourceCharacteristic(List<Characteristic> resourceCharacteristic) { + this.resourceCharacteristic = resourceCharacteristic; + } + + public Resource attachment(List<AttachmentRef> attachment) { + this.attachment = attachment; + return this; + } + + public Resource addAttachmentItem(AttachmentRef attachmentItem) { + if (this.attachment == null) { + this.attachment = new ArrayList<>(); + } + this.attachment.add(attachmentItem); + return this; + } + + /** + * Get attachment + * @return attachment + */ + @Valid + @Schema(name = "attachment", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("attachment") + public List<AttachmentRef> getAttachment() { + return attachment; + } + + public void setAttachment(List<AttachmentRef> attachment) { + this.attachment = attachment; + } + + public Resource resourceSpecification(ResourceSpecificationRef resourceSpecification) { + this.resourceSpecification = resourceSpecification; + return this; + } + + /** + * Get resourceSpecification + * @return resourceSpecification + */ + @Valid + @Schema(name = "resourceSpecification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceSpecification") + public ResourceSpecificationRef getResourceSpecification() { + return resourceSpecification; + } + + public void setResourceSpecification(ResourceSpecificationRef resourceSpecification) { + this.resourceSpecification = resourceSpecification; + } + + public Resource startOperatingDate(OffsetDateTime startOperatingDate) { + this.startOperatingDate = startOperatingDate; + return this; + } + + /** + * A date time( DateTime). The date from which the resource is operating + * @return startOperatingDate + */ + @Valid + @Schema(name = "startOperatingDate", description = "A date time( DateTime). The date from which the resource is operating", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("startOperatingDate") + public OffsetDateTime getStartOperatingDate() { + return startOperatingDate; + } + + public void setStartOperatingDate(OffsetDateTime startOperatingDate) { + this.startOperatingDate = startOperatingDate; + } + + public Resource resourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + * A field that identifies the specific version of an instance of a resource. + * @return resourceVersion + */ + + @Schema(name = "resourceVersion", description = "A field that identifies the specific version of an instance of a resource.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceVersion") + public String getResourceVersion() { + return resourceVersion; + } + + public void setResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public Resource activationFeature(List<Feature> activationFeature) { + this.activationFeature = activationFeature; + return this; + } + + public Resource addActivationFeatureItem(Feature activationFeatureItem) { + if (this.activationFeature == null) { + this.activationFeature = new ArrayList<>(); + } + this.activationFeature.add(activationFeatureItem); + return this; + } + + /** + * Configuration features + * @return activationFeature + */ + @Valid + @Schema(name = "activationFeature", description = "Configuration features", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("activationFeature") + public List<Feature> getActivationFeature() { + return activationFeature; + } + + public void setActivationFeature(List<Feature> activationFeature) { + this.activationFeature = activationFeature; + } + + public Resource intent(IntentRef intent) { + this.intent = intent; + return this; + } + + /** + * Get intent + * @return intent + */ + @Valid + @Schema(name = "intent", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("intent") + public IntentRef getIntent() { + return intent; + } + + public void setIntent(IntentRef intent) { + this.intent = intent; + } + + public Resource externalIdentifier(List<ExternalIdentifier> externalIdentifier) { + this.externalIdentifier = externalIdentifier; + return this; + } + + public Resource addExternalIdentifierItem(ExternalIdentifier externalIdentifierItem) { + if (this.externalIdentifier == null) { + this.externalIdentifier = new ArrayList<>(); + } + this.externalIdentifier.add(externalIdentifierItem); + return this; + } + + /** + * An identification of this resource that is owned by or originates in a software system different from the current system. The structure identifies the system itself, the nature of the resource within the system and the unique ID of the resource within the system. It is anticipated that multiple external IDs can be held for a single resource, e.g. if the resource passed through multiple systems on the way to the current system. + * @return externalIdentifier + */ + @Valid + @Schema(name = "externalIdentifier", description = "An identification of this resource that is owned by or originates in a software system different from the current system. The structure identifies the system itself, the nature of the resource within the system and the unique ID of the resource within the system. It is anticipated that multiple external IDs can be held for a single resource, e.g. if the resource passed through multiple systems on the way to the current system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("externalIdentifier") + public List<ExternalIdentifier> getExternalIdentifier() { + return externalIdentifier; + } + + public void setExternalIdentifier(List<ExternalIdentifier> externalIdentifier) { + this.externalIdentifier = externalIdentifier; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Resource resource = (Resource) o; + return Objects.equals(this.type, resource.type) && + Objects.equals(this.baseType, resource.baseType) && + Objects.equals(this.schemaLocation, resource.schemaLocation) && + Objects.equals(this.href, resource.href) && + Objects.equals(this.uuid, resource.uuid) && + Objects.equals(this.category, resource.category) && + Objects.equals(this.description, resource.description) && + Objects.equals(this.name, resource.name) && + Objects.equals(this.endOperatingDate, resource.endOperatingDate) && + Objects.equals(this.administrativeState, resource.administrativeState) && + Objects.equals(this.operationalState, resource.operationalState) && + Objects.equals(this.resourceStatus, resource.resourceStatus) && + Objects.equals(this.usageState, resource.usageState) && + Objects.equals(this.validFor, resource.validFor) && + Objects.equals(this.note, resource.note) && + Objects.equals(this.resourceOrderItem, resource.resourceOrderItem) && + Objects.equals(this.place, resource.place) && + Objects.equals(this.relatedParty, resource.relatedParty) && + Objects.equals(this.resourceRelationship, resource.resourceRelationship) && + Objects.equals(this.resourceCharacteristic, resource.resourceCharacteristic) && + Objects.equals(this.attachment, resource.attachment) && + Objects.equals(this.resourceSpecification, resource.resourceSpecification) && + Objects.equals(this.startOperatingDate, resource.startOperatingDate) && + Objects.equals(this.resourceVersion, resource.resourceVersion) && + Objects.equals(this.activationFeature, resource.activationFeature) && + Objects.equals(this.intent, resource.intent) && + Objects.equals(this.externalIdentifier, resource.externalIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, category, description, name, endOperatingDate, administrativeState, operationalState, resourceStatus, usageState, validFor, note, resourceOrderItem, place, relatedParty, resourceRelationship, resourceCharacteristic, attachment, resourceSpecification, startOperatingDate, resourceVersion, activationFeature, intent, externalIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Resource {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" endOperatingDate: ").append(toIndentedString(endOperatingDate)).append("\n"); + sb.append(" administrativeState: ").append(toIndentedString(administrativeState)).append("\n"); + sb.append(" operationalState: ").append(toIndentedString(operationalState)).append("\n"); + sb.append(" resourceStatus: ").append(toIndentedString(resourceStatus)).append("\n"); + sb.append(" usageState: ").append(toIndentedString(usageState)).append("\n"); + sb.append(" validFor: ").append(toIndentedString(validFor)).append("\n"); + sb.append(" note: ").append(toIndentedString(note)).append("\n"); + sb.append(" resourceOrderItem: ").append(toIndentedString(resourceOrderItem)).append("\n"); + sb.append(" place: ").append(toIndentedString(place)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" resourceRelationship: ").append(toIndentedString(resourceRelationship)).append("\n"); + sb.append(" resourceCharacteristic: ").append(toIndentedString(resourceCharacteristic)).append("\n"); + sb.append(" attachment: ").append(toIndentedString(attachment)).append("\n"); + sb.append(" resourceSpecification: ").append(toIndentedString(resourceSpecification)).append("\n"); + sb.append(" startOperatingDate: ").append(toIndentedString(startOperatingDate)).append("\n"); + sb.append(" resourceVersion: ").append(toIndentedString(resourceVersion)).append("\n"); + sb.append(" activationFeature: ").append(toIndentedString(activationFeature)).append("\n"); + sb.append(" intent: ").append(toIndentedString(intent)).append("\n"); + sb.append(" externalIdentifier: ").append(toIndentedString(externalIdentifier)).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/pm628/model/ResourceFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..9956563aecf040d3c6e26a95c26de02c5b9a1b1d --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceFVO.java @@ -0,0 +1,844 @@ +package org.etsi.osl.tmf.pm628.model; + +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.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.common.model.TimePeriod; +import org.etsi.osl.tmf.ri639.model.ResourceAdministrativeStateType; +import org.etsi.osl.tmf.ri639.model.ResourceOperationalStateType; +import org.etsi.osl.tmf.ri639.model.ResourceUsageStateType; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * ResourceFVO + */ + +@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 = DataAccessEndpointFVO.class, name = "DataAccessEndpoint"), + @JsonSubTypes.Type(value = LogicalResourceFVO.class, name = "LogicalResource"), + @JsonSubTypes.Type(value = ResourceFVO.class, name = "Resource") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ResourceFVO implements ResourceRefOrValueFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("category") + private String category; + + @JsonProperty("description") + private String description; + + @JsonProperty("name") + private String name; + + @JsonProperty("endOperatingDate") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime endOperatingDate; + + @JsonProperty("administrativeState") + private ResourceAdministrativeStateType administrativeState; + + @JsonProperty("operationalState") + private ResourceOperationalStateType operationalState; + + @JsonProperty("resourceStatus") + private ResourceStatusType resourceStatus; + + @JsonProperty("usageState") + private ResourceUsageStateType usageState; + + @JsonProperty("validFor") + private TimePeriod validFor; + + @JsonProperty("note") + @Valid + private List<NoteFVO> note = new ArrayList<>(); + + @JsonProperty("resourceOrderItem") + @Valid + private List<RelatedResourceOrderItemFVO> resourceOrderItem = new ArrayList<>(); + + @JsonProperty("place") + @Valid + private List<RelatedPlaceRefFVO> place = new ArrayList<>(); + + @JsonProperty("relatedParty") + @Valid + private List<RelatedPartyRefOrPartyRoleRefFVO> relatedParty = new ArrayList<>(); + + @JsonProperty("resourceRelationship") + @Valid + private List<ResourceRelationshipFVO> resourceRelationship = new ArrayList<>(); + + @JsonProperty("resourceCharacteristic") + @Valid + private List<CharacteristicFVO> resourceCharacteristic = new ArrayList<>(); + + @JsonProperty("attachment") + @Valid + private List<AttachmentRefFVO> attachment = new ArrayList<>(); + + @JsonProperty("resourceSpecification") + private ResourceSpecificationRefFVO resourceSpecification; + + @JsonProperty("startOperatingDate") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime startOperatingDate; + + @JsonProperty("resourceVersion") + private String resourceVersion; + + @JsonProperty("activationFeature") + @Valid + private List<FeatureFVO> activationFeature = new ArrayList<>(); + + @JsonProperty("intent") + private IntentRefFVO intent; + + @JsonProperty("externalIdentifier") + @Valid + private List<ExternalIdentifierFVO> externalIdentifier = new ArrayList<>(); + + public ResourceFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ResourceFVO(String type) { + this.type = type; + } + + public ResourceFVO type(String type) { + this.type = type; + 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 getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ResourceFVO baseType(String baseType) { + this.baseType = baseType; + 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 getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ResourceFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + 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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ResourceFVO 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 ResourceFVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public ResourceFVO category(String category) { + this.category = category; + return this; + } + + /** + * Category of the concrete resource. e.g Gold, Silver for MSISDN concrete resource + * @return category + */ + + @Schema(name = "category", description = "Category of the concrete resource. e.g Gold, Silver for MSISDN concrete resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("category") + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public ResourceFVO description(String description) { + this.description = description; + return this; + } + + /** + * free-text description of the resource + * @return description + */ + + @Schema(name = "description", description = "free-text description of the resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ResourceFVO name(String name) { + this.name = name; + return this; + } + + /** + * the name of the resource + * @return name + */ + + @Schema(name = "name", description = "the name of the resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ResourceFVO endOperatingDate(OffsetDateTime endOperatingDate) { + this.endOperatingDate = endOperatingDate; + return this; + } + + /** + * A date time( DateTime). The date till the resource is operating + * @return endOperatingDate + */ + @Valid + @Schema(name = "endOperatingDate", description = "A date time( DateTime). The date till the resource is operating", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("endOperatingDate") + public OffsetDateTime getEndOperatingDate() { + return endOperatingDate; + } + + public void setEndOperatingDate(OffsetDateTime endOperatingDate) { + this.endOperatingDate = endOperatingDate; + } + + public ResourceFVO administrativeState(ResourceAdministrativeStateType administrativeState) { + this.administrativeState = administrativeState; + return this; + } + + /** + * Get administrativeState + * @return administrativeState + */ + @Valid + @Schema(name = "administrativeState", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("administrativeState") + public ResourceAdministrativeStateType getAdministrativeState() { + return administrativeState; + } + + public void setAdministrativeState(ResourceAdministrativeStateType administrativeState) { + this.administrativeState = administrativeState; + } + + public ResourceFVO operationalState(ResourceOperationalStateType operationalState) { + this.operationalState = operationalState; + return this; + } + + /** + * Get operationalState + * @return operationalState + */ + @Valid + @Schema(name = "operationalState", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("operationalState") + public ResourceOperationalStateType getOperationalState() { + return operationalState; + } + + public void setOperationalState(ResourceOperationalStateType operationalState) { + this.operationalState = operationalState; + } + + public ResourceFVO resourceStatus(ResourceStatusType resourceStatus) { + this.resourceStatus = resourceStatus; + return this; + } + + /** + * Get resourceStatus + * @return resourceStatus + */ + @Valid + @Schema(name = "resourceStatus", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceStatus") + public ResourceStatusType getResourceStatus() { + return resourceStatus; + } + + public void setResourceStatus(ResourceStatusType resourceStatus) { + this.resourceStatus = resourceStatus; + } + + public ResourceFVO usageState(ResourceUsageStateType usageState) { + this.usageState = usageState; + return this; + } + + /** + * Get usageState + * @return usageState + */ + @Valid + @Schema(name = "usageState", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("usageState") + public ResourceUsageStateType getUsageState() { + return usageState; + } + + public void setUsageState(ResourceUsageStateType usageState) { + this.usageState = usageState; + } + + public ResourceFVO 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 ResourceFVO note(List<NoteFVO> note) { + this.note = note; + return this; + } + + public ResourceFVO addNoteItem(NoteFVO noteItem) { + if (this.note == null) { + this.note = new ArrayList<>(); + } + this.note.add(noteItem); + return this; + } + + /** + * Get note + * @return note + */ + @Valid + @Schema(name = "note", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("note") + public List<NoteFVO> getNote() { + return note; + } + + public void setNote(List<NoteFVO> note) { + this.note = note; + } + + public ResourceFVO resourceOrderItem(List<RelatedResourceOrderItemFVO> resourceOrderItem) { + this.resourceOrderItem = resourceOrderItem; + return this; + } + + public ResourceFVO addResourceOrderItemItem(RelatedResourceOrderItemFVO resourceOrderItemItem) { + if (this.resourceOrderItem == null) { + this.resourceOrderItem = new ArrayList<>(); + } + this.resourceOrderItem.add(resourceOrderItemItem); + return this; + } + + /** + * A list of resource order items related to this resource + * @return resourceOrderItem + */ + @Valid + @Schema(name = "resourceOrderItem", description = "A list of resource order items related to this resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceOrderItem") + public List<RelatedResourceOrderItemFVO> getResourceOrderItem() { + return resourceOrderItem; + } + + public void setResourceOrderItem(List<RelatedResourceOrderItemFVO> resourceOrderItem) { + this.resourceOrderItem = resourceOrderItem; + } + + public ResourceFVO place(List<RelatedPlaceRefFVO> place) { + this.place = place; + return this; + } + + public ResourceFVO addPlaceItem(RelatedPlaceRefFVO 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) + @JsonProperty("place") + public List<RelatedPlaceRefFVO> getPlace() { + return place; + } + + public void setPlace(List<RelatedPlaceRefFVO> place) { + this.place = place; + } + + public ResourceFVO relatedParty(List<RelatedPartyRefOrPartyRoleRefFVO> relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public ResourceFVO addRelatedPartyItem(RelatedPartyRefOrPartyRoleRefFVO 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) + @JsonProperty("relatedParty") + public List<RelatedPartyRefOrPartyRoleRefFVO> getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List<RelatedPartyRefOrPartyRoleRefFVO> relatedParty) { + this.relatedParty = relatedParty; + } + + public ResourceFVO resourceRelationship(List<ResourceRelationshipFVO> resourceRelationship) { + this.resourceRelationship = resourceRelationship; + return this; + } + + public ResourceFVO addResourceRelationshipItem(ResourceRelationshipFVO resourceRelationshipItem) { + if (this.resourceRelationship == null) { + this.resourceRelationship = new ArrayList<>(); + } + this.resourceRelationship.add(resourceRelationshipItem); + return this; + } + + /** + * Get resourceRelationship + * @return resourceRelationship + */ + @Valid + @Schema(name = "resourceRelationship", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceRelationship") + public List<ResourceRelationshipFVO> getResourceRelationship() { + return resourceRelationship; + } + + public void setResourceRelationship(List<ResourceRelationshipFVO> resourceRelationship) { + this.resourceRelationship = resourceRelationship; + } + + public ResourceFVO resourceCharacteristic(List<CharacteristicFVO> resourceCharacteristic) { + this.resourceCharacteristic = resourceCharacteristic; + return this; + } + + public ResourceFVO addResourceCharacteristicItem(CharacteristicFVO resourceCharacteristicItem) { + if (this.resourceCharacteristic == null) { + this.resourceCharacteristic = new ArrayList<>(); + } + this.resourceCharacteristic.add(resourceCharacteristicItem); + return this; + } + + /** + * Get resourceCharacteristic + * @return resourceCharacteristic + */ + @Valid + @Schema(name = "resourceCharacteristic", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceCharacteristic") + public List<CharacteristicFVO> getResourceCharacteristic() { + return resourceCharacteristic; + } + + public void setResourceCharacteristic(List<CharacteristicFVO> resourceCharacteristic) { + this.resourceCharacteristic = resourceCharacteristic; + } + + public ResourceFVO attachment(List<AttachmentRefFVO> attachment) { + this.attachment = attachment; + return this; + } + + public ResourceFVO addAttachmentItem(AttachmentRefFVO attachmentItem) { + if (this.attachment == null) { + this.attachment = new ArrayList<>(); + } + this.attachment.add(attachmentItem); + return this; + } + + /** + * Get attachment + * @return attachment + */ + @Valid + @Schema(name = "attachment", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("attachment") + public List<AttachmentRefFVO> getAttachment() { + return attachment; + } + + public void setAttachment(List<AttachmentRefFVO> attachment) { + this.attachment = attachment; + } + + public ResourceFVO resourceSpecification(ResourceSpecificationRefFVO resourceSpecification) { + this.resourceSpecification = resourceSpecification; + return this; + } + + /** + * Get resourceSpecification + * @return resourceSpecification + */ + @Valid + @Schema(name = "resourceSpecification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceSpecification") + public ResourceSpecificationRefFVO getResourceSpecification() { + return resourceSpecification; + } + + public void setResourceSpecification(ResourceSpecificationRefFVO resourceSpecification) { + this.resourceSpecification = resourceSpecification; + } + + public ResourceFVO startOperatingDate(OffsetDateTime startOperatingDate) { + this.startOperatingDate = startOperatingDate; + return this; + } + + /** + * A date time( DateTime). The date from which the resource is operating + * @return startOperatingDate + */ + @Valid + @Schema(name = "startOperatingDate", description = "A date time( DateTime). The date from which the resource is operating", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("startOperatingDate") + public OffsetDateTime getStartOperatingDate() { + return startOperatingDate; + } + + public void setStartOperatingDate(OffsetDateTime startOperatingDate) { + this.startOperatingDate = startOperatingDate; + } + + public ResourceFVO resourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + * A field that identifies the specific version of an instance of a resource. + * @return resourceVersion + */ + + @Schema(name = "resourceVersion", description = "A field that identifies the specific version of an instance of a resource.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceVersion") + public String getResourceVersion() { + return resourceVersion; + } + + public void setResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public ResourceFVO activationFeature(List<FeatureFVO> activationFeature) { + this.activationFeature = activationFeature; + return this; + } + + public ResourceFVO addActivationFeatureItem(FeatureFVO activationFeatureItem) { + if (this.activationFeature == null) { + this.activationFeature = new ArrayList<>(); + } + this.activationFeature.add(activationFeatureItem); + return this; + } + + /** + * Configuration features + * @return activationFeature + */ + @Valid + @Schema(name = "activationFeature", description = "Configuration features", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("activationFeature") + public List<FeatureFVO> getActivationFeature() { + return activationFeature; + } + + public void setActivationFeature(List<FeatureFVO> activationFeature) { + this.activationFeature = activationFeature; + } + + public ResourceFVO intent(IntentRefFVO intent) { + this.intent = intent; + return this; + } + + /** + * Get intent + * @return intent + */ + @Valid + @Schema(name = "intent", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("intent") + public IntentRefFVO getIntent() { + return intent; + } + + public void setIntent(IntentRefFVO intent) { + this.intent = intent; + } + + public ResourceFVO externalIdentifier(List<ExternalIdentifierFVO> externalIdentifier) { + this.externalIdentifier = externalIdentifier; + return this; + } + + public ResourceFVO addExternalIdentifierItem(ExternalIdentifierFVO externalIdentifierItem) { + if (this.externalIdentifier == null) { + this.externalIdentifier = new ArrayList<>(); + } + this.externalIdentifier.add(externalIdentifierItem); + return this; + } + + /** + * An identification of this resource that is owned by or originates in a software system different from the current system. The structure identifies the system itself, the nature of the resource within the system and the unique ID of the resource within the system. It is anticipated that multiple external IDs can be held for a single resource, e.g. if the resource passed through multiple systems on the way to the current system. + * @return externalIdentifier + */ + @Valid + @Schema(name = "externalIdentifier", description = "An identification of this resource that is owned by or originates in a software system different from the current system. The structure identifies the system itself, the nature of the resource within the system and the unique ID of the resource within the system. It is anticipated that multiple external IDs can be held for a single resource, e.g. if the resource passed through multiple systems on the way to the current system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("externalIdentifier") + public List<ExternalIdentifierFVO> getExternalIdentifier() { + return externalIdentifier; + } + + public void setExternalIdentifier(List<ExternalIdentifierFVO> externalIdentifier) { + this.externalIdentifier = externalIdentifier; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceFVO resourceFVO = (ResourceFVO) o; + return Objects.equals(this.type, resourceFVO.type) && + Objects.equals(this.baseType, resourceFVO.baseType) && + Objects.equals(this.schemaLocation, resourceFVO.schemaLocation) && + Objects.equals(this.href, resourceFVO.href) && + Objects.equals(this.uuid, resourceFVO.uuid) && + Objects.equals(this.category, resourceFVO.category) && + Objects.equals(this.description, resourceFVO.description) && + Objects.equals(this.name, resourceFVO.name) && + Objects.equals(this.endOperatingDate, resourceFVO.endOperatingDate) && + Objects.equals(this.administrativeState, resourceFVO.administrativeState) && + Objects.equals(this.operationalState, resourceFVO.operationalState) && + Objects.equals(this.resourceStatus, resourceFVO.resourceStatus) && + Objects.equals(this.usageState, resourceFVO.usageState) && + Objects.equals(this.validFor, resourceFVO.validFor) && + Objects.equals(this.note, resourceFVO.note) && + Objects.equals(this.resourceOrderItem, resourceFVO.resourceOrderItem) && + Objects.equals(this.place, resourceFVO.place) && + Objects.equals(this.relatedParty, resourceFVO.relatedParty) && + Objects.equals(this.resourceRelationship, resourceFVO.resourceRelationship) && + Objects.equals(this.resourceCharacteristic, resourceFVO.resourceCharacteristic) && + Objects.equals(this.attachment, resourceFVO.attachment) && + Objects.equals(this.resourceSpecification, resourceFVO.resourceSpecification) && + Objects.equals(this.startOperatingDate, resourceFVO.startOperatingDate) && + Objects.equals(this.resourceVersion, resourceFVO.resourceVersion) && + Objects.equals(this.activationFeature, resourceFVO.activationFeature) && + Objects.equals(this.intent, resourceFVO.intent) && + Objects.equals(this.externalIdentifier, resourceFVO.externalIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, category, description, name, endOperatingDate, administrativeState, operationalState, resourceStatus, usageState, validFor, note, resourceOrderItem, place, relatedParty, resourceRelationship, resourceCharacteristic, attachment, resourceSpecification, startOperatingDate, resourceVersion, activationFeature, intent, externalIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceFVO {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" endOperatingDate: ").append(toIndentedString(endOperatingDate)).append("\n"); + sb.append(" administrativeState: ").append(toIndentedString(administrativeState)).append("\n"); + sb.append(" operationalState: ").append(toIndentedString(operationalState)).append("\n"); + sb.append(" resourceStatus: ").append(toIndentedString(resourceStatus)).append("\n"); + sb.append(" usageState: ").append(toIndentedString(usageState)).append("\n"); + sb.append(" validFor: ").append(toIndentedString(validFor)).append("\n"); + sb.append(" note: ").append(toIndentedString(note)).append("\n"); + sb.append(" resourceOrderItem: ").append(toIndentedString(resourceOrderItem)).append("\n"); + sb.append(" place: ").append(toIndentedString(place)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" resourceRelationship: ").append(toIndentedString(resourceRelationship)).append("\n"); + sb.append(" resourceCharacteristic: ").append(toIndentedString(resourceCharacteristic)).append("\n"); + sb.append(" attachment: ").append(toIndentedString(attachment)).append("\n"); + sb.append(" resourceSpecification: ").append(toIndentedString(resourceSpecification)).append("\n"); + sb.append(" startOperatingDate: ").append(toIndentedString(startOperatingDate)).append("\n"); + sb.append(" resourceVersion: ").append(toIndentedString(resourceVersion)).append("\n"); + sb.append(" activationFeature: ").append(toIndentedString(activationFeature)).append("\n"); + sb.append(" intent: ").append(toIndentedString(intent)).append("\n"); + sb.append(" externalIdentifier: ").append(toIndentedString(externalIdentifier)).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/pm628/model/ResourceMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..59d1aee9c19000d796519ecaf7eedb4cccd930ff --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceMVO.java @@ -0,0 +1,844 @@ +package org.etsi.osl.tmf.pm628.model; + +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.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.common.model.TimePeriod; +import org.etsi.osl.tmf.ri639.model.ResourceAdministrativeStateType; +import org.etsi.osl.tmf.ri639.model.ResourceOperationalStateType; +import org.etsi.osl.tmf.ri639.model.ResourceUsageStateType; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * ResourceMVO + */ + +@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 = DataAccessEndpointMVO.class, name = "DataAccessEndpoint"), + @JsonSubTypes.Type(value = LogicalResourceMVO.class, name = "LogicalResource"), + @JsonSubTypes.Type(value = ResourceMVO.class, name = "Resource") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ResourceMVO implements ResourceRefOrValueMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("category") + private String category; + + @JsonProperty("description") + private String description; + + @JsonProperty("name") + private String name; + + @JsonProperty("endOperatingDate") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime endOperatingDate; + + @JsonProperty("administrativeState") + private ResourceAdministrativeStateType administrativeState; + + @JsonProperty("operationalState") + private ResourceOperationalStateType operationalState; + + @JsonProperty("resourceStatus") + private ResourceStatusType resourceStatus; + + @JsonProperty("usageState") + private ResourceUsageStateType usageState; + + @JsonProperty("validFor") + private TimePeriod validFor; + + @JsonProperty("note") + @Valid + private List<NoteMVO> note = new ArrayList<>(); + + @JsonProperty("resourceOrderItem") + @Valid + private List<RelatedResourceOrderItemMVO> resourceOrderItem = new ArrayList<>(); + + @JsonProperty("place") + @Valid + private List<RelatedPlaceRefMVO> place = new ArrayList<>(); + + @JsonProperty("relatedParty") + @Valid + private List<RelatedPartyRefOrPartyRoleRefMVO> relatedParty = new ArrayList<>(); + + @JsonProperty("resourceRelationship") + @Valid + private List<ResourceRelationshipMVO> resourceRelationship = new ArrayList<>(); + + @JsonProperty("resourceCharacteristic") + @Valid + private List<CharacteristicMVO> resourceCharacteristic = new ArrayList<>(); + + @JsonProperty("attachment") + @Valid + private List<AttachmentRefMVO> attachment = new ArrayList<>(); + + @JsonProperty("resourceSpecification") + private ResourceSpecificationRefMVO resourceSpecification; + + @JsonProperty("startOperatingDate") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime startOperatingDate; + + @JsonProperty("resourceVersion") + private String resourceVersion; + + @JsonProperty("activationFeature") + @Valid + private List<FeatureMVO> activationFeature = new ArrayList<>(); + + @JsonProperty("intent") + private IntentRefMVO intent; + + @JsonProperty("externalIdentifier") + @Valid + private List<ExternalIdentifierMVO> externalIdentifier = new ArrayList<>(); + + public ResourceMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ResourceMVO(String type) { + this.type = type; + } + + public ResourceMVO type(String type) { + this.type = type; + 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 getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ResourceMVO baseType(String baseType) { + this.baseType = baseType; + 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 getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ResourceMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + 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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ResourceMVO 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 ResourceMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public ResourceMVO category(String category) { + this.category = category; + return this; + } + + /** + * Category of the concrete resource. e.g Gold, Silver for MSISDN concrete resource + * @return category + */ + + @Schema(name = "category", description = "Category of the concrete resource. e.g Gold, Silver for MSISDN concrete resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("category") + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public ResourceMVO description(String description) { + this.description = description; + return this; + } + + /** + * free-text description of the resource + * @return description + */ + + @Schema(name = "description", description = "free-text description of the resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ResourceMVO name(String name) { + this.name = name; + return this; + } + + /** + * the name of the resource + * @return name + */ + + @Schema(name = "name", description = "the name of the resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ResourceMVO endOperatingDate(OffsetDateTime endOperatingDate) { + this.endOperatingDate = endOperatingDate; + return this; + } + + /** + * A date time( DateTime). The date till the resource is operating + * @return endOperatingDate + */ + @Valid + @Schema(name = "endOperatingDate", description = "A date time( DateTime). The date till the resource is operating", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("endOperatingDate") + public OffsetDateTime getEndOperatingDate() { + return endOperatingDate; + } + + public void setEndOperatingDate(OffsetDateTime endOperatingDate) { + this.endOperatingDate = endOperatingDate; + } + + public ResourceMVO administrativeState(ResourceAdministrativeStateType administrativeState) { + this.administrativeState = administrativeState; + return this; + } + + /** + * Get administrativeState + * @return administrativeState + */ + @Valid + @Schema(name = "administrativeState", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("administrativeState") + public ResourceAdministrativeStateType getAdministrativeState() { + return administrativeState; + } + + public void setAdministrativeState(ResourceAdministrativeStateType administrativeState) { + this.administrativeState = administrativeState; + } + + public ResourceMVO operationalState(ResourceOperationalStateType operationalState) { + this.operationalState = operationalState; + return this; + } + + /** + * Get operationalState + * @return operationalState + */ + @Valid + @Schema(name = "operationalState", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("operationalState") + public ResourceOperationalStateType getOperationalState() { + return operationalState; + } + + public void setOperationalState(ResourceOperationalStateType operationalState) { + this.operationalState = operationalState; + } + + public ResourceMVO resourceStatus(ResourceStatusType resourceStatus) { + this.resourceStatus = resourceStatus; + return this; + } + + /** + * Get resourceStatus + * @return resourceStatus + */ + @Valid + @Schema(name = "resourceStatus", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceStatus") + public ResourceStatusType getResourceStatus() { + return resourceStatus; + } + + public void setResourceStatus(ResourceStatusType resourceStatus) { + this.resourceStatus = resourceStatus; + } + + public ResourceMVO usageState(ResourceUsageStateType usageState) { + this.usageState = usageState; + return this; + } + + /** + * Get usageState + * @return usageState + */ + @Valid + @Schema(name = "usageState", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("usageState") + public ResourceUsageStateType getUsageState() { + return usageState; + } + + public void setUsageState(ResourceUsageStateType usageState) { + this.usageState = usageState; + } + + public ResourceMVO 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 ResourceMVO note(List<NoteMVO> note) { + this.note = note; + return this; + } + + public ResourceMVO addNoteItem(NoteMVO noteItem) { + if (this.note == null) { + this.note = new ArrayList<>(); + } + this.note.add(noteItem); + return this; + } + + /** + * Get note + * @return note + */ + @Valid + @Schema(name = "note", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("note") + public List<NoteMVO> getNote() { + return note; + } + + public void setNote(List<NoteMVO> note) { + this.note = note; + } + + public ResourceMVO resourceOrderItem(List<RelatedResourceOrderItemMVO> resourceOrderItem) { + this.resourceOrderItem = resourceOrderItem; + return this; + } + + public ResourceMVO addResourceOrderItemItem(RelatedResourceOrderItemMVO resourceOrderItemItem) { + if (this.resourceOrderItem == null) { + this.resourceOrderItem = new ArrayList<>(); + } + this.resourceOrderItem.add(resourceOrderItemItem); + return this; + } + + /** + * A list of resource order items related to this resource + * @return resourceOrderItem + */ + @Valid + @Schema(name = "resourceOrderItem", description = "A list of resource order items related to this resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceOrderItem") + public List<RelatedResourceOrderItemMVO> getResourceOrderItem() { + return resourceOrderItem; + } + + public void setResourceOrderItem(List<RelatedResourceOrderItemMVO> resourceOrderItem) { + this.resourceOrderItem = resourceOrderItem; + } + + public ResourceMVO place(List<RelatedPlaceRefMVO> place) { + this.place = place; + return this; + } + + public ResourceMVO addPlaceItem(RelatedPlaceRefMVO 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) + @JsonProperty("place") + public List<RelatedPlaceRefMVO> getPlace() { + return place; + } + + public void setPlace(List<RelatedPlaceRefMVO> place) { + this.place = place; + } + + public ResourceMVO relatedParty(List<RelatedPartyRefOrPartyRoleRefMVO> relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public ResourceMVO addRelatedPartyItem(RelatedPartyRefOrPartyRoleRefMVO 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) + @JsonProperty("relatedParty") + public List<RelatedPartyRefOrPartyRoleRefMVO> getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List<RelatedPartyRefOrPartyRoleRefMVO> relatedParty) { + this.relatedParty = relatedParty; + } + + public ResourceMVO resourceRelationship(List<ResourceRelationshipMVO> resourceRelationship) { + this.resourceRelationship = resourceRelationship; + return this; + } + + public ResourceMVO addResourceRelationshipItem(ResourceRelationshipMVO resourceRelationshipItem) { + if (this.resourceRelationship == null) { + this.resourceRelationship = new ArrayList<>(); + } + this.resourceRelationship.add(resourceRelationshipItem); + return this; + } + + /** + * Get resourceRelationship + * @return resourceRelationship + */ + @Valid + @Schema(name = "resourceRelationship", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceRelationship") + public List<ResourceRelationshipMVO> getResourceRelationship() { + return resourceRelationship; + } + + public void setResourceRelationship(List<ResourceRelationshipMVO> resourceRelationship) { + this.resourceRelationship = resourceRelationship; + } + + public ResourceMVO resourceCharacteristic(List<CharacteristicMVO> resourceCharacteristic) { + this.resourceCharacteristic = resourceCharacteristic; + return this; + } + + public ResourceMVO addResourceCharacteristicItem(CharacteristicMVO resourceCharacteristicItem) { + if (this.resourceCharacteristic == null) { + this.resourceCharacteristic = new ArrayList<>(); + } + this.resourceCharacteristic.add(resourceCharacteristicItem); + return this; + } + + /** + * Get resourceCharacteristic + * @return resourceCharacteristic + */ + @Valid + @Schema(name = "resourceCharacteristic", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceCharacteristic") + public List<CharacteristicMVO> getResourceCharacteristic() { + return resourceCharacteristic; + } + + public void setResourceCharacteristic(List<CharacteristicMVO> resourceCharacteristic) { + this.resourceCharacteristic = resourceCharacteristic; + } + + public ResourceMVO attachment(List<AttachmentRefMVO> attachment) { + this.attachment = attachment; + return this; + } + + public ResourceMVO addAttachmentItem(AttachmentRefMVO attachmentItem) { + if (this.attachment == null) { + this.attachment = new ArrayList<>(); + } + this.attachment.add(attachmentItem); + return this; + } + + /** + * Get attachment + * @return attachment + */ + @Valid + @Schema(name = "attachment", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("attachment") + public List<AttachmentRefMVO> getAttachment() { + return attachment; + } + + public void setAttachment(List<AttachmentRefMVO> attachment) { + this.attachment = attachment; + } + + public ResourceMVO resourceSpecification(ResourceSpecificationRefMVO resourceSpecification) { + this.resourceSpecification = resourceSpecification; + return this; + } + + /** + * Get resourceSpecification + * @return resourceSpecification + */ + @Valid + @Schema(name = "resourceSpecification", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceSpecification") + public ResourceSpecificationRefMVO getResourceSpecification() { + return resourceSpecification; + } + + public void setResourceSpecification(ResourceSpecificationRefMVO resourceSpecification) { + this.resourceSpecification = resourceSpecification; + } + + public ResourceMVO startOperatingDate(OffsetDateTime startOperatingDate) { + this.startOperatingDate = startOperatingDate; + return this; + } + + /** + * A date time( DateTime). The date from which the resource is operating + * @return startOperatingDate + */ + @Valid + @Schema(name = "startOperatingDate", description = "A date time( DateTime). The date from which the resource is operating", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("startOperatingDate") + public OffsetDateTime getStartOperatingDate() { + return startOperatingDate; + } + + public void setStartOperatingDate(OffsetDateTime startOperatingDate) { + this.startOperatingDate = startOperatingDate; + } + + public ResourceMVO resourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + * A field that identifies the specific version of an instance of a resource. + * @return resourceVersion + */ + + @Schema(name = "resourceVersion", description = "A field that identifies the specific version of an instance of a resource.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceVersion") + public String getResourceVersion() { + return resourceVersion; + } + + public void setResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public ResourceMVO activationFeature(List<FeatureMVO> activationFeature) { + this.activationFeature = activationFeature; + return this; + } + + public ResourceMVO addActivationFeatureItem(FeatureMVO activationFeatureItem) { + if (this.activationFeature == null) { + this.activationFeature = new ArrayList<>(); + } + this.activationFeature.add(activationFeatureItem); + return this; + } + + /** + * Configuration features + * @return activationFeature + */ + @Valid + @Schema(name = "activationFeature", description = "Configuration features", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("activationFeature") + public List<FeatureMVO> getActivationFeature() { + return activationFeature; + } + + public void setActivationFeature(List<FeatureMVO> activationFeature) { + this.activationFeature = activationFeature; + } + + public ResourceMVO intent(IntentRefMVO intent) { + this.intent = intent; + return this; + } + + /** + * Get intent + * @return intent + */ + @Valid + @Schema(name = "intent", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("intent") + public IntentRefMVO getIntent() { + return intent; + } + + public void setIntent(IntentRefMVO intent) { + this.intent = intent; + } + + public ResourceMVO externalIdentifier(List<ExternalIdentifierMVO> externalIdentifier) { + this.externalIdentifier = externalIdentifier; + return this; + } + + public ResourceMVO addExternalIdentifierItem(ExternalIdentifierMVO externalIdentifierItem) { + if (this.externalIdentifier == null) { + this.externalIdentifier = new ArrayList<>(); + } + this.externalIdentifier.add(externalIdentifierItem); + return this; + } + + /** + * An identification of this resource that is owned by or originates in a software system different from the current system. The structure identifies the system itself, the nature of the resource within the system and the unique ID of the resource within the system. It is anticipated that multiple external IDs can be held for a single resource, e.g. if the resource passed through multiple systems on the way to the current system. + * @return externalIdentifier + */ + @Valid + @Schema(name = "externalIdentifier", description = "An identification of this resource that is owned by or originates in a software system different from the current system. The structure identifies the system itself, the nature of the resource within the system and the unique ID of the resource within the system. It is anticipated that multiple external IDs can be held for a single resource, e.g. if the resource passed through multiple systems on the way to the current system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("externalIdentifier") + public List<ExternalIdentifierMVO> getExternalIdentifier() { + return externalIdentifier; + } + + public void setExternalIdentifier(List<ExternalIdentifierMVO> externalIdentifier) { + this.externalIdentifier = externalIdentifier; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceMVO resourceMVO = (ResourceMVO) o; + return Objects.equals(this.type, resourceMVO.type) && + Objects.equals(this.baseType, resourceMVO.baseType) && + Objects.equals(this.schemaLocation, resourceMVO.schemaLocation) && + Objects.equals(this.href, resourceMVO.href) && + Objects.equals(this.uuid, resourceMVO.uuid) && + Objects.equals(this.category, resourceMVO.category) && + Objects.equals(this.description, resourceMVO.description) && + Objects.equals(this.name, resourceMVO.name) && + Objects.equals(this.endOperatingDate, resourceMVO.endOperatingDate) && + Objects.equals(this.administrativeState, resourceMVO.administrativeState) && + Objects.equals(this.operationalState, resourceMVO.operationalState) && + Objects.equals(this.resourceStatus, resourceMVO.resourceStatus) && + Objects.equals(this.usageState, resourceMVO.usageState) && + Objects.equals(this.validFor, resourceMVO.validFor) && + Objects.equals(this.note, resourceMVO.note) && + Objects.equals(this.resourceOrderItem, resourceMVO.resourceOrderItem) && + Objects.equals(this.place, resourceMVO.place) && + Objects.equals(this.relatedParty, resourceMVO.relatedParty) && + Objects.equals(this.resourceRelationship, resourceMVO.resourceRelationship) && + Objects.equals(this.resourceCharacteristic, resourceMVO.resourceCharacteristic) && + Objects.equals(this.attachment, resourceMVO.attachment) && + Objects.equals(this.resourceSpecification, resourceMVO.resourceSpecification) && + Objects.equals(this.startOperatingDate, resourceMVO.startOperatingDate) && + Objects.equals(this.resourceVersion, resourceMVO.resourceVersion) && + Objects.equals(this.activationFeature, resourceMVO.activationFeature) && + Objects.equals(this.intent, resourceMVO.intent) && + Objects.equals(this.externalIdentifier, resourceMVO.externalIdentifier); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, category, description, name, endOperatingDate, administrativeState, operationalState, resourceStatus, usageState, validFor, note, resourceOrderItem, place, relatedParty, resourceRelationship, resourceCharacteristic, attachment, resourceSpecification, startOperatingDate, resourceVersion, activationFeature, intent, externalIdentifier); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceMVO {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" endOperatingDate: ").append(toIndentedString(endOperatingDate)).append("\n"); + sb.append(" administrativeState: ").append(toIndentedString(administrativeState)).append("\n"); + sb.append(" operationalState: ").append(toIndentedString(operationalState)).append("\n"); + sb.append(" resourceStatus: ").append(toIndentedString(resourceStatus)).append("\n"); + sb.append(" usageState: ").append(toIndentedString(usageState)).append("\n"); + sb.append(" validFor: ").append(toIndentedString(validFor)).append("\n"); + sb.append(" note: ").append(toIndentedString(note)).append("\n"); + sb.append(" resourceOrderItem: ").append(toIndentedString(resourceOrderItem)).append("\n"); + sb.append(" place: ").append(toIndentedString(place)).append("\n"); + sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); + sb.append(" resourceRelationship: ").append(toIndentedString(resourceRelationship)).append("\n"); + sb.append(" resourceCharacteristic: ").append(toIndentedString(resourceCharacteristic)).append("\n"); + sb.append(" attachment: ").append(toIndentedString(attachment)).append("\n"); + sb.append(" resourceSpecification: ").append(toIndentedString(resourceSpecification)).append("\n"); + sb.append(" startOperatingDate: ").append(toIndentedString(startOperatingDate)).append("\n"); + sb.append(" resourceVersion: ").append(toIndentedString(resourceVersion)).append("\n"); + sb.append(" activationFeature: ").append(toIndentedString(activationFeature)).append("\n"); + sb.append(" intent: ").append(toIndentedString(intent)).append("\n"); + sb.append(" externalIdentifier: ").append(toIndentedString(externalIdentifier)).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/pm628/model/ResourceRef.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRef.java new file mode 100644 index 0000000000000000000000000000000000000000..506214892aa786b2deea608897e7357ac27bf2b3 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRef.java @@ -0,0 +1,105 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * Resource reference, for when Resource is used by other entities. + */ + +@Schema(name = "ResourceRef", description = "Resource reference, for when Resource is used by other entities.") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_ResourceRef") +public class ResourceRef extends BaseRootNamedEntity implements ResourceRefOrValue { + + @JsonProperty("@referredType") + private String referredType; + + public ResourceRef() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ResourceRef(String type, String uuid) { + this.type = type; + this.uuid = uuid; + } + + public ResourceRef referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceRef resourceRef = (ResourceRef) o; + return Objects.equals(this.type, resourceRef.type) && + Objects.equals(this.baseType, resourceRef.baseType) && + Objects.equals(this.schemaLocation, resourceRef.schemaLocation) && + Objects.equals(this.href, resourceRef.href) && + Objects.equals(this.uuid, resourceRef.uuid) && + Objects.equals(this.name, resourceRef.name) && + Objects.equals(this.referredType, resourceRef.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceRef {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).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/pm628/model/ResourceRefFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..660e50bfb39b12baef42c8ff675a67b49a407611 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefFVO.java @@ -0,0 +1,240 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * Resource reference, for when Resource is used by other entities. + */ + +@Schema(name = "ResourceRef_FVO", description = "Resource reference, for when Resource is used by other entities.") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ResourceRefFVO implements ResourceRefOrValueFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + public ResourceRefFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ResourceRefFVO(String type) { + this.type = type; + } + + public ResourceRefFVO type(String type) { + this.type = type; + 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 getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ResourceRefFVO baseType(String baseType) { + this.baseType = baseType; + 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 getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ResourceRefFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + 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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ResourceRefFVO 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 ResourceRefFVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "uuid", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public ResourceRefFVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ResourceRefFVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceRefFVO resourceRefFVO = (ResourceRefFVO) o; + return Objects.equals(this.type, resourceRefFVO.type) && + Objects.equals(this.baseType, resourceRefFVO.baseType) && + Objects.equals(this.schemaLocation, resourceRefFVO.schemaLocation) && + Objects.equals(this.href, resourceRefFVO.href) && + Objects.equals(this.uuid, resourceRefFVO.uuid) && + Objects.equals(this.name, resourceRefFVO.name) && + Objects.equals(this.referredType, resourceRefFVO.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceRefFVO {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).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/pm628/model/ResourceRefMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..a826aa4767fe762c1da7d1c3acee4fb315933152 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefMVO.java @@ -0,0 +1,240 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * Resource reference, for when Resource is used by other entities. + */ + +@Schema(name = "ResourceRef_MVO", description = "Resource reference, for when Resource is used by other entities.") + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ResourceRefMVO implements ResourceRefOrValueMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + public ResourceRefMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ResourceRefMVO(String type) { + this.type = type; + } + + public ResourceRefMVO type(String type) { + this.type = type; + 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 getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ResourceRefMVO baseType(String baseType) { + this.baseType = baseType; + 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 getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ResourceRefMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + 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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ResourceRefMVO 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 ResourceRefMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * The identifier of the referred entity. + * @return id + */ + + @Schema(name = "uuid", description = "The identifier of the referred entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public ResourceRefMVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ResourceRefMVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceRefMVO resourceRefMVO = (ResourceRefMVO) o; + return Objects.equals(this.type, resourceRefMVO.type) && + Objects.equals(this.baseType, resourceRefMVO.baseType) && + Objects.equals(this.schemaLocation, resourceRefMVO.schemaLocation) && + Objects.equals(this.href, resourceRefMVO.href) && + Objects.equals(this.uuid, resourceRefMVO.uuid) && + Objects.equals(this.name, resourceRefMVO.name) && + Objects.equals(this.referredType, resourceRefMVO.referredType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, uuid, name, referredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceRefMVO {\n"); + sb.append(" atType: ").append(toIndentedString(type)).append("\n"); + sb.append(" atBaseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" atSchemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).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/pm628/model/ResourceRefOrValue.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefOrValue.java new file mode 100644 index 0000000000000000000000000000000000000000..20a1c9cbfa30818c879617427139e942160e11fc --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefOrValue.java @@ -0,0 +1,26 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import javax.annotation.Generated; + + +@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 = DataAccessEndpoint.class, name = "DataAccessEndpoint"), + @JsonSubTypes.Type(value = LogicalResource.class, name = "LogicalResource"), + @JsonSubTypes.Type(value = Resource.class, name = "Resource"), + @JsonSubTypes.Type(value = ResourceRef.class, name = "ResourceRef") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface ResourceRefOrValue { + public String getType(); + public void setType(String type); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefOrValueFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefOrValueFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..81c5285652ce903abff49ac527e55d9e2bf1596d --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefOrValueFVO.java @@ -0,0 +1,27 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import javax.annotation.Generated; + + +@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 = DataAccessEndpointFVO.class, name = "DataAccessEndpoint"), + @JsonSubTypes.Type(value = LogicalResourceFVO.class, name = "LogicalResource"), + @JsonSubTypes.Type(value = ResourceFVO.class, name = "Resource"), + @JsonSubTypes.Type(value = ResourceRefFVO.class, name = "ResourceRef"), + @JsonSubTypes.Type(value = ResourceRefFVO.class, name = "ResourceRef_FVO"), + @JsonSubTypes.Type(value = ResourceFVO.class, name = "Resource_FVO") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface ResourceRefOrValueFVO { + public String getType(); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefOrValueMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefOrValueMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..2eeee00af27e7d0a6e0f5e4fde030482c4120a41 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefOrValueMVO.java @@ -0,0 +1,28 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +import javax.annotation.Generated; + + +@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 = DataAccessEndpointMVO.class, name = "DataAccessEndpoint"), + @JsonSubTypes.Type(value = LogicalResourceMVO.class, name = "LogicalResource"), + @JsonSubTypes.Type(value = ResourceMVO.class, name = "Resource"), + @JsonSubTypes.Type(value = ResourceRefMVO.class, name = "ResourceRef"), + @JsonSubTypes.Type(value = ResourceRefMVO.class, name = "ResourceRef_MVO"), + @JsonSubTypes.Type(value = ResourceMVO.class, name = "Resource_MVO") +}) + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public interface ResourceRefOrValueMVO { + public String getType(); + public void setType(String type); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefOrValueMapper.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefOrValueMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..5b6ca64d15e1afc0cd9c725f9c4ba9e769b7e3a3 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRefOrValueMapper.java @@ -0,0 +1,23 @@ +package org.etsi.osl.tmf.pm628.model; + +import org.mapstruct.*; + +@Mapper( + nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT, + nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS, + subclassExhaustiveStrategy = SubclassExhaustiveStrategy.RUNTIME_EXCEPTION, + uses = {PartyRefOrPartyRoleRefMapper.class}) +public interface ResourceRefOrValueMapper { + + @SubclassMapping(source = DataAccessEndpointFVO.class, target = DataAccessEndpoint.class) + @SubclassMapping(source = LogicalResourceFVO.class, target = LogicalResource.class) + @SubclassMapping(source = ResourceFVO.class, target = Resource.class) + @SubclassMapping(source = ResourceRefFVO.class, target = ResourceRef.class) + ResourceRefOrValue map(ResourceRefOrValueFVO source); + + @SubclassMapping(source = DataAccessEndpointMVO.class, target = DataAccessEndpoint.class) + @SubclassMapping(source = LogicalResourceMVO.class, target = LogicalResource.class) + @SubclassMapping(source = ResourceMVO.class, target = Resource.class) + @SubclassMapping(source = ResourceRefMVO.class, target = ResourceRef.class) + ResourceRefOrValue map(ResourceRefOrValueMVO source); +} diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRelationship.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRelationship.java new file mode 100644 index 0000000000000000000000000000000000000000..a82363a1fbcdfdc34d3a956325359c6dc17b0ed1 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRelationship.java @@ -0,0 +1,242 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.*; +import jakarta.persistence.Entity; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.hibernate.annotations.Any; +import org.hibernate.annotations.AnyDiscriminator; +import org.hibernate.annotations.AnyDiscriminatorValue; +import org.hibernate.annotations.AnyKeyJavaClass; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * ResourceRelationship + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_ResourceRel") +public class ResourceRelationship extends BaseRootEntity { + + @JsonProperty("resourceRelationshipCharacteristic") + @Valid + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_resource_rel_res_rel_char", + joinColumns = @JoinColumn(name = "resource_rel_uuid"), + inverseJoinColumns = @JoinColumn(name = "res_rel_char_uuid") + ) + private List<Characteristic> resourceRelationshipCharacteristic = new ArrayList<>(); + + @JsonProperty("resource") + @Any + @AnyDiscriminator(DiscriminatorType.STRING) + @AnyDiscriminatorValue(discriminator = "dae", entity = DataAccessEndpoint.class) + @AnyDiscriminatorValue(discriminator = "lr", entity = LogicalResource.class) + @AnyDiscriminatorValue(discriminator = "r", entity = Resource.class) + @AnyDiscriminatorValue(discriminator = "rr", entity = ResourceRef.class) + @AnyKeyJavaClass(String.class) + @Column(name = "resource_type") + @JoinColumn(name = "resource_id") + private ResourceRefOrValue resource; + + @JsonProperty("relationshipType") + private String relationshipType; + + public ResourceRelationship() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ResourceRelationship(String type) { + this.type = type; + } + + public ResourceRelationship type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ResourceRelationship baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ResourceRelationship schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ResourceRelationship resourceRelationshipCharacteristic(List<Characteristic> resourceRelationshipCharacteristic) { + this.resourceRelationshipCharacteristic = resourceRelationshipCharacteristic; + return this; + } + + public ResourceRelationship addResourceRelationshipCharacteristicItem(Characteristic resourceRelationshipCharacteristicItem) { + if (this.resourceRelationshipCharacteristic == null) { + this.resourceRelationshipCharacteristic = new ArrayList<>(); + } + this.resourceRelationshipCharacteristic.add(resourceRelationshipCharacteristicItem); + return this; + } + + /** + * Get resourceRelationshipCharacteristic + * @return resourceRelationshipCharacteristic + */ + @Valid + @Schema(name = "resourceRelationshipCharacteristic", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceRelationshipCharacteristic") + public List<Characteristic> getResourceRelationshipCharacteristic() { + return resourceRelationshipCharacteristic; + } + + public void setResourceRelationshipCharacteristic(List<Characteristic> resourceRelationshipCharacteristic) { + this.resourceRelationshipCharacteristic = resourceRelationshipCharacteristic; + } + + public ResourceRelationship resource(ResourceRefOrValue resource) { + this.resource = resource; + return this; + } + + /** + * Get resource + * @return resource + */ + @Valid + @Schema(name = "resource", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resource") + public ResourceRefOrValue getResource() { + return resource; + } + + public void setResource(ResourceRefOrValue resource) { + this.resource = resource; + } + + public ResourceRelationship relationshipType(String relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + /** + * Type of the resource relationship, such as [bundled] if the resource is a bundle and you want to describe the bundled resources inside this bundle; [reliesOn] if the resource needs another already owned resource to rely on (eg: an option on an already owned mobile access resource) [targets] or [isTargeted] (depending on the way of expressing the link) for any other kind of links that may be useful + * @return relationshipType + */ + + @Schema(name = "relationshipType", description = "Type of the resource relationship, such as [bundled] if the resource is a bundle and you want to describe the bundled resources inside this bundle; [reliesOn] if the resource needs another already owned resource to rely on (eg: an option on an already owned mobile access resource) [targets] or [isTargeted] (depending on the way of expressing the link) for any other kind of links that may be useful", requiredMode = Schema.RequiredMode.NOT_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; + } + ResourceRelationship resourceRelationship = (ResourceRelationship) o; + return Objects.equals(this.type, resourceRelationship.type) && + Objects.equals(this.baseType, resourceRelationship.baseType) && + Objects.equals(this.schemaLocation, resourceRelationship.schemaLocation) && + Objects.equals(this.uuid, resourceRelationship.uuid) && + Objects.equals(this.resourceRelationshipCharacteristic, resourceRelationship.resourceRelationshipCharacteristic) && + Objects.equals(this.resource, resourceRelationship.resource) && + Objects.equals(this.relationshipType, resourceRelationship.relationshipType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, uuid, resourceRelationshipCharacteristic, resource, relationshipType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceRelationship {\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(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" resourceRelationshipCharacteristic: ").append(toIndentedString(resourceRelationshipCharacteristic)).append("\n"); + sb.append(" resource: ").append(toIndentedString(resource)).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/pm628/model/ResourceRelationshipFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRelationshipFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..5421fd4b8d33c2d2c0b3cf1c5a9d00d5212941fa --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRelationshipFVO.java @@ -0,0 +1,228 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * ResourceRelationshipFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ResourceRelationshipFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("resourceRelationshipCharacteristic") + @Valid + private List<CharacteristicFVO> resourceRelationshipCharacteristic = new ArrayList<>(); + + @JsonProperty("resource") + private ResourceRefOrValueFVO resource; + + @JsonProperty("relationshipType") + private String relationshipType; + + public ResourceRelationshipFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ResourceRelationshipFVO(String type, ResourceRefOrValueFVO resource, String relationshipType) { + this.type = type; + this.resource = resource; + this.relationshipType = relationshipType; + } + + public ResourceRelationshipFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ResourceRelationshipFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ResourceRelationshipFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ResourceRelationshipFVO resourceRelationshipCharacteristic(List<CharacteristicFVO> resourceRelationshipCharacteristic) { + this.resourceRelationshipCharacteristic = resourceRelationshipCharacteristic; + return this; + } + + public ResourceRelationshipFVO addResourceRelationshipCharacteristicItem(CharacteristicFVO resourceRelationshipCharacteristicItem) { + if (this.resourceRelationshipCharacteristic == null) { + this.resourceRelationshipCharacteristic = new ArrayList<>(); + } + this.resourceRelationshipCharacteristic.add(resourceRelationshipCharacteristicItem); + return this; + } + + /** + * Get resourceRelationshipCharacteristic + * @return resourceRelationshipCharacteristic + */ + @Valid + @Schema(name = "resourceRelationshipCharacteristic", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceRelationshipCharacteristic") + public List<CharacteristicFVO> getResourceRelationshipCharacteristic() { + return resourceRelationshipCharacteristic; + } + + public void setResourceRelationshipCharacteristic(List<CharacteristicFVO> resourceRelationshipCharacteristic) { + this.resourceRelationshipCharacteristic = resourceRelationshipCharacteristic; + } + + public ResourceRelationshipFVO resource(ResourceRefOrValueFVO resource) { + this.resource = resource; + return this; + } + + /** + * Get resource + * @return resource + */ + @NotNull @Valid + @Schema(name = "resource", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("resource") + public ResourceRefOrValueFVO getResource() { + return resource; + } + + public void setResource(ResourceRefOrValueFVO resource) { + this.resource = resource; + } + + public ResourceRelationshipFVO relationshipType(String relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + /** + * Type of the resource relationship, such as [bundled] if the resource is a bundle and you want to describe the bundled resources inside this bundle; [reliesOn] if the resource needs another already owned resource to rely on (eg: an option on an already owned mobile access resource) [targets] or [isTargeted] (depending on the way of expressing the link) for any other kind of links that may be useful + * @return relationshipType + */ + @NotNull + @Schema(name = "relationshipType", description = "Type of the resource relationship, such as [bundled] if the resource is a bundle and you want to describe the bundled resources inside this bundle; [reliesOn] if the resource needs another already owned resource to rely on (eg: an option on an already owned mobile access resource) [targets] or [isTargeted] (depending on the way of expressing the link) for any other kind of links that may be useful", 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; + } + ResourceRelationshipFVO resourceRelationshipFVO = (ResourceRelationshipFVO) o; + return Objects.equals(this.type, resourceRelationshipFVO.type) && + Objects.equals(this.baseType, resourceRelationshipFVO.baseType) && + Objects.equals(this.schemaLocation, resourceRelationshipFVO.schemaLocation) && + Objects.equals(this.resourceRelationshipCharacteristic, resourceRelationshipFVO.resourceRelationshipCharacteristic) && + Objects.equals(this.resource, resourceRelationshipFVO.resource) && + Objects.equals(this.relationshipType, resourceRelationshipFVO.relationshipType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, resourceRelationshipCharacteristic, resource, relationshipType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceRelationshipFVO {\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(" resourceRelationshipCharacteristic: ").append(toIndentedString(resourceRelationshipCharacteristic)).append("\n"); + sb.append(" resource: ").append(toIndentedString(resource)).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/pm628/model/ResourceRelationshipMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRelationshipMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..0c876f7711521fb3086a8a7a6fe55e3c53ed4315 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceRelationshipMVO.java @@ -0,0 +1,253 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * ResourceRelationshipMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ResourceRelationshipMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("resourceRelationshipCharacteristic") + @Valid + private List<CharacteristicMVO> resourceRelationshipCharacteristic = new ArrayList<>(); + + @JsonProperty("resource") + private ResourceRefOrValueMVO resource; + + @JsonProperty("relationshipType") + private String relationshipType; + + public ResourceRelationshipMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ResourceRelationshipMVO(String type, ResourceRefOrValueMVO resource, String relationshipType) { + this.type = type; + this.resource = resource; + this.relationshipType = relationshipType; + } + + public ResourceRelationshipMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ResourceRelationshipMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ResourceRelationshipMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ResourceRelationshipMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Unique identifier of the characteristic + * @return id + */ + + @Schema(name = "uuid", description = "Unique identifier of the characteristic", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public ResourceRelationshipMVO resourceRelationshipCharacteristic(List<CharacteristicMVO> resourceRelationshipCharacteristic) { + this.resourceRelationshipCharacteristic = resourceRelationshipCharacteristic; + return this; + } + + public ResourceRelationshipMVO addResourceRelationshipCharacteristicItem(CharacteristicMVO resourceRelationshipCharacteristicItem) { + if (this.resourceRelationshipCharacteristic == null) { + this.resourceRelationshipCharacteristic = new ArrayList<>(); + } + this.resourceRelationshipCharacteristic.add(resourceRelationshipCharacteristicItem); + return this; + } + + /** + * Get resourceRelationshipCharacteristic + * @return resourceRelationshipCharacteristic + */ + @Valid + @Schema(name = "resourceRelationshipCharacteristic", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("resourceRelationshipCharacteristic") + public List<CharacteristicMVO> getResourceRelationshipCharacteristic() { + return resourceRelationshipCharacteristic; + } + + public void setResourceRelationshipCharacteristic(List<CharacteristicMVO> resourceRelationshipCharacteristic) { + this.resourceRelationshipCharacteristic = resourceRelationshipCharacteristic; + } + + public ResourceRelationshipMVO resource(ResourceRefOrValueMVO resource) { + this.resource = resource; + return this; + } + + /** + * Get resource + * @return resource + */ + @NotNull @Valid + @Schema(name = "resource", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("resource") + public ResourceRefOrValueMVO getResource() { + return resource; + } + + public void setResource(ResourceRefOrValueMVO resource) { + this.resource = resource; + } + + public ResourceRelationshipMVO relationshipType(String relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + /** + * Type of the resource relationship, such as [bundled] if the resource is a bundle and you want to describe the bundled resources inside this bundle; [reliesOn] if the resource needs another already owned resource to rely on (eg: an option on an already owned mobile access resource) [targets] or [isTargeted] (depending on the way of expressing the link) for any other kind of links that may be useful + * @return relationshipType + */ + @NotNull + @Schema(name = "relationshipType", description = "Type of the resource relationship, such as [bundled] if the resource is a bundle and you want to describe the bundled resources inside this bundle; [reliesOn] if the resource needs another already owned resource to rely on (eg: an option on an already owned mobile access resource) [targets] or [isTargeted] (depending on the way of expressing the link) for any other kind of links that may be useful", 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; + } + ResourceRelationshipMVO resourceRelationshipMVO = (ResourceRelationshipMVO) o; + return Objects.equals(this.type, resourceRelationshipMVO.type) && + Objects.equals(this.baseType, resourceRelationshipMVO.baseType) && + Objects.equals(this.schemaLocation, resourceRelationshipMVO.schemaLocation) && + Objects.equals(this.uuid, resourceRelationshipMVO.uuid) && + Objects.equals(this.resourceRelationshipCharacteristic, resourceRelationshipMVO.resourceRelationshipCharacteristic) && + Objects.equals(this.resource, resourceRelationshipMVO.resource) && + Objects.equals(this.relationshipType, resourceRelationshipMVO.relationshipType); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, uuid, resourceRelationshipCharacteristic, resource, relationshipType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceRelationshipMVO {\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(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" resourceRelationshipCharacteristic: ").append(toIndentedString(resourceRelationshipCharacteristic)).append("\n"); + sb.append(" resource: ").append(toIndentedString(resource)).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/pm628/model/ResourceSpecificationRefFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceSpecificationRefFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..e4feb9455b77bbfbce70cd1c7dd9467e4985c76e --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceSpecificationRefFVO.java @@ -0,0 +1,264 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * ResourceSpecificationRefFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ResourceSpecificationRefFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("version") + private String version; + + public ResourceSpecificationRefFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ResourceSpecificationRefFVO(String type) { + this.type = type; + } + + public ResourceSpecificationRefFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ResourceSpecificationRefFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ResourceSpecificationRefFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ResourceSpecificationRefFVO 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 ResourceSpecificationRefFVO id(String id) { + this.id = id; + return this; + } + + /** + * unique identifier + * @return id + */ + + @Schema(name = "id", description = "unique identifier", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ResourceSpecificationRefFVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ResourceSpecificationRefFVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public ResourceSpecificationRefFVO version(String version) { + this.version = version; + return this; + } + + /** + * Resource Specification version + * @return version + */ + + @Schema(name = "version", description = "Resource Specification version", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("version") + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceSpecificationRefFVO resourceSpecificationRefFVO = (ResourceSpecificationRefFVO) o; + return Objects.equals(this.type, resourceSpecificationRefFVO.type) && + Objects.equals(this.baseType, resourceSpecificationRefFVO.baseType) && + Objects.equals(this.schemaLocation, resourceSpecificationRefFVO.schemaLocation) && + Objects.equals(this.href, resourceSpecificationRefFVO.href) && + Objects.equals(this.id, resourceSpecificationRefFVO.id) && + Objects.equals(this.name, resourceSpecificationRefFVO.name) && + Objects.equals(this.referredType, resourceSpecificationRefFVO.referredType) && + Objects.equals(this.version, resourceSpecificationRefFVO.version); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, name, referredType, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceSpecificationRefFVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/pm628/model/ResourceSpecificationRefMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceSpecificationRefMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..4a562330e492106897d1c28ff37f1235b8ea99f1 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceSpecificationRefMVO.java @@ -0,0 +1,264 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; + +import javax.annotation.Generated; +import java.util.Objects; + +/** + * ResourceSpecificationRefMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ResourceSpecificationRefMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + private String href; + + @JsonProperty("id") + private String id; + + @JsonProperty("name") + private String name; + + @JsonProperty("@referredType") + private String referredType; + + @JsonProperty("version") + private String version; + + public ResourceSpecificationRefMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ResourceSpecificationRefMVO(String type) { + this.type = type; + } + + public ResourceSpecificationRefMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ResourceSpecificationRefMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ResourceSpecificationRefMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ResourceSpecificationRefMVO 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 ResourceSpecificationRefMVO id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the referred entity. + * @return id + */ + + @Schema(name = "id", description = "The identifier of the referred entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ResourceSpecificationRefMVO 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) + @JsonProperty("name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ResourceSpecificationRefMVO referredType(String referredType) { + this.referredType = referredType; + return this; + } + + /** + * The actual type of the target instance when needed for disambiguation. + * @return referredType + */ + + @Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@referredType") + public String getReferredType() { + return referredType; + } + + public void setReferredType(String referredType) { + this.referredType = referredType; + } + + public ResourceSpecificationRefMVO version(String version) { + this.version = version; + return this; + } + + /** + * Resource Specification version + * @return version + */ + + @Schema(name = "version", description = "Resource Specification version", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("version") + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceSpecificationRefMVO resourceSpecificationRefMVO = (ResourceSpecificationRefMVO) o; + return Objects.equals(this.type, resourceSpecificationRefMVO.type) && + Objects.equals(this.baseType, resourceSpecificationRefMVO.baseType) && + Objects.equals(this.schemaLocation, resourceSpecificationRefMVO.schemaLocation) && + Objects.equals(this.href, resourceSpecificationRefMVO.href) && + Objects.equals(this.id, resourceSpecificationRefMVO.id) && + Objects.equals(this.name, resourceSpecificationRefMVO.name) && + Objects.equals(this.referredType, resourceSpecificationRefMVO.referredType) && + Objects.equals(this.version, resourceSpecificationRefMVO.version); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, href, id, name, referredType, version); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResourceSpecificationRefMVO {\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(" href: ").append(toIndentedString(href)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" referredType: ").append(toIndentedString(referredType)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/pm628/model/ResourceStatusType.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceStatusType.java new file mode 100644 index 0000000000000000000000000000000000000000..4924c3d5bfc50f380c18c59c4a39e8f909fa8e8a --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ResourceStatusType.java @@ -0,0 +1,61 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import javax.annotation.Generated; + +/** + * ResourceStatusType enumerations + */ + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public enum ResourceStatusType { + + ALARM("alarm"), + + AVAILABLE("available"), + + INSTALLED("installed"), + + NOT_EXISTS("not exists"), + + PENDINGREMOVAL("pendingRemoval"), + + PLANNED("planned"), + + RESERVED("reserved"), + + STANDBY("standby"), + + SUSPENDED("suspended"), + + UNKNOWN("unknown"); + + private String value; + + ResourceStatusType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ResourceStatusType fromValue(String value) { + for (ResourceStatusType b : ResourceStatusType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/src/main/java/org/etsi/osl/tmf/pm628/model/ScheduleDefinition.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ScheduleDefinition.java new file mode 100644 index 0000000000000000000000000000000000000000..cb8ede20f185391b412c7859b00f3258d3b7f28a --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ScheduleDefinition.java @@ -0,0 +1,442 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.*; +import jakarta.validation.Valid; +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.time.format.DateTimeParseException; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * ScheduleDefinition + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_SchedDef") +public class ScheduleDefinition extends BaseRootEntity { + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime scheduleDefinitionStartTime; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime scheduleDefinitionEndTime; + + @JsonProperty("recurringFrequency") + private String recurringFrequency; + + @Valid + private List<OffsetDateTime> excludedDate = new ArrayList<>(); + + @JsonProperty("scheduleDefinitionHourRange") + private String scheduleDefinitionHourRange; + + @JsonProperty("WeeklyScheduledDefinition") + @Valid + @ElementCollection(targetClass = DayOfWeekRecurrence.class) + @CollectionTable( + name = "pm628_sched_def_wsd", + joinColumns = @JoinColumn(name = "sched_def_uuid") + ) + private List<DayOfWeekRecurrence> weeklyScheduledDefinition = new ArrayList<>(); + + @Valid + private List<OffsetDateTime> monthlyScheduleDayOfMonthDefinition = new ArrayList<>(); + + @JsonProperty("MonthlyScheduleDayOfWeekDefinition") + @Embedded + private MonthlyScheduleDayOfWeekDefinition monthlyScheduleDayOfWeekDefinition; + + @Valid + private List<OffsetDateTime> dateScheduleDefintion = new ArrayList<>(); + + public ScheduleDefinition() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ScheduleDefinition(String type) { + this.type = type; + } + + public ScheduleDefinition scheduleDefinitionStartTime(OffsetDateTime scheduleDefinitionStartTime) { + this.scheduleDefinitionStartTime = scheduleDefinitionStartTime; + return this; + } + + /** + * The Start time of the Schedule Definition + * @return scheduleDefinitionStartTime + */ + @Valid + @Schema(name = "scheduleDefinitionStartTime", description = "The Start time of the Schedule Definition", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public OffsetDateTime getScheduleDefinitionStartTime() { + return scheduleDefinitionStartTime; + } + + @JsonProperty("scheduleDefinitionStartTime") + public String getScheduleDefinitionStartTimeString() { + return scheduleDefinitionStartTime.toString(); + } + + + public void setScheduleDefinitionStartTime(String t) { + if ( t!= null ) { + this.scheduleDefinitionStartTime = OffsetDateTime.parse( t ); + } + } + + public void setScheduleDefinitionStartTime(OffsetDateTime scheduleDefinitionStartTime) { + this.scheduleDefinitionStartTime = scheduleDefinitionStartTime; + } + + public ScheduleDefinition scheduleDefinitionEndTime(OffsetDateTime scheduleDefinitionEndTime) { + this.scheduleDefinitionEndTime = scheduleDefinitionEndTime; + return this; + } + + /** + * The End time of the Schedule Definition. If the attribute is empty the Schedule run forever, not having a time constraint. + * @return scheduleDefinitionEndTime + */ + @Valid + @Schema(name = "scheduleDefinitionEndTime", description = "The End time of the Schedule Definition. If the attribute is empty the Schedule run forever, not having a time constraint.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public OffsetDateTime getScheduleDefinitionEndTime() { + return scheduleDefinitionEndTime; + } + + @JsonProperty("scheduleDefinitionEndTime") + public String getScheduleDefinitionEndTimeString() { + return scheduleDefinitionEndTime.toString(); + } + + public void setScheduleDefinitionEndTime(String t) { + if ( t!= null ) { + this.scheduleDefinitionEndTime = OffsetDateTime.parse( t ); + } +} + + public void setScheduleDefinitionEndTime(OffsetDateTime scheduleDefinitionEndTime) { + this.scheduleDefinitionEndTime = scheduleDefinitionEndTime; + } + + public ScheduleDefinition recurringFrequency(String recurringFrequency) { + this.recurringFrequency = recurringFrequency; + return this; + } + + /** + * A recurring frequency to run a job within day that is included in schedule definition, for example: every 5 minutes, 15 minute, 30 minutes, 1 hour + * @return recurringFrequency + */ + + @Schema(name = "recurringFrequency", description = "A recurring frequency to run a job within day that is included in schedule definition, for example: every 5 minutes, 15 minute, 30 minutes, 1 hour", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("recurringFrequency") + public String getRecurringFrequency() { + return recurringFrequency; + } + + public void setRecurringFrequency(String recurringFrequency) { + this.recurringFrequency = recurringFrequency; + } + + public ScheduleDefinition excludedDate(List<OffsetDateTime> excludedDate) { + this.excludedDate = excludedDate; + return this; + } + + public ScheduleDefinition addExcludedDateItem(OffsetDateTime excludedDateItem) { + if (this.excludedDate == null) { + this.excludedDate = new ArrayList<>(); + } + this.excludedDate.add(excludedDateItem); + return this; + } + + /** + * A list of specific dates that should be excluded from the Schedule Definition. + * @return excludedDate + */ + @Valid + @Schema(name = "excludedDate", description = "A list of specific dates that should be excluded from the Schedule Definition.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public List<OffsetDateTime> getExcludedDate() { + return excludedDate; + + } + + @JsonProperty("excludedDate") + public List<String> getExcludedDateString() { + // Transforming List<OffsetDateTime> to List<String> + List<String> stringList = excludedDate.stream() + .map(OffsetDateTime::toString) + .collect(Collectors.toList()); + return stringList; + } + + public void setExcludedDate(List<OffsetDateTime> excludedDate) { + this.excludedDate = excludedDate; + } + + @JsonProperty("excludedDate") + public void setExcludedDateString(List<String> excludedDate) { + this.excludedDate = excludedDate.stream() + .map(date -> { + try { + return OffsetDateTime.parse(date); + } catch (DateTimeParseException e) { + // Handle parse exception + System.err.println("Invalid date format: " + date); + return null; // or handle it as per your requirement + } + }) + .collect(Collectors.toList()); + } + + public ScheduleDefinition scheduleDefinitionHourRange(String scheduleDefinitionHourRange) { + this.scheduleDefinitionHourRange = scheduleDefinitionHourRange; + return this; + } + + /** + * A list of time ranges within a specific day that the schedule will be active on, for example 08:00-12:00, 16:00-19:00. + * @return scheduleDefinitionHourRange + */ + + @Schema(name = "scheduleDefinitionHourRange", description = "A list of time ranges within a specific day that the schedule will be active on, for example 08:00-12:00, 16:00-19:00.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("scheduleDefinitionHourRange") + public String getScheduleDefinitionHourRange() { + return scheduleDefinitionHourRange; + } + + public void setScheduleDefinitionHourRange(String scheduleDefinitionHourRange) { + this.scheduleDefinitionHourRange = scheduleDefinitionHourRange; + } + + public ScheduleDefinition weeklyScheduledDefinition(List<DayOfWeekRecurrence> weeklyScheduledDefinition) { + this.weeklyScheduledDefinition = weeklyScheduledDefinition; + return this; + } + + public ScheduleDefinition addWeeklyScheduledDefinitionItem(DayOfWeekRecurrence weeklyScheduledDefinitionItem) { + if (this.weeklyScheduledDefinition == null) { + this.weeklyScheduledDefinition = new ArrayList<>(); + } + this.weeklyScheduledDefinition.add(weeklyScheduledDefinitionItem); + return this; + } + + /** + * The weekly schedule is used to define a schedule that is based on the days of the week, e.g. a schedule that will be active only on Monday and Tuesday. + * @return weeklyScheduledDefinition + */ + @Valid + @Schema(name = "WeeklyScheduledDefinition", description = "The weekly schedule is used to define a schedule that is based on the days of the week, e.g. a schedule that will be active only on Monday and Tuesday.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("WeeklyScheduledDefinition") + public List<DayOfWeekRecurrence> getWeeklyScheduledDefinition() { + return weeklyScheduledDefinition; + } + + public void setWeeklyScheduledDefinition(List<DayOfWeekRecurrence> weeklyScheduledDefinition) { + this.weeklyScheduledDefinition = weeklyScheduledDefinition; + } + + public ScheduleDefinition monthlyScheduleDayOfMonthDefinition(List<OffsetDateTime> monthlyScheduleDayOfMonthDefinition) { + this.monthlyScheduleDayOfMonthDefinition = monthlyScheduleDayOfMonthDefinition; + return this; + } + + public ScheduleDefinition addMonthlyScheduleDayOfMonthDefinitionItem(OffsetDateTime monthlyScheduleDayOfMonthDefinitionItem) { + if (this.monthlyScheduleDayOfMonthDefinition == null) { + this.monthlyScheduleDayOfMonthDefinition = new ArrayList<>(); + } + this.monthlyScheduleDayOfMonthDefinition.add(monthlyScheduleDayOfMonthDefinitionItem); + return this; + } + + /** + * The schedule definition for running the threshold job + * @return monthlyScheduleDayOfMonthDefinition + */ + @Valid + @Schema(name = "monthlyScheduleDayOfMonthDefinition", description = "The schedule definition for running the threshold job", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public List<OffsetDateTime> getMonthlyScheduleDayOfMonthDefinition() { + return monthlyScheduleDayOfMonthDefinition; + } + + @JsonProperty("monthlyScheduleDayOfMonthDefinition") + public List<String> getMonthlyScheduleDayOfMonthDefinitionString() { + // Transforming List<OffsetDateTime> to List<String> + List<String> stringList = monthlyScheduleDayOfMonthDefinition.stream() + .map(OffsetDateTime::toString) + .collect(Collectors.toList()); + return stringList; + } + + public void setMonthlyScheduleDayOfMonthDefinition(List<OffsetDateTime> monthlyScheduleDayOfMonthDefinition) { + this.monthlyScheduleDayOfMonthDefinition = monthlyScheduleDayOfMonthDefinition; + } + + @JsonProperty("monthlyScheduleDayOfMonthDefinition") + public void setMonthlyScheduleDayOfMonthDefinitionString(List<String> monthlyScheduleDayOfMonthDefinition) { + + this.monthlyScheduleDayOfMonthDefinition = monthlyScheduleDayOfMonthDefinition.stream() + .map(date -> { + try { + return OffsetDateTime.parse(date); + } catch (DateTimeParseException e) { + // Handle parse exception + System.err.println("Invalid date format: " + date); + return null; // or handle it as per your requirement + } + }) + .collect(Collectors.toList()); + } + + public ScheduleDefinition monthlyScheduleDayOfWeekDefinition(MonthlyScheduleDayOfWeekDefinition monthlyScheduleDayOfWeekDefinition) { + this.monthlyScheduleDayOfWeekDefinition = monthlyScheduleDayOfWeekDefinition; + return this; + } + + /** + * Get monthlyScheduleDayOfWeekDefinition + * @return monthlyScheduleDayOfWeekDefinition + */ + @Valid + @Schema(name = "MonthlyScheduleDayOfWeekDefinition", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("MonthlyScheduleDayOfWeekDefinition") + public MonthlyScheduleDayOfWeekDefinition getMonthlyScheduleDayOfWeekDefinition() { + return monthlyScheduleDayOfWeekDefinition; + } + + public void setMonthlyScheduleDayOfWeekDefinition(MonthlyScheduleDayOfWeekDefinition monthlyScheduleDayOfWeekDefinition) { + this.monthlyScheduleDayOfWeekDefinition = monthlyScheduleDayOfWeekDefinition; + } + + public ScheduleDefinition dateScheduleDefintion(List<OffsetDateTime> dateScheduleDefintion) { + this.dateScheduleDefintion = dateScheduleDefintion; + return this; + } + + public ScheduleDefinition addDateScheduleDefintionItem(OffsetDateTime dateScheduleDefintionItem) { + if (this.dateScheduleDefintion == null) { + this.dateScheduleDefintion = new ArrayList<>(); + } + this.dateScheduleDefintion.add(dateScheduleDefintionItem); + return this; + } + + /** + * The date schedule is used to define a schedule that is based on specific dates, such as December 31st 2015, February 28th 2013 + * @return dateScheduleDefintion + */ + @Valid + @Schema(name = "dateScheduleDefintion", description = "The date schedule is used to define a schedule that is based on specific dates, such as December 31st 2015, February 28th 2013", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + public List<OffsetDateTime> getDateScheduleDefintion() { + return dateScheduleDefintion; + } + + @JsonProperty("dateScheduleDefintion") + public List<String> getDateScheduleDefintionString() { + List<String> stringList = dateScheduleDefintion.stream() + .map(OffsetDateTime::toString) + .collect(Collectors.toList()); + return stringList; + } + + + public void setDateScheduleDefintion(List<OffsetDateTime> dateScheduleDefintion) { + this.dateScheduleDefintion = dateScheduleDefintion; + } + + @JsonProperty("dateScheduleDefintion") + public void setDateScheduleDefintionString(List<String> dateScheduleDefintion) { + this.dateScheduleDefintion = dateScheduleDefintion.stream() + .map(date -> { + try { + return OffsetDateTime.parse(date); + } catch (DateTimeParseException e) { + // Handle parse exception + System.err.println("Invalid date format: " + date); + return null; // or handle it as per your requirement + } + }) + .collect(Collectors.toList()); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScheduleDefinition scheduleDefinition = (ScheduleDefinition) o; + return Objects.equals(this.type, scheduleDefinition.type) && + Objects.equals(this.baseType, scheduleDefinition.baseType) && + Objects.equals(this.schemaLocation, scheduleDefinition.schemaLocation) && + Objects.equals(this.uuid, scheduleDefinition.uuid) && + Objects.equals(this.scheduleDefinitionStartTime, scheduleDefinition.scheduleDefinitionStartTime) && + Objects.equals(this.scheduleDefinitionEndTime, scheduleDefinition.scheduleDefinitionEndTime) && + Objects.equals(this.recurringFrequency, scheduleDefinition.recurringFrequency) && + Objects.equals(this.excludedDate, scheduleDefinition.excludedDate) && + Objects.equals(this.scheduleDefinitionHourRange, scheduleDefinition.scheduleDefinitionHourRange) && + Objects.equals(this.weeklyScheduledDefinition, scheduleDefinition.weeklyScheduledDefinition) && + Objects.equals(this.monthlyScheduleDayOfMonthDefinition, scheduleDefinition.monthlyScheduleDayOfMonthDefinition) && + Objects.equals(this.monthlyScheduleDayOfWeekDefinition, scheduleDefinition.monthlyScheduleDayOfWeekDefinition) && + Objects.equals(this.dateScheduleDefintion, scheduleDefinition.dateScheduleDefintion); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, uuid, scheduleDefinitionStartTime, scheduleDefinitionEndTime, recurringFrequency, excludedDate, scheduleDefinitionHourRange, weeklyScheduledDefinition, monthlyScheduleDayOfMonthDefinition, monthlyScheduleDayOfWeekDefinition, dateScheduleDefintion); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScheduleDefinition {\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(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" scheduleDefinitionStartTime: ").append(toIndentedString(scheduleDefinitionStartTime)).append("\n"); + sb.append(" scheduleDefinitionEndTime: ").append(toIndentedString(scheduleDefinitionEndTime)).append("\n"); + sb.append(" recurringFrequency: ").append(toIndentedString(recurringFrequency)).append("\n"); + sb.append(" excludedDate: ").append(toIndentedString(excludedDate)).append("\n"); + sb.append(" scheduleDefinitionHourRange: ").append(toIndentedString(scheduleDefinitionHourRange)).append("\n"); + sb.append(" weeklyScheduledDefinition: ").append(toIndentedString(weeklyScheduledDefinition)).append("\n"); + sb.append(" monthlyScheduleDayOfMonthDefinition: ").append(toIndentedString(monthlyScheduleDayOfMonthDefinition)).append("\n"); + sb.append(" monthlyScheduleDayOfWeekDefinition: ").append(toIndentedString(monthlyScheduleDayOfWeekDefinition)).append("\n"); + sb.append(" dateScheduleDefintion: ").append(toIndentedString(dateScheduleDefintion)).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/pm628/model/ScheduleDefinitionFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ScheduleDefinitionFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..8df65f117c28d401ca7c60df7b63752e4cb97573 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ScheduleDefinitionFVO.java @@ -0,0 +1,491 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.time.format.DateTimeParseException; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * ScheduleDefinitionFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ScheduleDefinitionFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime scheduleDefinitionStartTime; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime scheduleDefinitionEndTime; + + @JsonProperty("recurringFrequency") + private String recurringFrequency; + + @Valid + private List<OffsetDateTime> excludedDate = new ArrayList<>(); + + private String scheduleDefinitionHourRange; + + @Valid + private List<DayOfWeekRecurrenceFVO> weeklyScheduledDefinition = new ArrayList<>(); + + @Valid + private List<OffsetDateTime> monthlyScheduleDayOfMonthDefinition = new ArrayList<>(); + + private MonthlyScheduleDayOfWeekDefinitionFVO monthlyScheduleDayOfWeekDefinition; + + @Valid + private List<OffsetDateTime> dateScheduleDefintion = new ArrayList<>(); + + public ScheduleDefinitionFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ScheduleDefinitionFVO(String type) { + this.type = type; + } + + public ScheduleDefinitionFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ScheduleDefinitionFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ScheduleDefinitionFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ScheduleDefinitionFVO scheduleDefinitionStartTime(OffsetDateTime scheduleDefinitionStartTime) { + this.scheduleDefinitionStartTime = scheduleDefinitionStartTime; + return this; + } + + /** + * The Start time of the Schedule Definition + * @return scheduleDefinitionStartTime + */ + @Valid + @Schema(name = "scheduleDefinitionStartTime", description = "The Start time of the Schedule Definition", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @JsonProperty("scheduleDefinitionStartTime") + public String getScheduleDefinitionStartTimeString() { + return scheduleDefinitionStartTime.toString(); + } + + + public void setScheduleDefinitionStartTime(String t) { + if ( t!= null ) { + this.scheduleDefinitionStartTime = OffsetDateTime.parse( t ); + } + } + public OffsetDateTime getScheduleDefinitionStartTime() { + return scheduleDefinitionStartTime; + } + + public void setScheduleDefinitionStartTime(OffsetDateTime scheduleDefinitionStartTime) { + this.scheduleDefinitionStartTime = scheduleDefinitionStartTime; + } + + public ScheduleDefinitionFVO scheduleDefinitionEndTime(OffsetDateTime scheduleDefinitionEndTime) { + this.scheduleDefinitionEndTime = scheduleDefinitionEndTime; + return this; + } + + /** + * The End time of the Schedule Definition. If the attribute is empty the Schedule run forever, not having a time constraint. + * @return scheduleDefinitionEndTime + */ + @Valid + @Schema(name = "scheduleDefinitionEndTime", description = "The End time of the Schedule Definition. If the attribute is empty the Schedule run forever, not having a time constraint.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("scheduleDefinitionEndTime") + public String getScheduleDefinitionEndTimeString() { + return scheduleDefinitionEndTime.toString(); + } + + public void setScheduleDefinitionEndTime(String t) { + if ( t!= null ) { + this.scheduleDefinitionEndTime = OffsetDateTime.parse( t ); + } +} + + public OffsetDateTime getScheduleDefinitionEndTime() { + return scheduleDefinitionEndTime; + } + + public void setScheduleDefinitionEndTime(OffsetDateTime scheduleDefinitionEndTime) { + this.scheduleDefinitionEndTime = scheduleDefinitionEndTime; + } + + public ScheduleDefinitionFVO recurringFrequency(String recurringFrequency) { + this.recurringFrequency = recurringFrequency; + return this; + } + + /** + * A recurring frequency to run a job within day that is included in schedule definition, for example: every 5 minutes, 15 minute, 30 minutes, 1 hour + * @return recurringFrequency + */ + + @Schema(name = "recurringFrequency", description = "A recurring frequency to run a job within day that is included in schedule definition, for example: every 5 minutes, 15 minute, 30 minutes, 1 hour", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("recurringFrequency") + public String getRecurringFrequency() { + return recurringFrequency; + } + + public void setRecurringFrequency(String recurringFrequency) { + this.recurringFrequency = recurringFrequency; + } + + public ScheduleDefinitionFVO excludedDate(List<OffsetDateTime> excludedDate) { + this.excludedDate = excludedDate; + return this; + } + + public ScheduleDefinitionFVO addExcludedDateItem(OffsetDateTime excludedDateItem) { + if (this.excludedDate == null) { + this.excludedDate = new ArrayList<>(); + } + this.excludedDate.add(excludedDateItem); + return this; + } + + /** + * A list of specific dates that should be excluded from the Schedule Definition. + * @return excludedDate + */ + @Valid + @Schema(name = "excludedDate", description = "A list of specific dates that should be excluded from the Schedule Definition.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("excludedDate") + public List<String> getExcludedDateString() { + // Transforming List<OffsetDateTime> to List<String> + List<String> stringList = excludedDate.stream() + .map(OffsetDateTime::toString) + .collect(Collectors.toList()); + return stringList; + } + + + @JsonProperty("excludedDate") + public void setExcludedDateString(List<String> excludedDate) { + this.excludedDate = excludedDate.stream() + .map(date -> { + try { + return OffsetDateTime.parse(date); + } catch (DateTimeParseException e) { + // Handle parse exception + System.err.println("Invalid date format: " + date); + return null; // or handle it as per your requirement + } + }) + .collect(Collectors.toList()); + } + public List<OffsetDateTime> getExcludedDate() { + return excludedDate; + } + + public void setExcludedDate(List<OffsetDateTime> excludedDate) { + this.excludedDate = excludedDate; + } + + public ScheduleDefinitionFVO scheduleDefinitionHourRange(String scheduleDefinitionHourRange) { + this.scheduleDefinitionHourRange = scheduleDefinitionHourRange; + return this; + } + + /** + * A list of time ranges within a specific day that the schedule will be active on, for example 08:00-12:00, 16:00-19:00. + * @return scheduleDefinitionHourRange + */ + + @Schema(name = "scheduleDefinitionHourRange", description = "A list of time ranges within a specific day that the schedule will be active on, for example 08:00-12:00, 16:00-19:00.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("scheduleDefinitionHourRange") + public String getScheduleDefinitionHourRange() { + return scheduleDefinitionHourRange; + } + + public void setScheduleDefinitionHourRange(String scheduleDefinitionHourRange) { + this.scheduleDefinitionHourRange = scheduleDefinitionHourRange; + } + + public ScheduleDefinitionFVO weeklyScheduledDefinition(List<DayOfWeekRecurrenceFVO> weeklyScheduledDefinition) { + this.weeklyScheduledDefinition = weeklyScheduledDefinition; + return this; + } + + public ScheduleDefinitionFVO addWeeklyScheduledDefinitionItem(DayOfWeekRecurrenceFVO weeklyScheduledDefinitionItem) { + if (this.weeklyScheduledDefinition == null) { + this.weeklyScheduledDefinition = new ArrayList<>(); + } + this.weeklyScheduledDefinition.add(weeklyScheduledDefinitionItem); + return this; + } + + /** + * The weekly schedule is used to define a schedule that is based on the days of the week, e.g. a schedule that will be active only on Monday and Tuesday. + * @return weeklyScheduledDefinition + */ + @Valid + @Schema(name = "WeeklyScheduledDefinition", description = "The weekly schedule is used to define a schedule that is based on the days of the week, e.g. a schedule that will be active only on Monday and Tuesday.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("WeeklyScheduledDefinition") + public List<DayOfWeekRecurrenceFVO> getWeeklyScheduledDefinition() { + return weeklyScheduledDefinition; + } + + public void setWeeklyScheduledDefinition(List<DayOfWeekRecurrenceFVO> weeklyScheduledDefinition) { + this.weeklyScheduledDefinition = weeklyScheduledDefinition; + } + + public ScheduleDefinitionFVO monthlyScheduleDayOfMonthDefinition(List<OffsetDateTime> monthlyScheduleDayOfMonthDefinition) { + this.monthlyScheduleDayOfMonthDefinition = monthlyScheduleDayOfMonthDefinition; + return this; + } + + public ScheduleDefinitionFVO addMonthlyScheduleDayOfMonthDefinitionItem(OffsetDateTime monthlyScheduleDayOfMonthDefinitionItem) { + if (this.monthlyScheduleDayOfMonthDefinition == null) { + this.monthlyScheduleDayOfMonthDefinition = new ArrayList<>(); + } + this.monthlyScheduleDayOfMonthDefinition.add(monthlyScheduleDayOfMonthDefinitionItem); + return this; + } + + /** + * The schedule definition for running the threshold job + * @return monthlyScheduleDayOfMonthDefinition + */ + @Valid + @Schema(name = "monthlyScheduleDayOfMonthDefinition", description = "The schedule definition for running the threshold job", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("monthlyScheduleDayOfMonthDefinition") + public List<String> getMonthlyScheduleDayOfMonthDefinitionString() { + // Transforming List<OffsetDateTime> to List<String> + List<String> stringList = monthlyScheduleDayOfMonthDefinition.stream() + .map(OffsetDateTime::toString) + .collect(Collectors.toList()); + return stringList; + } + + @JsonProperty("monthlyScheduleDayOfMonthDefinition") + public void setMonthlyScheduleDayOfMonthDefinitionString(List<String> monthlyScheduleDayOfMonthDefinition) { + + this.monthlyScheduleDayOfMonthDefinition = monthlyScheduleDayOfMonthDefinition.stream() + .map(date -> { + try { + return OffsetDateTime.parse(date); + } catch (DateTimeParseException e) { + // Handle parse exception + System.err.println("Invalid date format: " + date); + return null; // or handle it as per your requirement + } + }) + .collect(Collectors.toList()); + } + + public List<OffsetDateTime> getMonthlyScheduleDayOfMonthDefinition() { + return monthlyScheduleDayOfMonthDefinition; + } + + public void setMonthlyScheduleDayOfMonthDefinition(List<OffsetDateTime> monthlyScheduleDayOfMonthDefinition) { + this.monthlyScheduleDayOfMonthDefinition = monthlyScheduleDayOfMonthDefinition; + } + + public ScheduleDefinitionFVO monthlyScheduleDayOfWeekDefinition(MonthlyScheduleDayOfWeekDefinitionFVO monthlyScheduleDayOfWeekDefinition) { + this.monthlyScheduleDayOfWeekDefinition = monthlyScheduleDayOfWeekDefinition; + return this; + } + + /** + * Get monthlyScheduleDayOfWeekDefinition + * @return monthlyScheduleDayOfWeekDefinition + */ + @Valid + @Schema(name = "MonthlyScheduleDayOfWeekDefinition", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("MonthlyScheduleDayOfWeekDefinition") + public MonthlyScheduleDayOfWeekDefinitionFVO getMonthlyScheduleDayOfWeekDefinition() { + return monthlyScheduleDayOfWeekDefinition; + } + + public void setMonthlyScheduleDayOfWeekDefinition(MonthlyScheduleDayOfWeekDefinitionFVO monthlyScheduleDayOfWeekDefinition) { + this.monthlyScheduleDayOfWeekDefinition = monthlyScheduleDayOfWeekDefinition; + } + + public ScheduleDefinitionFVO dateScheduleDefintion(List<OffsetDateTime> dateScheduleDefintion) { + this.dateScheduleDefintion = dateScheduleDefintion; + return this; + } + + public ScheduleDefinitionFVO addDateScheduleDefintionItem(OffsetDateTime dateScheduleDefintionItem) { + if (this.dateScheduleDefintion == null) { + this.dateScheduleDefintion = new ArrayList<>(); + } + this.dateScheduleDefintion.add(dateScheduleDefintionItem); + return this; + } + + /** + * The date schedule is used to define a schedule that is based on specific dates, such as December 31st 2015, February 28th 2013 + * @return dateScheduleDefintion + */ + @Valid + @Schema(name = "dateScheduleDefintion", description = "The date schedule is used to define a schedule that is based on specific dates, such as December 31st 2015, February 28th 2013", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("dateScheduleDefintion") + public List<String> getDateScheduleDefintionString() { + List<String> stringList = dateScheduleDefintion.stream() + .map(OffsetDateTime::toString) + .collect(Collectors.toList()); + return stringList; + } + + + @JsonProperty("dateScheduleDefintion") + public void setDateScheduleDefintionString(List<String> dateScheduleDefintion) { + this.dateScheduleDefintion = dateScheduleDefintion.stream() + .map(date -> { + try { + return OffsetDateTime.parse(date); + } catch (DateTimeParseException e) { + // Handle parse exception + System.err.println("Invalid date format: " + date); + return null; // or handle it as per your requirement + } + }) + .collect(Collectors.toList()); + } + public List<OffsetDateTime> getDateScheduleDefintion() { + return dateScheduleDefintion; + } + + public void setDateScheduleDefintion(List<OffsetDateTime> dateScheduleDefintion) { + this.dateScheduleDefintion = dateScheduleDefintion; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScheduleDefinitionFVO scheduleDefinitionFVO = (ScheduleDefinitionFVO) o; + return Objects.equals(this.type, scheduleDefinitionFVO.type) && + Objects.equals(this.baseType, scheduleDefinitionFVO.baseType) && + Objects.equals(this.schemaLocation, scheduleDefinitionFVO.schemaLocation) && + Objects.equals(this.scheduleDefinitionStartTime, scheduleDefinitionFVO.scheduleDefinitionStartTime) && + Objects.equals(this.scheduleDefinitionEndTime, scheduleDefinitionFVO.scheduleDefinitionEndTime) && + Objects.equals(this.recurringFrequency, scheduleDefinitionFVO.recurringFrequency) && + Objects.equals(this.excludedDate, scheduleDefinitionFVO.excludedDate) && + Objects.equals(this.scheduleDefinitionHourRange, scheduleDefinitionFVO.scheduleDefinitionHourRange) && + Objects.equals(this.weeklyScheduledDefinition, scheduleDefinitionFVO.weeklyScheduledDefinition) && + Objects.equals(this.monthlyScheduleDayOfMonthDefinition, scheduleDefinitionFVO.monthlyScheduleDayOfMonthDefinition) && + Objects.equals(this.monthlyScheduleDayOfWeekDefinition, scheduleDefinitionFVO.monthlyScheduleDayOfWeekDefinition) && + Objects.equals(this.dateScheduleDefintion, scheduleDefinitionFVO.dateScheduleDefintion); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, scheduleDefinitionStartTime, scheduleDefinitionEndTime, recurringFrequency, excludedDate, scheduleDefinitionHourRange, weeklyScheduledDefinition, monthlyScheduleDayOfMonthDefinition, monthlyScheduleDayOfWeekDefinition, dateScheduleDefintion); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScheduleDefinitionFVO {\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(" scheduleDefinitionStartTime: ").append(toIndentedString(scheduleDefinitionStartTime)).append("\n"); + sb.append(" scheduleDefinitionEndTime: ").append(toIndentedString(scheduleDefinitionEndTime)).append("\n"); + sb.append(" recurringFrequency: ").append(toIndentedString(recurringFrequency)).append("\n"); + sb.append(" excludedDate: ").append(toIndentedString(excludedDate)).append("\n"); + sb.append(" scheduleDefinitionHourRange: ").append(toIndentedString(scheduleDefinitionHourRange)).append("\n"); + sb.append(" weeklyScheduledDefinition: ").append(toIndentedString(weeklyScheduledDefinition)).append("\n"); + sb.append(" monthlyScheduleDayOfMonthDefinition: ").append(toIndentedString(monthlyScheduleDayOfMonthDefinition)).append("\n"); + sb.append(" monthlyScheduleDayOfWeekDefinition: ").append(toIndentedString(monthlyScheduleDayOfWeekDefinition)).append("\n"); + sb.append(" dateScheduleDefintion: ").append(toIndentedString(dateScheduleDefintion)).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/pm628/model/ScheduleDefinitionMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/ScheduleDefinitionMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..1ac941975d37d1882e2eb03948ab1568b905099c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/ScheduleDefinitionMVO.java @@ -0,0 +1,524 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.time.format.DateTimeParseException; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * ScheduleDefinitionMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ScheduleDefinitionMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("uuid") + private String uuid; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime scheduleDefinitionStartTime; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime scheduleDefinitionEndTime; + + @JsonProperty("recurringFrequency") + private String recurringFrequency; + + @Valid + private List<OffsetDateTime> excludedDate = new ArrayList<>(); + + @JsonProperty("scheduleDefinitionHourRange") + private String scheduleDefinitionHourRange; + + @Valid + private List<DayOfWeekRecurrenceMVO> weeklyScheduledDefinition = new ArrayList<>(); + + @Valid + private List<OffsetDateTime> monthlyScheduleDayOfMonthDefinition = new ArrayList<>(); + + @JsonProperty("MonthlyScheduleDayOfWeekDefinition") + private MonthlyScheduleDayOfWeekDefinitionMVO monthlyScheduleDayOfWeekDefinition; + + @Valid + private List<OffsetDateTime> dateScheduleDefintion = new ArrayList<>(); + + public ScheduleDefinitionMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public ScheduleDefinitionMVO(String type) { + this.type = type; + } + + public ScheduleDefinitionMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ScheduleDefinitionMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public ScheduleDefinitionMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public ScheduleDefinitionMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Identifier of the schedule definition + * @return id + */ + + @Schema(name = "uuid", description = "Identifier of the schedule definition", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public ScheduleDefinitionMVO scheduleDefinitionStartTime(OffsetDateTime scheduleDefinitionStartTime) { + this.scheduleDefinitionStartTime = scheduleDefinitionStartTime; + return this; + } + + /** + * The Start time of the Schedule Definition + * @return scheduleDefinitionStartTime + */ + @Valid + @Schema(name = "scheduleDefinitionStartTime", description = "The Start time of the Schedule Definition", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @JsonProperty("scheduleDefinitionStartTime") + public String getScheduleDefinitionStartTimeString() { + return scheduleDefinitionStartTime.toString(); + } + + + public void setScheduleDefinitionStartTime(String t) { + if ( t!= null ) { + this.scheduleDefinitionStartTime = OffsetDateTime.parse( t ); + } + } + + public OffsetDateTime getScheduleDefinitionStartTime() { + return scheduleDefinitionStartTime; + } + + + + public void setScheduleDefinitionStartTime(OffsetDateTime scheduleDefinitionStartTime) { + this.scheduleDefinitionStartTime = scheduleDefinitionStartTime; + } + + public ScheduleDefinitionMVO scheduleDefinitionEndTime(OffsetDateTime scheduleDefinitionEndTime) { + this.scheduleDefinitionEndTime = scheduleDefinitionEndTime; + return this; + } + + /** + * The End time of the Schedule Definition. If the attribute is empty the Schedule run forever, not having a time constraint. + * @return scheduleDefinitionEndTime + */ + @Valid + @Schema(name = "scheduleDefinitionEndTime", description = "The End time of the Schedule Definition. If the attribute is empty the Schedule run forever, not having a time constraint.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("scheduleDefinitionEndTime") + public String getScheduleDefinitionEndTimeString() { + return scheduleDefinitionEndTime.toString(); + } + + public void setScheduleDefinitionEndTime(String t) { + if ( t!= null ) { + this.scheduleDefinitionEndTime = OffsetDateTime.parse( t ); + } +} + public OffsetDateTime getScheduleDefinitionEndTime() { + return scheduleDefinitionEndTime; + } + + public void setScheduleDefinitionEndTime(OffsetDateTime scheduleDefinitionEndTime) { + this.scheduleDefinitionEndTime = scheduleDefinitionEndTime; + } + + public ScheduleDefinitionMVO recurringFrequency(String recurringFrequency) { + this.recurringFrequency = recurringFrequency; + return this; + } + + /** + * A recurring frequency to run a job within day that is included in schedule definition, for example: every 5 minutes, 15 minute, 30 minutes, 1 hour + * @return recurringFrequency + */ + + @Schema(name = "recurringFrequency", description = "A recurring frequency to run a job within day that is included in schedule definition, for example: every 5 minutes, 15 minute, 30 minutes, 1 hour", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("recurringFrequency") + public String getRecurringFrequency() { + return recurringFrequency; + } + + public void setRecurringFrequency(String recurringFrequency) { + this.recurringFrequency = recurringFrequency; + } + + public ScheduleDefinitionMVO excludedDate(List<OffsetDateTime> excludedDate) { + this.excludedDate = excludedDate; + return this; + } + + public ScheduleDefinitionMVO addExcludedDateItem(OffsetDateTime excludedDateItem) { + if (this.excludedDate == null) { + this.excludedDate = new ArrayList<>(); + } + this.excludedDate.add(excludedDateItem); + return this; + } + + /** + * A list of specific dates that should be excluded from the Schedule Definition. + * @return excludedDate + */ + @Valid + @Schema(name = "excludedDate", description = "A list of specific dates that should be excluded from the Schedule Definition.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @JsonProperty("excludedDate") + public List<String> getExcludedDateString() { + // Transforming List<OffsetDateTime> to List<String> + List<String> stringList = excludedDate.stream() + .map(OffsetDateTime::toString) + .collect(Collectors.toList()); + return stringList; + } + + + @JsonProperty("excludedDate") + public void setExcludedDateString(List<String> excludedDate) { + this.excludedDate = excludedDate.stream() + .map(date -> { + try { + return OffsetDateTime.parse(date); + } catch (DateTimeParseException e) { + // Handle parse exception + System.err.println("Invalid date format: " + date); + return null; // or handle it as per your requirement + } + }) + .collect(Collectors.toList()); + } + + public List<OffsetDateTime> getExcludedDate() { + return excludedDate; + } + + public void setExcludedDate(List<OffsetDateTime> excludedDate) { + this.excludedDate = excludedDate; + } + + public ScheduleDefinitionMVO scheduleDefinitionHourRange(String scheduleDefinitionHourRange) { + this.scheduleDefinitionHourRange = scheduleDefinitionHourRange; + return this; + } + + /** + * A list of time ranges within a specific day that the schedule will be active on, for example 08:00-12:00, 16:00-19:00. + * @return scheduleDefinitionHourRange + */ + + @Schema(name = "scheduleDefinitionHourRange", description = "A list of time ranges within a specific day that the schedule will be active on, for example 08:00-12:00, 16:00-19:00.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("scheduleDefinitionHourRange") + public String getScheduleDefinitionHourRange() { + return scheduleDefinitionHourRange; + } + + public void setScheduleDefinitionHourRange(String scheduleDefinitionHourRange) { + this.scheduleDefinitionHourRange = scheduleDefinitionHourRange; + } + + public ScheduleDefinitionMVO weeklyScheduledDefinition(List<DayOfWeekRecurrenceMVO> weeklyScheduledDefinition) { + this.weeklyScheduledDefinition = weeklyScheduledDefinition; + return this; + } + + public ScheduleDefinitionMVO addWeeklyScheduledDefinitionItem(DayOfWeekRecurrenceMVO weeklyScheduledDefinitionItem) { + if (this.weeklyScheduledDefinition == null) { + this.weeklyScheduledDefinition = new ArrayList<>(); + } + this.weeklyScheduledDefinition.add(weeklyScheduledDefinitionItem); + return this; + } + + /** + * The weekly schedule is used to define a schedule that is based on the days of the week, e.g. a schedule that will be active only on Monday and Tuesday. + * @return weeklyScheduledDefinition + */ + @Valid + @Schema(name = "WeeklyScheduledDefinition", description = "The weekly schedule is used to define a schedule that is based on the days of the week, e.g. a schedule that will be active only on Monday and Tuesday.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("WeeklyScheduledDefinition") + public List<DayOfWeekRecurrenceMVO> getWeeklyScheduledDefinition() { + return weeklyScheduledDefinition; + } + + public void setWeeklyScheduledDefinition(List<DayOfWeekRecurrenceMVO> weeklyScheduledDefinition) { + this.weeklyScheduledDefinition = weeklyScheduledDefinition; + } + + public ScheduleDefinitionMVO monthlyScheduleDayOfMonthDefinition(List<OffsetDateTime> monthlyScheduleDayOfMonthDefinition) { + this.monthlyScheduleDayOfMonthDefinition = monthlyScheduleDayOfMonthDefinition; + return this; + } + + public ScheduleDefinitionMVO addMonthlyScheduleDayOfMonthDefinitionItem(OffsetDateTime monthlyScheduleDayOfMonthDefinitionItem) { + if (this.monthlyScheduleDayOfMonthDefinition == null) { + this.monthlyScheduleDayOfMonthDefinition = new ArrayList<>(); + } + this.monthlyScheduleDayOfMonthDefinition.add(monthlyScheduleDayOfMonthDefinitionItem); + return this; + } + + /** + * The schedule definition for running the threshold job + * @return monthlyScheduleDayOfMonthDefinition + */ + @Valid + @Schema(name = "monthlyScheduleDayOfMonthDefinition", description = "The schedule definition for running the threshold job", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @JsonProperty("monthlyScheduleDayOfMonthDefinition") + public List<String> getMonthlyScheduleDayOfMonthDefinitionString() { + // Transforming List<OffsetDateTime> to List<String> + List<String> stringList = monthlyScheduleDayOfMonthDefinition.stream() + .map(OffsetDateTime::toString) + .collect(Collectors.toList()); + return stringList; + } + + @JsonProperty("monthlyScheduleDayOfMonthDefinition") + public void setMonthlyScheduleDayOfMonthDefinitionString(List<String> monthlyScheduleDayOfMonthDefinition) { + + this.monthlyScheduleDayOfMonthDefinition = monthlyScheduleDayOfMonthDefinition.stream() + .map(date -> { + try { + return OffsetDateTime.parse(date); + } catch (DateTimeParseException e) { + // Handle parse exception + System.err.println("Invalid date format: " + date); + return null; // or handle it as per your requirement + } + }) + .collect(Collectors.toList()); + } + public List<OffsetDateTime> getMonthlyScheduleDayOfMonthDefinition() { + return monthlyScheduleDayOfMonthDefinition; + } + + public void setMonthlyScheduleDayOfMonthDefinition(List<OffsetDateTime> monthlyScheduleDayOfMonthDefinition) { + this.monthlyScheduleDayOfMonthDefinition = monthlyScheduleDayOfMonthDefinition; + } + + public ScheduleDefinitionMVO monthlyScheduleDayOfWeekDefinition(MonthlyScheduleDayOfWeekDefinitionMVO monthlyScheduleDayOfWeekDefinition) { + this.monthlyScheduleDayOfWeekDefinition = monthlyScheduleDayOfWeekDefinition; + return this; + } + + /** + * Get monthlyScheduleDayOfWeekDefinition + * @return monthlyScheduleDayOfWeekDefinition + */ + @Valid + @Schema(name = "MonthlyScheduleDayOfWeekDefinition", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("MonthlyScheduleDayOfWeekDefinition") + public MonthlyScheduleDayOfWeekDefinitionMVO getMonthlyScheduleDayOfWeekDefinition() { + return monthlyScheduleDayOfWeekDefinition; + } + + public void setMonthlyScheduleDayOfWeekDefinition(MonthlyScheduleDayOfWeekDefinitionMVO monthlyScheduleDayOfWeekDefinition) { + this.monthlyScheduleDayOfWeekDefinition = monthlyScheduleDayOfWeekDefinition; + } + + public ScheduleDefinitionMVO dateScheduleDefintion(List<OffsetDateTime> dateScheduleDefintion) { + this.dateScheduleDefintion = dateScheduleDefintion; + return this; + } + + public ScheduleDefinitionMVO addDateScheduleDefintionItem(OffsetDateTime dateScheduleDefintionItem) { + if (this.dateScheduleDefintion == null) { + this.dateScheduleDefintion = new ArrayList<>(); + } + this.dateScheduleDefintion.add(dateScheduleDefintionItem); + return this; + } + + /** + * The date schedule is used to define a schedule that is based on specific dates, such as December 31st 2015, February 28th 2013 + * @return dateScheduleDefintion + */ + @Valid + @Schema(name = "dateScheduleDefintion", description = "The date schedule is used to define a schedule that is based on specific dates, such as December 31st 2015, February 28th 2013", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + + @JsonProperty("dateScheduleDefintion") + public List<String> getDateScheduleDefintionString() { + List<String> stringList = dateScheduleDefintion.stream() + .map(OffsetDateTime::toString) + .collect(Collectors.toList()); + return stringList; + } + + + @JsonProperty("dateScheduleDefintion") + public void setDateScheduleDefintionString(List<String> dateScheduleDefintion) { + this.dateScheduleDefintion = dateScheduleDefintion.stream() + .map(date -> { + try { + return OffsetDateTime.parse(date); + } catch (DateTimeParseException e) { + // Handle parse exception + System.err.println("Invalid date format: " + date); + return null; // or handle it as per your requirement + } + }) + .collect(Collectors.toList()); + } + + public List<OffsetDateTime> getDateScheduleDefintion() { + return dateScheduleDefintion; + } + + public void setDateScheduleDefintion(List<OffsetDateTime> dateScheduleDefintion) { + this.dateScheduleDefintion = dateScheduleDefintion; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScheduleDefinitionMVO scheduleDefinitionMVO = (ScheduleDefinitionMVO) o; + return Objects.equals(this.type, scheduleDefinitionMVO.type) && + Objects.equals(this.baseType, scheduleDefinitionMVO.baseType) && + Objects.equals(this.schemaLocation, scheduleDefinitionMVO.schemaLocation) && + Objects.equals(this.uuid, scheduleDefinitionMVO.uuid) && + Objects.equals(this.scheduleDefinitionStartTime, scheduleDefinitionMVO.scheduleDefinitionStartTime) && + Objects.equals(this.scheduleDefinitionEndTime, scheduleDefinitionMVO.scheduleDefinitionEndTime) && + Objects.equals(this.recurringFrequency, scheduleDefinitionMVO.recurringFrequency) && + Objects.equals(this.excludedDate, scheduleDefinitionMVO.excludedDate) && + Objects.equals(this.scheduleDefinitionHourRange, scheduleDefinitionMVO.scheduleDefinitionHourRange) && + Objects.equals(this.weeklyScheduledDefinition, scheduleDefinitionMVO.weeklyScheduledDefinition) && + Objects.equals(this.monthlyScheduleDayOfMonthDefinition, scheduleDefinitionMVO.monthlyScheduleDayOfMonthDefinition) && + Objects.equals(this.monthlyScheduleDayOfWeekDefinition, scheduleDefinitionMVO.monthlyScheduleDayOfWeekDefinition) && + Objects.equals(this.dateScheduleDefintion, scheduleDefinitionMVO.dateScheduleDefintion); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, uuid, scheduleDefinitionStartTime, scheduleDefinitionEndTime, recurringFrequency, excludedDate, scheduleDefinitionHourRange, weeklyScheduledDefinition, monthlyScheduleDayOfMonthDefinition, monthlyScheduleDayOfWeekDefinition, dateScheduleDefintion); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScheduleDefinitionMVO {\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(" id: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" scheduleDefinitionStartTime: ").append(toIndentedString(scheduleDefinitionStartTime)).append("\n"); + sb.append(" scheduleDefinitionEndTime: ").append(toIndentedString(scheduleDefinitionEndTime)).append("\n"); + sb.append(" recurringFrequency: ").append(toIndentedString(recurringFrequency)).append("\n"); + sb.append(" excludedDate: ").append(toIndentedString(excludedDate)).append("\n"); + sb.append(" scheduleDefinitionHourRange: ").append(toIndentedString(scheduleDefinitionHourRange)).append("\n"); + sb.append(" weeklyScheduledDefinition: ").append(toIndentedString(weeklyScheduledDefinition)).append("\n"); + sb.append(" monthlyScheduleDayOfMonthDefinition: ").append(toIndentedString(monthlyScheduleDayOfMonthDefinition)).append("\n"); + sb.append(" monthlyScheduleDayOfWeekDefinition: ").append(toIndentedString(monthlyScheduleDayOfWeekDefinition)).append("\n"); + sb.append(" dateScheduleDefintion: ").append(toIndentedString(dateScheduleDefintion)).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/pm628/model/TrackingRecord.java b/src/main/java/org/etsi/osl/tmf/pm628/model/TrackingRecord.java new file mode 100644 index 0000000000000000000000000000000000000000..2eaa08a03a8296e1d24b45146a6fc2e945587154 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/TrackingRecord.java @@ -0,0 +1,220 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.*; +import jakarta.validation.Valid; +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * TrackingRecord + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +@Entity(name = "PM628_TrackRec") +public class TrackingRecord extends BaseRootEntity { + + @JsonProperty("description") + private String description; + + @JsonProperty("characteristic") + @Valid + @ManyToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @JoinTable( + name = "pm628_track_rec_char", + joinColumns = @JoinColumn(name = "track_rec_uuid"), + inverseJoinColumns = @JoinColumn(name = "char_uuid") + ) + private List<Characteristic> characteristic = new ArrayList<>(); + + @JsonProperty("systemId") + private String systemId; + + @JsonProperty("time") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime time; + + @JsonProperty("user") + private String user; + + public TrackingRecord() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TrackingRecord(String type) { + this.type = type; + } + + public TrackingRecord description(String description) { + this.description = description; + return this; + } + + /** + * Describes the action being done, such as: ack, clear + * @return description + */ + + @Schema(name = "description", example = "[\"acknowledge\",\"clear\"]", description = "Describes the action being done, such as: ack, clear", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public TrackingRecord characteristic(List<Characteristic> characteristic) { + this.characteristic = characteristic; + return this; + } + + public TrackingRecord addCharacteristicItem(Characteristic characteristicItem) { + if (this.characteristic == null) { + this.characteristic = new ArrayList<>(); + } + this.characteristic.add(characteristicItem); + return this; + } + + /** + * A generic list of any type of elements. Used for vendor Extensions or loose element encapsulation from other namespaces + * @return characteristic + */ + @Valid + @Schema(name = "characteristic", description = "A generic list of any type of elements. Used for vendor Extensions or loose element encapsulation from other namespaces", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("characteristic") + public List<Characteristic> getCharacteristic() { + return characteristic; + } + + public void setCharacteristic(List<Characteristic> characteristic) { + this.characteristic = characteristic; + } + + public TrackingRecord systemId(String systemId) { + this.systemId = systemId; + return this; + } + + /** + * Describes the system Id from which the action was done + * @return systemId + */ + + @Schema(name = "systemId", description = "Describes the system Id from which the action was done", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("systemId") + public String getSystemId() { + return systemId; + } + + public void setSystemId(String systemId) { + this.systemId = systemId; + } + + public TrackingRecord time(OffsetDateTime time) { + this.time = time; + return this; + } + + /** + * Describes the time at which the action was done + * @return time + */ + @Valid + @Schema(name = "time", description = "Describes the time at which the action was done", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + public void setTime(OffsetDateTime time) { + this.time = time; + } + + public TrackingRecord user(String user) { + this.user = user; + return this; + } + + /** + * Describes the user doing the action + * @return user + */ + + @Schema(name = "user", description = "Describes the user doing the action", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("user") + public String getUser() { + return user; + } + + public void setUser(String user) { + this.user = user; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrackingRecord trackingRecord = (TrackingRecord) o; + return Objects.equals(this.type, trackingRecord.type) && + Objects.equals(this.baseType, trackingRecord.baseType) && + Objects.equals(this.schemaLocation, trackingRecord.schemaLocation) && + Objects.equals(this.description, trackingRecord.description) && + Objects.equals(this.characteristic, trackingRecord.characteristic) && + Objects.equals(this.systemId, trackingRecord.systemId) && + Objects.equals(this.time, trackingRecord.time) && + Objects.equals(this.user, trackingRecord.user) && + Objects.equals(this.uuid, trackingRecord.uuid); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, description, characteristic, systemId, time, user, uuid); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrackingRecord {\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(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" characteristic: ").append(toIndentedString(characteristic)).append("\n"); + sb.append(" systemId: ").append(toIndentedString(systemId)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).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/pm628/model/TrackingRecordFVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/TrackingRecordFVO.java new file mode 100644 index 0000000000000000000000000000000000000000..36b881d602cbf830fb9707f41efb1f7ab36fb75f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/TrackingRecordFVO.java @@ -0,0 +1,282 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * TrackingRecordFVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class TrackingRecordFVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + protected String href = null; + + @JsonProperty("description") + private String description; + + @JsonProperty("characteristic") + @Valid + private List<CharacteristicFVO> characteristic = new ArrayList<>(); + + @JsonProperty("systemId") + private String systemId; + + @JsonProperty("time") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime time; + + @JsonProperty("user") + private String user; + + public TrackingRecordFVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TrackingRecordFVO(String type) { + this.type = type; + } + + public TrackingRecordFVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public TrackingRecordFVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public TrackingRecordFVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public TrackingRecordFVO description(String description) { + this.description = description; + return this; + } + + /** + * Describes the action being done, such as: ack, clear + * @return description + */ + + @Schema(name = "description", example = "[\"acknowledge\",\"clear\"]", description = "Describes the action being done, such as: ack, clear", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public TrackingRecordFVO characteristic(List<CharacteristicFVO> characteristic) { + this.characteristic = characteristic; + return this; + } + + public TrackingRecordFVO addCharacteristicItem(CharacteristicFVO characteristicItem) { + if (this.characteristic == null) { + this.characteristic = new ArrayList<>(); + } + this.characteristic.add(characteristicItem); + return this; + } + + /** + * A generic list of any type of elements. Used for vendor Extensions or loose element encapsulation from other namespaces + * @return characteristic + */ + @Valid + @Schema(name = "characteristic", description = "A generic list of any type of elements. Used for vendor Extensions or loose element encapsulation from other namespaces", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("characteristic") + public List<CharacteristicFVO> getCharacteristic() { + return characteristic; + } + + public void setCharacteristic(List<CharacteristicFVO> characteristic) { + this.characteristic = characteristic; + } + + public TrackingRecordFVO systemId(String systemId) { + this.systemId = systemId; + return this; + } + + /** + * Describes the system Id from which the action was done + * @return systemId + */ + + @Schema(name = "systemId", description = "Describes the system Id from which the action was done", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("systemId") + public String getSystemId() { + return systemId; + } + + public void setSystemId(String systemId) { + this.systemId = systemId; + } + + public TrackingRecordFVO time(OffsetDateTime time) { + this.time = time; + return this; + } + + /** + * Describes the time at which the action was done + * @return time + */ + @Valid + @Schema(name = "time", description = "Describes the time at which the action was done", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + public void setTime(OffsetDateTime time) { + this.time = time; + } + + public TrackingRecordFVO user(String user) { + this.user = user; + return this; + } + + /** + * Describes the user doing the action + * @return user + */ + + @Schema(name = "user", description = "Describes the user doing the action", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("user") + public String getUser() { + return user; + } + + public void setUser(String user) { + this.user = user; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrackingRecordFVO trackingRecordFVO = (TrackingRecordFVO) o; + return Objects.equals(this.type, trackingRecordFVO.type) && + Objects.equals(this.baseType, trackingRecordFVO.baseType) && + Objects.equals(this.schemaLocation, trackingRecordFVO.schemaLocation) && + Objects.equals(this.description, trackingRecordFVO.description) && + Objects.equals(this.characteristic, trackingRecordFVO.characteristic) && + Objects.equals(this.systemId, trackingRecordFVO.systemId) && + Objects.equals(this.time, trackingRecordFVO.time) && + Objects.equals(this.user, trackingRecordFVO.user); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, description, characteristic, systemId, time, user); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrackingRecordFVO {\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(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" characteristic: ").append(toIndentedString(characteristic)).append("\n"); + sb.append(" systemId: ").append(toIndentedString(systemId)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).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/pm628/model/TrackingRecordMVO.java b/src/main/java/org/etsi/osl/tmf/pm628/model/TrackingRecordMVO.java new file mode 100644 index 0000000000000000000000000000000000000000..64be0fb6aec5702921a250c2fef84ce272a6b2ef --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pm628/model/TrackingRecordMVO.java @@ -0,0 +1,307 @@ +package org.etsi.osl.tmf.pm628.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.annotation.Generated; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * TrackingRecordMVO + */ + + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-05-15T07:30:16.936523289Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class TrackingRecordMVO { + + @JsonProperty("@type") + private String type; + + @JsonProperty("@baseType") + private String baseType; + + @JsonProperty("@schemaLocation") + private String schemaLocation; + + @JsonProperty("href") + protected String href; + + @JsonProperty("description") + private String description; + + @JsonProperty("characteristic") + @Valid + private List<CharacteristicMVO> characteristic = new ArrayList<>(); + + @JsonProperty("systemId") + private String systemId; + + @JsonProperty("time") + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) + private OffsetDateTime time; + + @JsonProperty("user") + private String user; + + @JsonProperty("uuid") + private String uuid; + + public TrackingRecordMVO() { + super(); + } + + /** + * Constructor with only required parameters + */ + public TrackingRecordMVO(String type) { + this.type = type; + } + + public TrackingRecordMVO type(String type) { + this.type = type; + return this; + } + + /** + * When sub-classing, this defines the sub-class Extensible name + * @return type + */ + @NotNull + @Schema(name = "@type", description = "When sub-classing, this defines the sub-class Extensible name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("@type") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public TrackingRecordMVO baseType(String baseType) { + this.baseType = baseType; + return this; + } + + /** + * When sub-classing, this defines the super-class + * @return baseType + */ + + @Schema(name = "@baseType", description = "When sub-classing, this defines the super-class", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("@baseType") + public String getBaseType() { + return baseType; + } + + public void setBaseType(String baseType) { + this.baseType = baseType; + } + + public TrackingRecordMVO schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + return this; + } + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + * @return schemaLocation + */ + + @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 getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public TrackingRecordMVO description(String description) { + this.description = description; + return this; + } + + /** + * Describes the action being done, such as: ack, clear + * @return description + */ + + @Schema(name = "description", example = "[\"acknowledge\",\"clear\"]", description = "Describes the action being done, such as: ack, clear", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public TrackingRecordMVO characteristic(List<CharacteristicMVO> characteristic) { + this.characteristic = characteristic; + return this; + } + + public TrackingRecordMVO addCharacteristicItem(CharacteristicMVO characteristicItem) { + if (this.characteristic == null) { + this.characteristic = new ArrayList<>(); + } + this.characteristic.add(characteristicItem); + return this; + } + + /** + * A generic list of any type of elements. Used for vendor Extensions or loose element encapsulation from other namespaces + * @return characteristic + */ + @Valid + @Schema(name = "characteristic", description = "A generic list of any type of elements. Used for vendor Extensions or loose element encapsulation from other namespaces", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("characteristic") + public List<CharacteristicMVO> getCharacteristic() { + return characteristic; + } + + public void setCharacteristic(List<CharacteristicMVO> characteristic) { + this.characteristic = characteristic; + } + + public TrackingRecordMVO systemId(String systemId) { + this.systemId = systemId; + return this; + } + + /** + * Describes the system Id from which the action was done + * @return systemId + */ + + @Schema(name = "systemId", description = "Describes the system Id from which the action was done", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("systemId") + public String getSystemId() { + return systemId; + } + + public void setSystemId(String systemId) { + this.systemId = systemId; + } + + public TrackingRecordMVO time(OffsetDateTime time) { + this.time = time; + return this; + } + + /** + * Describes the time at which the action was done + * @return time + */ + @Valid + @Schema(name = "time", description = "Describes the time at which the action was done", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("time") + public OffsetDateTime getTime() { + return time; + } + + public void setTime(OffsetDateTime time) { + this.time = time; + } + + public TrackingRecordMVO user(String user) { + this.user = user; + return this; + } + + /** + * Describes the user doing the action + * @return user + */ + + @Schema(name = "user", description = "Describes the user doing the action", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("user") + public String getUser() { + return user; + } + + public void setUser(String user) { + this.user = user; + } + + public TrackingRecordMVO uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Identifier of the TrackingRecord. + * @return id + */ + + @Schema(name = "uuid", description = "Identifier of the TrackingRecord.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("uuid") + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TrackingRecordMVO trackingRecordMVO = (TrackingRecordMVO) o; + return Objects.equals(this.type, trackingRecordMVO.type) && + Objects.equals(this.baseType, trackingRecordMVO.baseType) && + Objects.equals(this.schemaLocation, trackingRecordMVO.schemaLocation) && + Objects.equals(this.description, trackingRecordMVO.description) && + Objects.equals(this.characteristic, trackingRecordMVO.characteristic) && + Objects.equals(this.systemId, trackingRecordMVO.systemId) && + Objects.equals(this.time, trackingRecordMVO.time) && + Objects.equals(this.user, trackingRecordMVO.user) && + Objects.equals(this.uuid, trackingRecordMVO.uuid); + } + + @Override + public int hashCode() { + return Objects.hash(type, baseType, schemaLocation, description, characteristic, systemId, time, user, uuid); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TrackingRecordMVO {\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(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" characteristic: ").append(toIndentedString(characteristic)).append("\n"); + sb.append(" systemId: ").append(toIndentedString(systemId)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append(" id: ").append(toIndentedString(uuid)).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/po622/model/AgreementItemRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/AgreementItemRef.java index 73de8611b1ece90f3ec9e20fe7c527b606287478..f4c8d6a2a16a87da97a2dccd454dd2c5aaadb258 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/AgreementItemRef.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/AgreementItemRef.java @@ -20,12 +20,11 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; /** @@ -34,27 +33,14 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "Agreement reference. An agreement represents a contract or arrangement, either written or verbal and sometimes enforceable by law, such as a service level agreement or a customer price agreement. An agreement involves a number of other business entities, such as products, services, and resources and/or their specifications.") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class AgreementItemRef { +@Entity(name = "AgrItemRef622") +public class AgreementItemRef extends BaseRootNamedEntity { @JsonProperty("id") private String id = null; - @JsonProperty("href") - private String href = null; - @JsonProperty("agreementItemId") private String agreementItemId = null; - @JsonProperty("name") - private String name = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; @JsonProperty("@referredType") private String _atReferredType = null; @@ -79,119 +65,7 @@ public class AgreementItemRef { this.id = id; } - public AgreementItemRef href(String href) { - this.href = href; - return this; - } - - /** - * Reference of the related entity. - * @return href - **/ - @Schema(description = "Reference of the related entity.") - public String getHref() { - return href; - } - - public void setHref(String href) { - this.href = href; - } - - public AgreementItemRef agreementItemId(String agreementItemId) { - this.agreementItemId = agreementItemId; - return this; - } - - /** - * Identifier of the agreement - * @return agreementItemId - **/ - @Schema(description = "Identifier of the agreement") - - public String getAgreementItemId() { - return agreementItemId; - } - - public void setAgreementItemId(String agreementItemId) { - this.agreementItemId = agreementItemId; - } - - public AgreementItemRef name(String name) { - this.name = name; - return this; - } - - /** - * Name of the related entity. - * @return name - **/ - @Schema(description = "Name of the related entity.") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public AgreementItemRef baseType(String baseType) { - this.baseType = baseType; - return this; - } - - /** - * When sub-classing, this defines the super-class - * @return baseType - **/ - @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { - return baseType; - } - - public void setAtBaseType(String baseType) { - this.baseType = baseType; - } - - public AgreementItemRef schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - public String getAtSchemaLocation() { - return schemaLocation; - } - - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - public AgreementItemRef type(String type) { - this.type = type; - return this; - } - - /** - * When sub-classing, this defines the sub-class entity name - * @return type - **/ - @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { - return type; - } - - public void setAtType(String type) { - this.type = type; - } public AgreementItemRef _atReferredType(String _atReferredType) { this._atReferredType = _atReferredType; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/AgreementRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/AgreementRef.java index c729d633d433442643f981874999b6fbd13d92b8..b73098707710b58bddef9ff048e87a0927604abc 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/AgreementRef.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/AgreementRef.java @@ -20,12 +20,11 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; /** @@ -34,24 +33,11 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "Agreement reference. An agreement represents a contract or arrangement, either written or verbal and sometimes enforceable by law, such as a service level agreement or a customer price agreement. An agreement involves a number of other business entities, such as products, services, and resources and/or their specifications.") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class AgreementRef { +@Entity(name = "AgrRef622") +public class AgreementRef extends BaseRootNamedEntity { @JsonProperty("id") private String id = null; - @JsonProperty("href") - private String href = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; @JsonProperty("@referredType") private String _atReferredType = null; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/Any.java b/src/main/java/org/etsi/osl/tmf/po622/model/Any.java index 836730781fb2b5198759302676013fec36be4607..822f9aa72ae6502993b89dcd6e97a5bdeefd9720 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/Any.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/Any.java @@ -20,7 +20,6 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import org.springframework.validation.annotation.Validated; /** diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/AppointmentRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/AppointmentRef.java index 44e145e39b1c2156681b7699e5ee4e72dbde030a..5273f1f1a394bb6c9fcaeb995de7a9afcd41945b 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/AppointmentRef.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/AppointmentRef.java @@ -20,12 +20,12 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; /** @@ -34,25 +34,15 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "Refers an appointment, such as a Customer presentation or internal meeting or site visit") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class AppointmentRef { +@Entity(name = "AppointmentRef622") +public class AppointmentRef extends BaseRootEntity { + @JsonProperty("id") private String id = null; - - @JsonProperty("href") - private String href = null; - + @JsonProperty("description") private String description = null; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; - @JsonProperty("@referredType") private String _atReferredType = null; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/CancelOrder.java b/src/main/java/org/etsi/osl/tmf/po622/model/CancelOrder.java index c431bb56a9f38832339da33825cf3a6b731ceb9b..24571b80de5a0072f7cc0549db014734ea5d139e 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/CancelOrder.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/CancelOrder.java @@ -21,11 +21,8 @@ package org.etsi.osl.tmf.po622.model; import java.time.OffsetDateTime; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrder.java b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrder.java index 6a6ac36680f7e11d58ac5b5bc133bbe3427b121c..72083e646b25ab03ef7f7a70788edcf34df610de 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrder.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrder.java @@ -21,11 +21,8 @@ package org.etsi.osl.tmf.po622.model; import java.time.OffsetDateTime; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderCreate.java b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderCreate.java index 018dda099b7dc16bf7e336e11dad75fa4ded6bae..4cd79a75db832a9e44944fc8535dc7aad9dd0465 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderCreate.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderCreate.java @@ -21,11 +21,8 @@ package org.etsi.osl.tmf.po622.model; import java.time.OffsetDateTime; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderCreateEvent.java b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderCreateEvent.java index 59d42a223d8dcf9be83d3d58ebf2c928a2b59c2f..f2ca2027e8a5126afc8196b82dc51efbcc20c6cf 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderCreateEvent.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderCreateEvent.java @@ -21,11 +21,8 @@ package org.etsi.osl.tmf.po622.model; import java.time.OffsetDateTime; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderCreateEventPayload.java b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderCreateEventPayload.java index 86c4ec665d8d1621ee40abc373aca724ace10748..f0454d8a0af088fbadc4806d616d92b17641e7b4 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderCreateEventPayload.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderCreateEventPayload.java @@ -20,11 +20,8 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderInformationRequiredEvent.java b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderInformationRequiredEvent.java index fd6e530f456b2f8835f760d9527aa4b33b7d2ef6..898aee36327ee245c988ff075cff5dddd96f0e16 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderInformationRequiredEvent.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderInformationRequiredEvent.java @@ -21,11 +21,8 @@ package org.etsi.osl.tmf.po622.model; import java.time.OffsetDateTime; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderInformationRequiredEventPayload.java b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderInformationRequiredEventPayload.java index 75bf9e5c494a3fad81630aa5a4108a950133852c..739c278ecb728386026698d37597485258080ef3 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderInformationRequiredEventPayload.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderInformationRequiredEventPayload.java @@ -20,11 +20,8 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderStateChangeEvent.java b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderStateChangeEvent.java index c0280f588b97658958bd157e3a55b9c42adc313a..0702f78c3ebf972774316e0eeb71dc6699ba0876 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderStateChangeEvent.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderStateChangeEvent.java @@ -21,11 +21,8 @@ package org.etsi.osl.tmf.po622.model; import java.time.OffsetDateTime; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderStateChangeEventPayload.java b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderStateChangeEventPayload.java index dde76f6dedf5ced053fee627558b3b944989b302..ff5831c19f975da6fbcfe2fd292ab08edbc3b644 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderStateChangeEventPayload.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/CancelProductOrderStateChangeEventPayload.java @@ -20,11 +20,8 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/Characteristic.java b/src/main/java/org/etsi/osl/tmf/po622/model/Characteristic.java deleted file mode 100644 index d709b73f6509d496f47936f3bea84dec2350548e..0000000000000000000000000000000000000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/Characteristic.java +++ /dev/null @@ -1,222 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; - -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import org.springframework.validation.annotation.Validated; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.Valid; -import jakarta.validation.constraints.NotNull; - -/** - * Describes a given characteristic of an object or entity through a name/value pair. - */ -@Schema(description = "Describes a given characteristic of an object or entity through a name/value pair.") -@Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class Characteristic { - @JsonProperty("name") - private String name = null; - - @JsonProperty("valueType") - private String valueType = null; - - @JsonProperty("value") - private Any value = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; - - public Characteristic name(String name) { - this.name = name; - return this; - } - - /** - * Name of the characteristic - * @return name - **/ - @Schema(description = "Name of the characteristic") - @NotNull - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Characteristic valueType(String valueType) { - this.valueType = valueType; - return this; - } - - /** - * Data type of the value of the characteristic - * @return valueType - **/ - @Schema(description = "Data type of the value of the characteristic") - - public String getValueType() { - return valueType; - } - - public void setValueType(String valueType) { - this.valueType = valueType; - } - - public Characteristic value(Any value) { - this.value = value; - return this; - } - - /** - * Get value - * @return value - **/ - @Schema(description = "") - @NotNull - - @Valid - public Any getValue() { - return value; - } - - public void setValue(Any value) { - this.value = value; - } - - public Characteristic baseType(String baseType) { - this.baseType = baseType; - return this; - } - - /** - * When sub-classing, this defines the super-class - * @return baseType - **/ - @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { - return baseType; - } - - public void setAtBaseType(String baseType) { - this.baseType = baseType; - } - - public Characteristic schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - public String getAtSchemaLocation() { - return schemaLocation; - } - - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - public Characteristic type(String type) { - this.type = type; - return this; - } - - /** - * When sub-classing, this defines the sub-class entity name - * @return type - **/ - @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { - return type; - } - - public void setAtType(String type) { - this.type = type; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Characteristic characteristic = (Characteristic) o; - return Objects.equals(this.name, characteristic.name) && - Objects.equals(this.valueType, characteristic.valueType) && - Objects.equals(this.value, characteristic.value) && - Objects.equals(this.baseType, characteristic.baseType) && - Objects.equals(this.schemaLocation, characteristic.schemaLocation) && - Objects.equals(this.type, characteristic.type); - } - - @Override - public int hashCode() { - return Objects.hash(name, valueType, value, baseType, schemaLocation, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Characteristic {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" valueType: ").append(toIndentedString(valueType)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).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/po622/model/OrderItemActionType.java b/src/main/java/org/etsi/osl/tmf/po622/model/OrderItemActionType.java index f9477f20bde99bbf8f17476e4fc68a8c96e40692..30871bb4ca537527212f2b54ed6ef55bda2ed8ac 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/OrderItemActionType.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/OrderItemActionType.java @@ -26,10 +26,10 @@ import com.fasterxml.jackson.annotation.JsonValue; * action to be performed on the product */ public enum OrderItemActionType { - ADD("add"), - MODIFY("modify"), - DELETE("delete"), - NOCHANGE("noChange"); + ADD("ADD"), + MODIFY("MODIFY"), + DELETE("DELETE"), + NOCHANGE("NOCHANGE"); private String value; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/OrderItemRelationship.java b/src/main/java/org/etsi/osl/tmf/po622/model/OrderItemRelationship.java index 9ab03386297d958d21bc33f8409754929208a4d2..5e786ab9832ef04c0e6242c15ab093e4d54b1815 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/OrderItemRelationship.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/OrderItemRelationship.java @@ -20,33 +20,26 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; /** * OrderItemRelationship */ @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class OrderItemRelationship { +@Entity(name = "OrderItemRel") +public class OrderItemRelationship extends BaseRootEntity { @JsonProperty("id") private String id = null; @JsonProperty("relationshipType") private String relationshipType = null; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - @JsonProperty("@type") - private String type = null; public OrderItemRelationship id(String id) { this.id = id; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/OrderPrice.java b/src/main/java/org/etsi/osl/tmf/po622/model/OrderPrice.java index ec9f853c6460e70beb1e3cf11aa5c8141d94a459..992572d12f2f0e3c265778a31853e483f78677c0 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/OrderPrice.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/OrderPrice.java @@ -20,14 +20,25 @@ package org.etsi.osl.tmf.po622.model; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; import java.util.Objects; - +import java.util.Set; import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; +import org.etsi.osl.tmf.pcm620.model.ProductOfferingPriceRef; +import org.etsi.osl.tmf.pim637.model.BillingAccountRef; +import org.etsi.osl.tmf.pim637.model.Price; +import org.etsi.osl.tmf.pim637.model.PriceAlteration; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.Lob; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OneToOne; import jakarta.validation.Valid; /** @@ -36,13 +47,14 @@ import jakarta.validation.Valid; @Schema(description = "An amount, usually of money, that represents the actual price paid by the Customer for this item or this order") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class OrderPrice { +@Entity(name = "OrderPrice622") +public class OrderPrice extends BaseRootNamedEntity { + + @Lob + @Column(name = "LDESCRIPTION", columnDefinition = "LONGTEXT") @JsonProperty("description") private String description = null; - @JsonProperty("name") - private String name = null; - @JsonProperty("priceType") private String priceType = null; @@ -53,26 +65,25 @@ public class OrderPrice { private String unitOfMeasure = null; @JsonProperty("billingAccount") + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "billing_acc_refuuid", referencedColumnName = "uuid") private BillingAccountRef billingAccount = null; @JsonProperty("price") + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "price_uuid", referencedColumnName = "uuid") private Price price = null; @JsonProperty("priceAlteration") @Valid - private List<PriceAlteration> priceAlteration = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set<PriceAlteration> priceAlteration = new HashSet<>(); @JsonProperty("productOfferingPrice") + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "productOffPr_refuuid", referencedColumnName = "uuid") private ProductOfferingPriceRef productOfferingPrice = null; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; public OrderPrice description(String description) { this.description = description; @@ -209,14 +220,14 @@ public class OrderPrice { this.price = price; } - public OrderPrice priceAlteration(List<PriceAlteration> priceAlteration) { + public OrderPrice priceAlteration(Set<PriceAlteration> priceAlteration) { this.priceAlteration = priceAlteration; return this; } public OrderPrice addPriceAlterationItem(PriceAlteration priceAlterationItem) { if (this.priceAlteration == null) { - this.priceAlteration = new ArrayList<>(); + this.priceAlteration = new HashSet<>(); } this.priceAlteration.add(priceAlterationItem); return this; @@ -228,11 +239,11 @@ public class OrderPrice { **/ @Schema(description = "a strucuture used to describe a price alteration") @Valid - public List<PriceAlteration> getPriceAlteration() { + public Set<PriceAlteration> getPriceAlteration() { return priceAlteration; } - public void setPriceAlteration(List<PriceAlteration> priceAlteration) { + public void setPriceAlteration(Set<PriceAlteration> priceAlteration) { this.priceAlteration = priceAlteration; } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/OrderTerm.java b/src/main/java/org/etsi/osl/tmf/po622/model/OrderTerm.java index 999b3db254896118e93a69f90b8c4b553838d8aa..ff34691bbf333e59c044790cf4de680cc75ebb0e 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/OrderTerm.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/OrderTerm.java @@ -20,11 +20,14 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.etsi.osl.tmf.common.model.Quantity; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Lob; import jakarta.validation.Valid; /** @@ -33,24 +36,17 @@ import jakarta.validation.Valid; @Schema(description = "Description of a productTerm linked to this orderItem. This represent a commitment with a duration") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class OrderTerm { +@Entity(name = "OrderTerm622") +public class OrderTerm extends BaseRootNamedEntity { + + @Lob + @Column(name = "LDESCRIPTION", columnDefinition = "LONGTEXT") @JsonProperty("description") private String description = null; - @JsonProperty("name") - private String name = null; - @JsonProperty("duration") private Quantity duration = null; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; public OrderTerm description(String description) { this.description = description; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/PaymentRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/PaymentRef.java index d60169ea1540fdff918f11b562e98ca8a6b09076..84ead8a4ac969920e9cfc0a7e139c05f0421fd48 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/PaymentRef.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/PaymentRef.java @@ -20,12 +20,11 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; /** @@ -34,25 +33,12 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "If an immediate payment has been done at the product order submission, the payment information are captured and stored (as a reference) in the order.") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class PaymentRef { +@Entity(name = "PaymentRef622") +public class PaymentRef extends BaseRootNamedEntity { @JsonProperty("id") private String id = null; - @JsonProperty("href") - private String href = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; - + @JsonProperty("@referredType") private String _atReferredType = null; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingPriceRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingPriceRef.java deleted file mode 100644 index 25224fb75af1356ddd1477b5336339fa821c7445..0000000000000000000000000000000000000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingPriceRef.java +++ /dev/null @@ -1,243 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; - -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import org.springframework.validation.annotation.Validated; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; - -/** - * ProductPriceOffering reference. An amount, usually of money, that is asked for or allowed when a ProductOffering is bought, rented, or leased - */ -@Schema(description = "ProductPriceOffering reference. An amount, usually of money, that is asked for or allowed when a ProductOffering is bought, rented, or leased") -@Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductOfferingPriceRef { - @JsonProperty("id") - private String id = null; - - @JsonProperty("href") - private String href = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; - - @JsonProperty("@referredType") - private String _atReferredType = null; - - public ProductOfferingPriceRef id(String id) { - this.id = id; - return this; - } - - /** - * Unique identifier of a related entity. - * @return id - **/ - @Schema(description = "Unique identifier of a related entity.") - @NotNull - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public ProductOfferingPriceRef href(String href) { - this.href = href; - return this; - } - - /** - * Reference of the related entity. - * @return href - **/ - @Schema(description = "Reference of the related entity.") - - public String getHref() { - return href; - } - - public void setHref(String href) { - this.href = href; - } - - public ProductOfferingPriceRef name(String name) { - this.name = name; - return this; - } - - /** - * Name of the related entity. - * @return name - **/ - @Schema(description = "Name of the related entity.") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ProductOfferingPriceRef baseType(String baseType) { - this.baseType = baseType; - return this; - } - - /** - * When sub-classing, this defines the super-class - * @return baseType - **/ - @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { - return baseType; - } - - public void setAtBaseType(String baseType) { - this.baseType = baseType; - } - - public ProductOfferingPriceRef schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - public String getAtSchemaLocation() { - return schemaLocation; - } - - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - public ProductOfferingPriceRef type(String type) { - this.type = type; - return this; - } - - /** - * When sub-classing, this defines the sub-class entity name - * @return type - **/ - @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { - return type; - } - - public void setAtType(String type) { - this.type = type; - } - - public ProductOfferingPriceRef _atReferredType(String _atReferredType) { - this._atReferredType = _atReferredType; - return this; - } - - /** - * The actual type of the target instance when needed for disambiguation. - * @return _atReferredType - **/ - @Schema(description = "The actual type of the target instance when needed for disambiguation.") - - public String getAtReferredType() { - return _atReferredType; - } - - public void setAtReferredType(String _atReferredType) { - this._atReferredType = _atReferredType; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProductOfferingPriceRef productOfferingPriceRef = (ProductOfferingPriceRef) o; - return Objects.equals(this.id, productOfferingPriceRef.id) && - Objects.equals(this.href, productOfferingPriceRef.href) && - Objects.equals(this.name, productOfferingPriceRef.name) && - Objects.equals(this.baseType, productOfferingPriceRef.baseType) && - Objects.equals(this.schemaLocation, productOfferingPriceRef.schemaLocation) && - Objects.equals(this.type, productOfferingPriceRef.type) && - Objects.equals(this._atReferredType, productOfferingPriceRef._atReferredType); - } - - @Override - public int hashCode() { - return Objects.hash(id, href, name, baseType, schemaLocation, type, _atReferredType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProductOfferingPriceRef {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).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(" _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(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/po622/model/ProductOfferingQualificationItemRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingQualificationItemRef.java index 1c3b20cac3b027f15c73d87ceee921a127eb076c..2ff1407ea9eae6c7ea0fcce5c95ae9270e3b8625 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingQualificationItemRef.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingQualificationItemRef.java @@ -20,12 +20,11 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; /** @@ -34,15 +33,14 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "It's a productOfferingQualification item that has been executed previously.") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductOfferingQualificationItemRef { +@Entity(name = "ProdOffQIRef622") +public class ProductOfferingQualificationItemRef extends BaseRootNamedEntity { @JsonProperty("id") private String id = null; @JsonProperty("href") private String href = null; - @JsonProperty("name") - private String name = null; @JsonProperty("productOfferingQualificationHref") private String productOfferingQualificationHref = null; @@ -53,14 +51,6 @@ public class ProductOfferingQualificationItemRef { @JsonProperty("productOfferingQualificationName") private String productOfferingQualificationName = null; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; @JsonProperty("@referredType") private String _atReferredType = null; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingQualificationRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingQualificationRef.java index ed7f58a5c7aa7b4282f347aad139ba90fb1a2340..efa5411c525894fd8eb661f12625652bfceb7ed5 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingQualificationRef.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingQualificationRef.java @@ -20,12 +20,11 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; /** @@ -34,24 +33,11 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "It's a productOfferingQualification that has been executed previously") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductOfferingQualificationRef { +@Entity(name = "ProdOffQualRef622") +public class ProductOfferingQualificationRef extends BaseRootNamedEntity { @JsonProperty("id") private String id = null; - @JsonProperty("href") - private String href = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; @JsonProperty("@referredType") private String _atReferredType = null; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingRef.java deleted file mode 100644 index f18eb0729c49f94f98f189cb8a2581994518bf2f..0000000000000000000000000000000000000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingRef.java +++ /dev/null @@ -1,243 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; - -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import org.springframework.validation.annotation.Validated; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; - -/** - * ProductOffering reference. A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information. - */ -@Schema(description = "ProductOffering reference. A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information.") -@Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductOfferingRef { - @JsonProperty("id") - private String id = null; - - @JsonProperty("href") - private String href = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; - - @JsonProperty("@referredType") - private String _atReferredType = null; - - public ProductOfferingRef id(String id) { - this.id = id; - return this; - } - - /** - * Unique identifier of a related entity. - * @return id - **/ - @Schema(description = "Unique identifier of a related entity.") - @NotNull - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public ProductOfferingRef href(String href) { - this.href = href; - return this; - } - - /** - * Reference of the related entity. - * @return href - **/ - @Schema(description = "Reference of the related entity.") - - public String getHref() { - return href; - } - - public void setHref(String href) { - this.href = href; - } - - public ProductOfferingRef name(String name) { - this.name = name; - return this; - } - - /** - * Name of the related entity. - * @return name - **/ - @Schema(description = "Name of the related entity.") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ProductOfferingRef baseType(String baseType) { - this.baseType = baseType; - return this; - } - - /** - * When sub-classing, this defines the super-class - * @return baseType - **/ - @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { - return baseType; - } - - public void setAtBaseType(String baseType) { - this.baseType = baseType; - } - - public ProductOfferingRef schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - public String getAtSchemaLocation() { - return schemaLocation; - } - - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - public ProductOfferingRef type(String type) { - this.type = type; - return this; - } - - /** - * When sub-classing, this defines the sub-class entity name - * @return type - **/ - @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { - return type; - } - - public void setAtType(String type) { - this.type = type; - } - - public ProductOfferingRef _atReferredType(String _atReferredType) { - this._atReferredType = _atReferredType; - return this; - } - - /** - * The actual type of the target instance when needed for disambiguation. - * @return _atReferredType - **/ - @Schema(description = "The actual type of the target instance when needed for disambiguation.") - - public String getAtReferredType() { - return _atReferredType; - } - - public void setAtReferredType(String _atReferredType) { - this._atReferredType = _atReferredType; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProductOfferingRef productOfferingRef = (ProductOfferingRef) o; - return Objects.equals(this.id, productOfferingRef.id) && - Objects.equals(this.href, productOfferingRef.href) && - Objects.equals(this.name, productOfferingRef.name) && - Objects.equals(this.baseType, productOfferingRef.baseType) && - Objects.equals(this.schemaLocation, productOfferingRef.schemaLocation) && - Objects.equals(this.type, productOfferingRef.type) && - Objects.equals(this._atReferredType, productOfferingRef._atReferredType); - } - - @Override - public int hashCode() { - return Objects.hash(id, href, name, baseType, schemaLocation, type, _atReferredType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProductOfferingRef {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).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(" _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(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/po622/model/ProductOrder.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrder.java index b8a7a3848a6ed03409dbf75894c338c388a322d8..3598dd460f4434dda6d85ec1f53230a12e23b72c 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrder.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrder.java @@ -20,32 +20,45 @@ package org.etsi.osl.tmf.po622.model; import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.List; +import java.util.HashSet; import java.util.Objects; - +import java.util.Set; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.common.model.UserPartRoleType; import org.etsi.osl.tmf.common.model.service.Note; +import org.etsi.osl.tmf.pim637.model.BillingAccountRef; import org.etsi.osl.tmf.prm669.model.RelatedParty; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.Lob; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OneToOne; import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; /** - * A Product Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa, + * A Product Order is a type of order which can be used to place an order between a customer and a + * service provider or between a service provider and a partner and vice versa, */ -@Schema(description = "A Product Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa,") +@Schema( + description = "A Product Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa,") @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductOrder { +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", + date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") + +@Entity(name = "ProductOrder") +@JsonIgnoreProperties("orderRequester") +public class ProductOrder extends BaseRootEntity { @JsonProperty("id") private String id = null; - @JsonProperty("href") - private String href = null; - @JsonProperty("cancellationDate") private OffsetDateTime cancellationDate = null; @@ -55,13 +68,15 @@ public class ProductOrder { @JsonProperty("category") private String category = null; - @JsonProperty("completionDate") + private OffsetDateTime completionDate = null; + @Lob + @Column(name = "LDESCRIPTION", columnDefinition = "LONGTEXT") @JsonProperty("description") - private String description = null; + private String description = null;; + - @JsonProperty("expectedCompletionDate") private OffsetDateTime expectedCompletionDate = null; @JsonProperty("externalId") @@ -70,88 +85,87 @@ public class ProductOrder { @JsonProperty("notificationContact") private String notificationContact = null; - @JsonProperty("orderDate") private OffsetDateTime orderDate = null; @JsonProperty("priority") private String priority = null; - @JsonProperty("requestedCompletionDate") + private OffsetDateTime requestedCompletionDate = null; - @JsonProperty("requestedStartDate") private OffsetDateTime requestedStartDate = null; @JsonProperty("agreement") @Valid - private List<AgreementRef> agreement = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + private Set<AgreementRef> agreement = new HashSet<>(); @JsonProperty("billingAccount") + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "billing_acc_refuuid", referencedColumnName = "uuid") private BillingAccountRef billingAccount = null; @JsonProperty("channel") @Valid - private List<RelatedChannel> channel = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + private Set<RelatedChannel> channel = new HashSet<>(); @JsonProperty("note") @Valid - private List<Note> note = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + private Set<Note> note = new HashSet<>(); @JsonProperty("orderTotalPrice") @Valid - private List<OrderPrice> orderTotalPrice = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + private Set<OrderPrice> orderTotalPrice = new HashSet<>(); @JsonProperty("payment") @Valid - private List<PaymentRef> payment = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + private Set<PaymentRef> payment = new HashSet<>(); @JsonProperty("productOfferingQualification") @Valid - private List<ProductOfferingQualificationRef> productOfferingQualification = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + private Set<ProductOfferingQualificationRef> productOfferingQualification = new HashSet<>(); @JsonProperty("productOrderItem") @Valid - private List<ProductOrderItem> productOrderItem = new ArrayList<>(); + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + private Set<ProductOrderItem> productOrderItem = new HashSet<>(); @JsonProperty("quote") @Valid - private List<QuoteRef> quote = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + private Set<QuoteRef> quote = new HashSet<>(); @JsonProperty("relatedParty") @Valid - private List<RelatedParty> relatedParty = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + private Set<RelatedParty> relatedParty = new HashSet<>(); @JsonProperty("state") - private ProductOrderStateType state = null; - - @JsonProperty("@baseType") - private String baseType = null; + private ProductOrderStateType state = ProductOrderStateType.INITIAL; - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - @JsonProperty("@type") - private String type = null; - - public ProductOrder id(String id) { - this.id = id; - return this; - } /** * ID created on repository side (OM system) + * * @return id - **/ + **/ @Schema(description = "ID created on repository side (OM system)") - - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; + public String getId() { + if ((id != null) && (uuid == null)) { // this check is good for external partners when no uuid + // exists + return id; + } + return uuid; } + public ProductOrder href(String href) { this.href = href; return this; @@ -159,11 +173,12 @@ public class ProductOrder { /** * Hyperlink to access the order + * * @return href - **/ + **/ @Schema(description = "Hyperlink to access the order") - - public String getHref() { + + public String getHref() { return href; } @@ -177,13 +192,14 @@ public class ProductOrder { } /** - * Date when the order is cancelled. This is used when order is cancelled. + * Date when the order is cancelled. This is used when order is cancelled. + * * @return cancellationDate - **/ + **/ @Schema(description = "Date when the order is cancelled. This is used when order is cancelled. ") - - @Valid - public OffsetDateTime getCancellationDate() { + + @Valid + public OffsetDateTime getCancellationDate() { return cancellationDate; } @@ -197,12 +213,13 @@ public class ProductOrder { } /** - * Reason why the order is cancelled. This is used when order is cancelled. + * Reason why the order is cancelled. This is used when order is cancelled. + * * @return cancellationReason - **/ + **/ @Schema(description = "Reason why the order is cancelled. This is used when order is cancelled. ") - - public String getCancellationReason() { + + public String getCancellationReason() { return cancellationReason; } @@ -216,12 +233,15 @@ public class ProductOrder { } /** - * Used to categorize the order from a business perspective that can be useful for the OM system (e.g. \"enterprise\", \"residential\", ...) + * Used to categorize the order from a business perspective that can be useful for the OM system + * (e.g. \"enterprise\", \"residential\", ...) + * * @return category - **/ - @Schema(description = "Used to categorize the order from a business perspective that can be useful for the OM system (e.g. \"enterprise\", \"residential\", ...)") - - public String getCategory() { + **/ + @Schema( + description = "Used to categorize the order from a business perspective that can be useful for the OM system (e.g. \"enterprise\", \"residential\", ...)") + + public String getCategory() { return category; } @@ -236,12 +256,22 @@ public class ProductOrder { /** * Date when the order was completed + * * @return completionDate - **/ + **/ @Schema(description = "Date when the order was completed") - - @Valid - public OffsetDateTime getCompletionDate() { + + @Valid + @JsonProperty("completionDate") + public String getCompletionDateString() { + if (this.completionDate == null) { + return null; + } + return this.completionDate.toString(); + } + + @Valid + public OffsetDateTime getCompletionDate() { return completionDate; } @@ -249,6 +279,13 @@ public class ProductOrder { this.completionDate = completionDate; } + public void setCompletionDate(String completionDate) { + if (completionDate != null) { + this.completionDate = OffsetDateTime.parse(completionDate); + } + } + + public ProductOrder description(String description) { this.description = description; return this; @@ -256,11 +293,12 @@ public class ProductOrder { /** * Description of the product order + * * @return description - **/ + **/ @Schema(description = "Description of the product order") - - public String getDescription() { + + public String getDescription() { return description; } @@ -275,12 +313,22 @@ public class ProductOrder { /** * Expected delivery date amended by the provider + * * @return expectedCompletionDate - **/ + **/ @Schema(description = "Expected delivery date amended by the provider") - - @Valid - public OffsetDateTime getExpectedCompletionDate() { + + @JsonProperty("expectedCompletionDate") + public String getExpectedCompletionDateString() { + + if (this.expectedCompletionDate == null) { + return null; + } + return this.expectedCompletionDate.toString(); + } + + @Valid + public OffsetDateTime getExpectedCompletionDate() { return expectedCompletionDate; } @@ -288,6 +336,13 @@ public class ProductOrder { this.expectedCompletionDate = expectedCompletionDate; } + public void setExpectedCompletionDate(String expectedCompletionDate) { + if (expectedCompletionDate != null) { + this.expectedCompletionDate = OffsetDateTime.parse(expectedCompletionDate); + + } + } + public ProductOrder externalId(String externalId) { this.externalId = externalId; return this; @@ -295,11 +350,13 @@ public class ProductOrder { /** * ID given by the consumer and only understandable by him (to facilitate his searches afterwards) + * * @return externalId - **/ - @Schema(description = "ID given by the consumer and only understandable by him (to facilitate his searches afterwards)") - - public String getExternalId() { + **/ + @Schema( + description = "ID given by the consumer and only understandable by him (to facilitate his searches afterwards)") + + public String getExternalId() { return externalId; } @@ -314,11 +371,13 @@ public class ProductOrder { /** * Contact attached to the order to send back information regarding this order + * * @return notificationContact - **/ - @Schema(description = "Contact attached to the order to send back information regarding this order") - - public String getNotificationContact() { + **/ + @Schema( + description = "Contact attached to the order to send back information regarding this order") + + public String getNotificationContact() { return notificationContact; } @@ -333,12 +392,22 @@ public class ProductOrder { /** * Date when the order was created + * * @return orderDate - **/ + **/ @Schema(description = "Date when the order was created") - - @Valid - public OffsetDateTime getOrderDate() { + + @Valid + @JsonProperty("orderDate") + public String getOrderDateString() { + if (this.orderDate == null) { + return null; + } + return this.orderDate.toString(); + } + + @Valid + public OffsetDateTime getOrderDate() { return orderDate; } @@ -346,18 +415,29 @@ public class ProductOrder { this.orderDate = orderDate; } + public void setOrderDate(String orderDate) { + + if (orderDate != null) { + this.orderDate = OffsetDateTime.parse(orderDate); + + } + } + public ProductOrder priority(String priority) { this.priority = priority; return this; } /** - * A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest) + * A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the + * highest priority, and 4 the lowest) + * * @return priority - **/ - @Schema(description = "A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest)") - - public String getPriority() { + **/ + @Schema( + description = "A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest)") + + public String getPriority() { return priority; } @@ -372,12 +452,23 @@ public class ProductOrder { /** * Requested delivery date from the requestor perspective + * * @return requestedCompletionDate - **/ + **/ @Schema(description = "Requested delivery date from the requestor perspective") - - @Valid - public OffsetDateTime getRequestedCompletionDate() { + + @Valid + @JsonProperty("requestedCompletionDate") + public String getRequestedCompletionDateString() { + + if (this.requestedCompletionDate == null) { + return null; + } + return this.requestedCompletionDate.toString(); + } + + @Valid + public OffsetDateTime getRequestedCompletionDate() { return requestedCompletionDate; } @@ -385,19 +476,40 @@ public class ProductOrder { this.requestedCompletionDate = requestedCompletionDate; } + public void setRequestedCompletionDate(String requestedCompletionDate) { + + if (requestedCompletionDate != null) { + this.requestedCompletionDate = OffsetDateTime.parse(requestedCompletionDate); + + } + } + public ProductOrder requestedStartDate(OffsetDateTime requestedStartDate) { this.requestedStartDate = requestedStartDate; return this; } /** - * Order fulfillment start date wished by the requestor. This is used when, for any reason, requestor cannot allow seller to begin to operationally begin the fulfillment before a date. + * Order fulfillment start date wished by the requestor. This is used when, for any reason, + * requestor cannot allow seller to begin to operationally begin the fulfillment before a date. + * * @return requestedStartDate - **/ - @Schema(description = "Order fulfillment start date wished by the requestor. This is used when, for any reason, requestor cannot allow seller to begin to operationally begin the fulfillment before a date. ") - - @Valid - public OffsetDateTime getRequestedStartDate() { + **/ + @Schema( + description = "Order fulfillment start date wished by the requestor. This is used when, for any reason, requestor cannot allow seller to begin to operationally begin the fulfillment before a date. ") + + @Valid + @JsonProperty("requestedStartDate") + public String getRequestedStartDateString() { + + if (this.requestedStartDate == null) { + return null; + } + return this.requestedStartDate.toString(); + } + + @Valid + public OffsetDateTime getRequestedStartDate() { return requestedStartDate; } @@ -405,14 +517,23 @@ public class ProductOrder { this.requestedStartDate = requestedStartDate; } - public ProductOrder agreement(List<AgreementRef> agreement) { + + public void setRequestedStartDate(String requestedStartDate) { + + if (requestedStartDate != null) { + this.requestedStartDate = OffsetDateTime.parse(requestedStartDate); + + } + } + + public ProductOrder agreement(Set<AgreementRef> agreement) { this.agreement = agreement; return this; } public ProductOrder addAgreementItem(AgreementRef agreementItem) { if (this.agreement == null) { - this.agreement = new ArrayList<>(); + this.agreement = new HashSet<>(); } this.agreement.add(agreementItem); return this; @@ -420,15 +541,16 @@ public class ProductOrder { /** * A reference to an agreement defined in the context of the product order + * * @return agreement - **/ + **/ @Schema(description = "A reference to an agreement defined in the context of the product order") - @Valid - public List<AgreementRef> getAgreement() { + @Valid + public Set<AgreementRef> getAgreement() { return agreement; } - public void setAgreement(List<AgreementRef> agreement) { + public void setAgreement(Set<AgreementRef> agreement) { this.agreement = agreement; } @@ -439,12 +561,13 @@ public class ProductOrder { /** * Get billingAccount + * * @return billingAccount - **/ + **/ @Schema(description = "") - - @Valid - public BillingAccountRef getBillingAccount() { + + @Valid + public BillingAccountRef getBillingAccount() { return billingAccount; } @@ -452,14 +575,14 @@ public class ProductOrder { this.billingAccount = billingAccount; } - public ProductOrder channel(List<RelatedChannel> channel) { + public ProductOrder channel(Set<RelatedChannel> channel) { this.channel = channel; return this; } public ProductOrder addChannelItem(RelatedChannel channelItem) { if (this.channel == null) { - this.channel = new ArrayList<>(); + this.channel = new HashSet<>(); } this.channel.add(channelItem); return this; @@ -467,26 +590,27 @@ public class ProductOrder { /** * Get channel + * * @return channel - **/ + **/ @Schema(description = "") - @Valid - public List<RelatedChannel> getChannel() { + @Valid + public Set<RelatedChannel> getChannel() { return channel; } - public void setChannel(List<RelatedChannel> channel) { + public void setChannel(Set<RelatedChannel> channel) { this.channel = channel; } - public ProductOrder note(List<Note> note) { + public ProductOrder note(Set<Note> note) { this.note = note; return this; } public ProductOrder addNoteItem(Note noteItem) { if (this.note == null) { - this.note = new ArrayList<>(); + this.note = new HashSet<>(); } this.note.add(noteItem); return this; @@ -494,26 +618,27 @@ public class ProductOrder { /** * Get note + * * @return note - **/ + **/ @Schema(description = "") - @Valid - public List<Note> getNote() { + @Valid + public Set<Note> getNote() { return note; } - public void setNote(List<Note> note) { + public void setNote(Set<Note> note) { this.note = note; } - public ProductOrder orderTotalPrice(List<OrderPrice> orderTotalPrice) { + public ProductOrder orderTotalPrice(Set<OrderPrice> orderTotalPrice) { this.orderTotalPrice = orderTotalPrice; return this; } public ProductOrder addOrderTotalPriceItem(OrderPrice orderTotalPriceItem) { if (this.orderTotalPrice == null) { - this.orderTotalPrice = new ArrayList<>(); + this.orderTotalPrice = new HashSet<>(); } this.orderTotalPrice.add(orderTotalPriceItem); return this; @@ -521,26 +646,27 @@ public class ProductOrder { /** * Get orderTotalPrice + * * @return orderTotalPrice - **/ + **/ @Schema(description = "") - @Valid - public List<OrderPrice> getOrderTotalPrice() { + @Valid + public Set<OrderPrice> getOrderTotalPrice() { return orderTotalPrice; } - public void setOrderTotalPrice(List<OrderPrice> orderTotalPrice) { + public void setOrderTotalPrice(Set<OrderPrice> orderTotalPrice) { this.orderTotalPrice = orderTotalPrice; } - public ProductOrder payment(List<PaymentRef> payment) { + public ProductOrder payment(Set<PaymentRef> payment) { this.payment = payment; return this; } public ProductOrder addPaymentItem(PaymentRef paymentItem) { if (this.payment == null) { - this.payment = new ArrayList<>(); + this.payment = new HashSet<>(); } this.payment.add(paymentItem); return this; @@ -548,26 +674,29 @@ public class ProductOrder { /** * Get payment + * * @return payment - **/ + **/ @Schema(description = "") - @Valid - public List<PaymentRef> getPayment() { + @Valid + public Set<PaymentRef> getPayment() { return payment; } - public void setPayment(List<PaymentRef> payment) { + public void setPayment(Set<PaymentRef> payment) { this.payment = payment; } - public ProductOrder productOfferingQualification(List<ProductOfferingQualificationRef> productOfferingQualification) { + public ProductOrder productOfferingQualification( + Set<ProductOfferingQualificationRef> productOfferingQualification) { this.productOfferingQualification = productOfferingQualification; return this; } - public ProductOrder addProductOfferingQualificationItem(ProductOfferingQualificationRef productOfferingQualificationItem) { + public ProductOrder addProductOfferingQualificationItem( + ProductOfferingQualificationRef productOfferingQualificationItem) { if (this.productOfferingQualification == null) { - this.productOfferingQualification = new ArrayList<>(); + this.productOfferingQualification = new HashSet<>(); } this.productOfferingQualification.add(productOfferingQualificationItem); return this; @@ -575,19 +704,21 @@ public class ProductOrder { /** * Get productOfferingQualification + * * @return productOfferingQualification - **/ + **/ @Schema(description = "") - @Valid - public List<ProductOfferingQualificationRef> getProductOfferingQualification() { + @Valid + public Set<ProductOfferingQualificationRef> getProductOfferingQualification() { return productOfferingQualification; } - public void setProductOfferingQualification(List<ProductOfferingQualificationRef> productOfferingQualification) { + public void setProductOfferingQualification( + Set<ProductOfferingQualificationRef> productOfferingQualification) { this.productOfferingQualification = productOfferingQualification; } - public ProductOrder productOrderItem(List<ProductOrderItem> productOrderItem) { + public ProductOrder productOrderItem(Set<ProductOrderItem> productOrderItem) { this.productOrderItem = productOrderItem; return this; } @@ -599,27 +730,29 @@ public class ProductOrder { /** * Get productOrderItem + * * @return productOrderItem - **/ + **/ @Schema(description = "") - @NotNull - @Valid - @Size(min=1) public List<ProductOrderItem> getProductOrderItem() { + @NotNull + @Valid + @Size(min = 1) + public Set<ProductOrderItem> getProductOrderItem() { return productOrderItem; } - public void setProductOrderItem(List<ProductOrderItem> productOrderItem) { + public void setProductOrderItem(Set<ProductOrderItem> productOrderItem) { this.productOrderItem = productOrderItem; } - public ProductOrder quote(List<QuoteRef> quote) { + public ProductOrder quote(Set<QuoteRef> quote) { this.quote = quote; return this; } public ProductOrder addQuoteItem(QuoteRef quoteItem) { if (this.quote == null) { - this.quote = new ArrayList<>(); + this.quote = new HashSet<>(); } this.quote.add(quoteItem); return this; @@ -627,26 +760,27 @@ public class ProductOrder { /** * Get quote + * * @return quote - **/ + **/ @Schema(description = "") - @Valid - public List<QuoteRef> getQuote() { + @Valid + public Set<QuoteRef> getQuote() { return quote; } - public void setQuote(List<QuoteRef> quote) { + public void setQuote(Set<QuoteRef> quote) { this.quote = quote; } - public ProductOrder relatedParty(List<RelatedParty> relatedParty) { + public ProductOrder relatedParty(Set<RelatedParty> relatedParty) { this.relatedParty = relatedParty; return this; } public ProductOrder addRelatedPartyItem(RelatedParty relatedPartyItem) { if (this.relatedParty == null) { - this.relatedParty = new ArrayList<>(); + this.relatedParty = new HashSet<>(); } this.relatedParty.add(relatedPartyItem); return this; @@ -654,15 +788,16 @@ public class ProductOrder { /** * Get relatedParty + * * @return relatedParty - **/ + **/ @Schema(description = "") - @Valid - public List<RelatedParty> getRelatedParty() { + @Valid + public Set<RelatedParty> getRelatedParty() { return relatedParty; } - public void setRelatedParty(List<RelatedParty> relatedParty) { + public void setRelatedParty(Set<RelatedParty> relatedParty) { this.relatedParty = relatedParty; } @@ -673,12 +808,13 @@ public class ProductOrder { /** * Get state + * * @return state - **/ + **/ @Schema(description = "") - - @Valid - public ProductOrderStateType getState() { + + @Valid + public ProductOrderStateType getState() { return state; } @@ -693,11 +829,12 @@ public class ProductOrder { /** * When sub-classing, this defines the super-class + * * @return baseType - **/ + **/ @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { + + public String getAtBaseType() { return baseType; } @@ -712,11 +849,13 @@ public class ProductOrder { /** * A URI to a JSON-Schema file that defines additional attributes and relationships + * * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - public String getAtSchemaLocation() { + **/ + @Schema( + description = "A URI to a JSON-Schema file that defines additional attributes and relationships") + + public String getAtSchemaLocation() { return schemaLocation; } @@ -731,11 +870,12 @@ public class ProductOrder { /** * When sub-classing, this defines the sub-class entity name + * * @return type - **/ + **/ @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { + + public String getAtType() { return type; } @@ -753,46 +893,50 @@ public class ProductOrder { return false; } ProductOrder productOrder = (ProductOrder) o; - return Objects.equals(this.id, productOrder.id) && - Objects.equals(this.href, productOrder.href) && - Objects.equals(this.cancellationDate, productOrder.cancellationDate) && - Objects.equals(this.cancellationReason, productOrder.cancellationReason) && - Objects.equals(this.category, productOrder.category) && - Objects.equals(this.completionDate, productOrder.completionDate) && - Objects.equals(this.description, productOrder.description) && - Objects.equals(this.expectedCompletionDate, productOrder.expectedCompletionDate) && - Objects.equals(this.externalId, productOrder.externalId) && - Objects.equals(this.notificationContact, productOrder.notificationContact) && - Objects.equals(this.orderDate, productOrder.orderDate) && - Objects.equals(this.priority, productOrder.priority) && - Objects.equals(this.requestedCompletionDate, productOrder.requestedCompletionDate) && - Objects.equals(this.requestedStartDate, productOrder.requestedStartDate) && - Objects.equals(this.agreement, productOrder.agreement) && - Objects.equals(this.billingAccount, productOrder.billingAccount) && - Objects.equals(this.channel, productOrder.channel) && - Objects.equals(this.note, productOrder.note) && - Objects.equals(this.orderTotalPrice, productOrder.orderTotalPrice) && - Objects.equals(this.payment, productOrder.payment) && - Objects.equals(this.productOfferingQualification, productOrder.productOfferingQualification) && - Objects.equals(this.productOrderItem, productOrder.productOrderItem) && - Objects.equals(this.quote, productOrder.quote) && - Objects.equals(this.relatedParty, productOrder.relatedParty) && - Objects.equals(this.state, productOrder.state) && - Objects.equals(this.baseType, productOrder.baseType) && - Objects.equals(this.schemaLocation, productOrder.schemaLocation) && - Objects.equals(this.type, productOrder.type); + return Objects.equals(this.id, productOrder.id) && Objects.equals(this.href, productOrder.href) + && Objects.equals(this.cancellationDate, productOrder.cancellationDate) + && Objects.equals(this.cancellationReason, productOrder.cancellationReason) + && Objects.equals(this.category, productOrder.category) + && Objects.equals(this.completionDate, productOrder.completionDate) + && Objects.equals(this.description, productOrder.description) + && Objects.equals(this.expectedCompletionDate, productOrder.expectedCompletionDate) + && Objects.equals(this.externalId, productOrder.externalId) + && Objects.equals(this.notificationContact, productOrder.notificationContact) + && Objects.equals(this.orderDate, productOrder.orderDate) + && Objects.equals(this.priority, productOrder.priority) + && Objects.equals(this.requestedCompletionDate, productOrder.requestedCompletionDate) + && Objects.equals(this.requestedStartDate, productOrder.requestedStartDate) + && Objects.equals(this.agreement, productOrder.agreement) + && Objects.equals(this.billingAccount, productOrder.billingAccount) + && Objects.equals(this.channel, productOrder.channel) + && Objects.equals(this.note, productOrder.note) + && Objects.equals(this.orderTotalPrice, productOrder.orderTotalPrice) + && Objects.equals(this.payment, productOrder.payment) + && Objects.equals(this.productOfferingQualification, + productOrder.productOfferingQualification) + && Objects.equals(this.productOrderItem, productOrder.productOrderItem) + && Objects.equals(this.quote, productOrder.quote) + && Objects.equals(this.relatedParty, productOrder.relatedParty) + && Objects.equals(this.state, productOrder.state) + && Objects.equals(this.baseType, productOrder.baseType) + && Objects.equals(this.schemaLocation, productOrder.schemaLocation) + && Objects.equals(this.type, productOrder.type); } @Override public int hashCode() { - return Objects.hash(id, href, cancellationDate, cancellationReason, category, completionDate, description, expectedCompletionDate, externalId, notificationContact, orderDate, priority, requestedCompletionDate, requestedStartDate, agreement, billingAccount, channel, note, orderTotalPrice, payment, productOfferingQualification, productOrderItem, quote, relatedParty, state, baseType, schemaLocation, type); + return Objects.hash(id, href, cancellationDate, cancellationReason, category, completionDate, + description, expectedCompletionDate, externalId, notificationContact, orderDate, priority, + requestedCompletionDate, requestedStartDate, agreement, billingAccount, channel, note, + orderTotalPrice, payment, productOfferingQualification, productOrderItem, quote, + relatedParty, state, baseType, schemaLocation, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ProductOrder {\n"); - + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" href: ").append(toIndentedString(href)).append("\n"); sb.append(" cancellationDate: ").append(toIndentedString(cancellationDate)).append("\n"); @@ -800,12 +944,15 @@ public class ProductOrder { sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" completionDate: ").append(toIndentedString(completionDate)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" expectedCompletionDate: ").append(toIndentedString(expectedCompletionDate)).append("\n"); + sb.append(" expectedCompletionDate: ").append(toIndentedString(expectedCompletionDate)) + .append("\n"); sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); - sb.append(" notificationContact: ").append(toIndentedString(notificationContact)).append("\n"); + sb.append(" notificationContact: ").append(toIndentedString(notificationContact)) + .append("\n"); sb.append(" orderDate: ").append(toIndentedString(orderDate)).append("\n"); sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); - sb.append(" requestedCompletionDate: ").append(toIndentedString(requestedCompletionDate)).append("\n"); + sb.append(" requestedCompletionDate: ").append(toIndentedString(requestedCompletionDate)) + .append("\n"); sb.append(" requestedStartDate: ").append(toIndentedString(requestedStartDate)).append("\n"); sb.append(" agreement: ").append(toIndentedString(agreement)).append("\n"); sb.append(" billingAccount: ").append(toIndentedString(billingAccount)).append("\n"); @@ -813,7 +960,8 @@ public class ProductOrder { sb.append(" note: ").append(toIndentedString(note)).append("\n"); sb.append(" orderTotalPrice: ").append(toIndentedString(orderTotalPrice)).append("\n"); sb.append(" payment: ").append(toIndentedString(payment)).append("\n"); - sb.append(" productOfferingQualification: ").append(toIndentedString(productOfferingQualification)).append("\n"); + sb.append(" productOfferingQualification: ") + .append(toIndentedString(productOfferingQualification)).append("\n"); sb.append(" productOrderItem: ").append(toIndentedString(productOrderItem)).append("\n"); sb.append(" quote: ").append(toIndentedString(quote)).append("\n"); sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); @@ -826,8 +974,7 @@ public class ProductOrder { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * 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) { @@ -835,4 +982,25 @@ public class ProductOrder { } return o.toString().replace("\n", "\n "); } + + public ProductOrderItem findOrderItemById(String id) { + for (ProductOrderItem oi : this.productOrderItem) { + if (oi.getId().equals(id)) { + return oi; + } + } + return null; + } + + /** + * @return the PartyRole that made the request + */ + public RelatedParty getOrderRequester() { + for (RelatedParty rp : relatedParty) { + if (rp.getRole().equals(UserPartRoleType.REQUESTER.toString())) { + return rp; + } + } + return null; + } } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderAttributeValueChangeEvent.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderAttributeValueChangeEvent.java index 84c8851a582b16709a0d522b01cbf2fdcdb8e641..f2fe095351e5c29573f580d6e4ff6c8ca6be4b09 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderAttributeValueChangeEvent.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderAttributeValueChangeEvent.java @@ -21,11 +21,8 @@ package org.etsi.osl.tmf.po622.model; import java.time.OffsetDateTime; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; @@ -274,6 +271,9 @@ public class ProductOrderAttributeValueChangeEvent { @Valid public ProductOrderAttributeValueChangeEventPayload getEvent() { + if (event==null) { + event = new ProductOrderAttributeValueChangeEventPayload(); + } return event; } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderAttributeValueChangeEventPayload.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderAttributeValueChangeEventPayload.java index 28ebc7cf0a8888fc49274f2baddcc24155d71e10..e7cd65c1f0847d0e0ecf70c012e3468229969900 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderAttributeValueChangeEventPayload.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderAttributeValueChangeEventPayload.java @@ -20,11 +20,8 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderAttributeValueChangeNotification.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderAttributeValueChangeNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..1f240a148d8e31d38b6c4e21361d3bd684ba7262 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderAttributeValueChangeNotification.java @@ -0,0 +1,92 @@ +package org.etsi.osl.tmf.po622.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +public class ProductOrderAttributeValueChangeNotification extends Notification { + + + @JsonProperty("event") + private ProductOrderAttributeValueChangeEvent event = null; + + public ProductOrderAttributeValueChangeNotification eventId(String eventId) { + this.eventId = eventId; + return this; + } + + + + public ProductOrderAttributeValueChangeNotification event(ProductOrderAttributeValueChangeEvent event) { + this.event = event; + return this; + } + + /** + * The event linked to the involved resource object + * @return event + **/ + @Schema(description = "The event linked to the involved resource object") + + @Valid + + public ProductOrderAttributeValueChangeEvent getEvent() { + return event; + } + + public void setEvent(ProductOrderAttributeValueChangeEvent event) { + this.event = event; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductOrderAttributeValueChangeNotification productOrderAttributeValueChangeNotification = (ProductOrderAttributeValueChangeNotification) o; + return Objects.equals(this.eventId, productOrderAttributeValueChangeNotification.eventId) && + Objects.equals(this.eventTime, productOrderAttributeValueChangeNotification.eventTime) && + Objects.equals(this.eventType, productOrderAttributeValueChangeNotification.eventType) && + Objects.equals(this.fieldPath, productOrderAttributeValueChangeNotification.fieldPath) && + Objects.equals(this.resourcePath, productOrderAttributeValueChangeNotification.resourcePath) && + Objects.equals(this.event, productOrderAttributeValueChangeNotification.event); + } + + @Override + public int hashCode() { + return Objects.hash(eventId, eventTime, eventType, fieldPath, resourcePath, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductOrderAttributeValueChangeNotification {\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(" fieldPath: ").append(toIndentedString(fieldPath)).append("\n"); + sb.append(" resourcePath: ").append(toIndentedString(resourcePath)).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(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/po622/model/ProductOrderCreate.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreate.java index 7da8d3d1b95b0772eff6aa965ef22305b6a10141..fbd3f635fbc6a6eaeb275af0dcdd96f885985ee6 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreate.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreate.java @@ -23,9 +23,9 @@ import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; import org.etsi.osl.tmf.common.model.service.Note; +import org.etsi.osl.tmf.pim637.model.BillingAccountRef; import org.etsi.osl.tmf.prm669.model.RelatedParty; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; @@ -34,12 +34,17 @@ import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; /** - * A Product Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa, Skipped properties: id,href,completionDate,orderDate,state,expectedCompletionDate,productOrderItem.state + * A Product Order is a type of order which can be used to place an order between a customer and a + * service provider or between a service provider and a partner and vice versa, Skipped properties: + * id,href,completionDate,orderDate,state,expectedCompletionDate,productOrderItem.state */ -@Schema(description = "A Product Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa, Skipped properties: id,href,completionDate,orderDate,state,expectedCompletionDate,productOrderItem.state") +@Schema( + description = "A Product Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa, Skipped properties: id,href,completionDate,orderDate,state,expectedCompletionDate,productOrderItem.state") @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductOrderCreate { +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", + date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") +public class ProductOrderCreate { + @JsonProperty("cancellationDate") private OffsetDateTime cancellationDate = null; @@ -61,10 +66,8 @@ public class ProductOrderCreate { @JsonProperty("priority") private String priority = null; - @JsonProperty("requestedCompletionDate") private OffsetDateTime requestedCompletionDate = null; - @JsonProperty("requestedStartDate") private OffsetDateTime requestedStartDate = null; @JsonProperty("agreement") @@ -114,6 +117,10 @@ public class ProductOrderCreate { @JsonProperty("@type") private String type = null; + + //we don;t skip state..This allows us to put it immediately in acknowledged + @JsonProperty("state") + private ProductOrderStateType state = null; public ProductOrderCreate cancellationDate(OffsetDateTime cancellationDate) { this.cancellationDate = cancellationDate; @@ -121,13 +128,14 @@ public class ProductOrderCreate { } /** - * Date when the order is cancelled. This is used when order is cancelled. + * Date when the order is cancelled. This is used when order is cancelled. + * * @return cancellationDate - **/ + **/ @Schema(description = "Date when the order is cancelled. This is used when order is cancelled. ") - - @Valid - public OffsetDateTime getCancellationDate() { + + @Valid + public OffsetDateTime getCancellationDate() { return cancellationDate; } @@ -141,12 +149,13 @@ public class ProductOrderCreate { } /** - * Reason why the order is cancelled. This is used when order is cancelled. + * Reason why the order is cancelled. This is used when order is cancelled. + * * @return cancellationReason - **/ + **/ @Schema(description = "Reason why the order is cancelled. This is used when order is cancelled. ") - - public String getCancellationReason() { + + public String getCancellationReason() { return cancellationReason; } @@ -160,12 +169,15 @@ public class ProductOrderCreate { } /** - * Used to categorize the order from a business perspective that can be useful for the OM system (e.g. \"enterprise\", \"residential\", ...) + * Used to categorize the order from a business perspective that can be useful for the OM system + * (e.g. \"enterprise\", \"residential\", ...) + * * @return category - **/ - @Schema(description = "Used to categorize the order from a business perspective that can be useful for the OM system (e.g. \"enterprise\", \"residential\", ...)") - - public String getCategory() { + **/ + @Schema( + description = "Used to categorize the order from a business perspective that can be useful for the OM system (e.g. \"enterprise\", \"residential\", ...)") + + public String getCategory() { return category; } @@ -180,11 +192,12 @@ public class ProductOrderCreate { /** * Description of the product order + * * @return description - **/ + **/ @Schema(description = "Description of the product order") - - public String getDescription() { + + public String getDescription() { return description; } @@ -199,11 +212,13 @@ public class ProductOrderCreate { /** * ID given by the consumer and only understandable by him (to facilitate his searches afterwards) + * * @return externalId - **/ - @Schema(description = "ID given by the consumer and only understandable by him (to facilitate his searches afterwards)") - - public String getExternalId() { + **/ + @Schema( + description = "ID given by the consumer and only understandable by him (to facilitate his searches afterwards)") + + public String getExternalId() { return externalId; } @@ -218,11 +233,13 @@ public class ProductOrderCreate { /** * Contact attached to the order to send back information regarding this order + * * @return notificationContact - **/ - @Schema(description = "Contact attached to the order to send back information regarding this order") - - public String getNotificationContact() { + **/ + @Schema( + description = "Contact attached to the order to send back information regarding this order") + + public String getNotificationContact() { return notificationContact; } @@ -236,12 +253,15 @@ public class ProductOrderCreate { } /** - * A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest) + * A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the + * highest priority, and 4 the lowest) + * * @return priority - **/ - @Schema(description = "A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest)") - - public String getPriority() { + **/ + @Schema( + description = "A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest)") + + public String getPriority() { return priority; } @@ -256,32 +276,54 @@ public class ProductOrderCreate { /** * Requested delivery date from the requestor perspective + * * @return requestedCompletionDate - **/ + **/ @Schema(description = "Requested delivery date from the requestor perspective") - - @Valid - public OffsetDateTime getRequestedCompletionDate() { + + @Valid + public OffsetDateTime getRequestedCompletionDate() { return requestedCompletionDate; } + @JsonProperty("requestedCompletionDate") + public String getRequestedCompletionDateStr() { + if (requestedCompletionDate != null) { + return requestedCompletionDate.toString(); + } else { + return null; + } + } + + public void setRequestedCompletionDate(OffsetDateTime requestedCompletionDate) { this.requestedCompletionDate = requestedCompletionDate; } + public void setRequestedCompletionDate(String requestedCompletionDate) { + + if (requestedCompletionDate != null) { + this.requestedCompletionDate = OffsetDateTime.parse(requestedCompletionDate); + + } + } + public ProductOrderCreate requestedStartDate(OffsetDateTime requestedStartDate) { this.requestedStartDate = requestedStartDate; return this; } /** - * Order fulfillment start date wished by the requestor. This is used when, for any reason, requestor cannot allow seller to begin to operationally begin the fulfillment before a date. + * Order fulfillment start date wished by the requestor. This is used when, for any reason, + * requestor cannot allow seller to begin to operationally begin the fulfillment before a date. + * * @return requestedStartDate - **/ - @Schema(description = "Order fulfillment start date wished by the requestor. This is used when, for any reason, requestor cannot allow seller to begin to operationally begin the fulfillment before a date. ") - - @Valid - public OffsetDateTime getRequestedStartDate() { + **/ + @Schema( + description = "Order fulfillment start date wished by the requestor. This is used when, for any reason, requestor cannot allow seller to begin to operationally begin the fulfillment before a date. ") + + @Valid + public OffsetDateTime getRequestedStartDate() { return requestedStartDate; } @@ -289,6 +331,24 @@ public class ProductOrderCreate { this.requestedStartDate = requestedStartDate; } + public void setRequestedStartDate(String requestedStartDate) { + + if (requestedStartDate != null) { + this.requestedStartDate = OffsetDateTime.parse(requestedStartDate); + + } + } + + @JsonProperty("requestedStartDate") + public String getRequestedStartDateStr() { + + if (requestedStartDate != null) { + return requestedStartDate.toString(); + } + + return null; + } + public ProductOrderCreate agreement(List<AgreementRef> agreement) { this.agreement = agreement; return this; @@ -304,11 +364,12 @@ public class ProductOrderCreate { /** * A reference to an agreement defined in the context of the product order + * * @return agreement - **/ + **/ @Schema(description = "A reference to an agreement defined in the context of the product order") - @Valid - public List<AgreementRef> getAgreement() { + @Valid + public List<AgreementRef> getAgreement() { return agreement; } @@ -323,12 +384,13 @@ public class ProductOrderCreate { /** * Get billingAccount + * * @return billingAccount - **/ + **/ @Schema(description = "") - - @Valid - public BillingAccountRef getBillingAccount() { + + @Valid + public BillingAccountRef getBillingAccount() { return billingAccount; } @@ -351,11 +413,12 @@ public class ProductOrderCreate { /** * Get channel + * * @return channel - **/ + **/ @Schema(description = "") - @Valid - public List<RelatedChannel> getChannel() { + @Valid + public List<RelatedChannel> getChannel() { return channel; } @@ -378,11 +441,12 @@ public class ProductOrderCreate { /** * Get note + * * @return note - **/ + **/ @Schema(description = "") - @Valid - public List<Note> getNote() { + @Valid + public List<Note> getNote() { return note; } @@ -405,11 +469,12 @@ public class ProductOrderCreate { /** * Get orderTotalPrice + * * @return orderTotalPrice - **/ + **/ @Schema(description = "") - @Valid - public List<OrderPrice> getOrderTotalPrice() { + @Valid + public List<OrderPrice> getOrderTotalPrice() { return orderTotalPrice; } @@ -432,11 +497,12 @@ public class ProductOrderCreate { /** * Get payment + * * @return payment - **/ + **/ @Schema(description = "") - @Valid - public List<PaymentRef> getPayment() { + @Valid + public List<PaymentRef> getPayment() { return payment; } @@ -444,12 +510,14 @@ public class ProductOrderCreate { this.payment = payment; } - public ProductOrderCreate productOfferingQualification(List<ProductOfferingQualificationRef> productOfferingQualification) { + public ProductOrderCreate productOfferingQualification( + List<ProductOfferingQualificationRef> productOfferingQualification) { this.productOfferingQualification = productOfferingQualification; return this; } - public ProductOrderCreate addProductOfferingQualificationItem(ProductOfferingQualificationRef productOfferingQualificationItem) { + public ProductOrderCreate addProductOfferingQualificationItem( + ProductOfferingQualificationRef productOfferingQualificationItem) { if (this.productOfferingQualification == null) { this.productOfferingQualification = new ArrayList<>(); } @@ -459,15 +527,17 @@ public class ProductOrderCreate { /** * Get productOfferingQualification + * * @return productOfferingQualification - **/ + **/ @Schema(description = "") - @Valid - public List<ProductOfferingQualificationRef> getProductOfferingQualification() { + @Valid + public List<ProductOfferingQualificationRef> getProductOfferingQualification() { return productOfferingQualification; } - public void setProductOfferingQualification(List<ProductOfferingQualificationRef> productOfferingQualification) { + public void setProductOfferingQualification( + List<ProductOfferingQualificationRef> productOfferingQualification) { this.productOfferingQualification = productOfferingQualification; } @@ -483,12 +553,14 @@ public class ProductOrderCreate { /** * Get productOrderItem + * * @return productOrderItem - **/ + **/ @Schema(description = "") - @NotNull - @Valid - @Size(min=1) public List<ProductOrderItem> getProductOrderItem() { + @NotNull + @Valid + @Size(min = 1) + public List<ProductOrderItem> getProductOrderItem() { return productOrderItem; } @@ -511,11 +583,12 @@ public class ProductOrderCreate { /** * Get quote + * * @return quote - **/ + **/ @Schema(description = "") - @Valid - public List<QuoteRef> getQuote() { + @Valid + public List<QuoteRef> getQuote() { return quote; } @@ -538,11 +611,12 @@ public class ProductOrderCreate { /** * Get relatedParty + * * @return relatedParty - **/ + **/ @Schema(description = "") - @Valid - public List<RelatedParty> getRelatedParty() { + @Valid + public List<RelatedParty> getRelatedParty() { return relatedParty; } @@ -557,11 +631,12 @@ public class ProductOrderCreate { /** * When sub-classing, this defines the super-class + * * @return baseType - **/ + **/ @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { + + public String getAtBaseType() { return baseType; } @@ -576,17 +651,40 @@ public class ProductOrderCreate { /** * A URI to a JSON-Schema file that defines additional attributes and relationships + * * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - public String getAtSchemaLocation() { + **/ + @Schema( + description = "A URI to a JSON-Schema file that defines additional attributes and relationships") + + public String getAtSchemaLocation() { return schemaLocation; } public void setAtSchemaLocation(String schemaLocation) { this.schemaLocation = schemaLocation; } + + public ProductOrderCreate state(ProductOrderStateType state) { + this.state = state; + return this; + } + + /** + * Get state + * + * @return state + **/ + @Schema(description = "") + + @Valid + public ProductOrderStateType getState() { + return state; + } + + public void setState(ProductOrderStateType state) { + this.state = state; + } public ProductOrderCreate type(String type) { this.type = type; @@ -595,11 +693,12 @@ public class ProductOrderCreate { /** * When sub-classing, this defines the sub-class entity name + * * @return type - **/ + **/ @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { + + public String getAtType() { return type; } @@ -617,48 +716,54 @@ public class ProductOrderCreate { return false; } ProductOrderCreate productOrderCreate = (ProductOrderCreate) o; - return Objects.equals(this.cancellationDate, productOrderCreate.cancellationDate) && - Objects.equals(this.cancellationReason, productOrderCreate.cancellationReason) && - Objects.equals(this.category, productOrderCreate.category) && - Objects.equals(this.description, productOrderCreate.description) && - Objects.equals(this.externalId, productOrderCreate.externalId) && - Objects.equals(this.notificationContact, productOrderCreate.notificationContact) && - Objects.equals(this.priority, productOrderCreate.priority) && - Objects.equals(this.requestedCompletionDate, productOrderCreate.requestedCompletionDate) && - Objects.equals(this.requestedStartDate, productOrderCreate.requestedStartDate) && - Objects.equals(this.agreement, productOrderCreate.agreement) && - Objects.equals(this.billingAccount, productOrderCreate.billingAccount) && - Objects.equals(this.channel, productOrderCreate.channel) && - Objects.equals(this.note, productOrderCreate.note) && - Objects.equals(this.orderTotalPrice, productOrderCreate.orderTotalPrice) && - Objects.equals(this.payment, productOrderCreate.payment) && - Objects.equals(this.productOfferingQualification, productOrderCreate.productOfferingQualification) && - Objects.equals(this.productOrderItem, productOrderCreate.productOrderItem) && - Objects.equals(this.quote, productOrderCreate.quote) && - Objects.equals(this.relatedParty, productOrderCreate.relatedParty) && - Objects.equals(this.baseType, productOrderCreate.baseType) && - Objects.equals(this.schemaLocation, productOrderCreate.schemaLocation) && - Objects.equals(this.type, productOrderCreate.type); + return Objects.equals(this.cancellationDate, productOrderCreate.cancellationDate) + && Objects.equals(this.cancellationReason, productOrderCreate.cancellationReason) + && Objects.equals(this.category, productOrderCreate.category) + && Objects.equals(this.description, productOrderCreate.description) + && Objects.equals(this.externalId, productOrderCreate.externalId) + && Objects.equals(this.notificationContact, productOrderCreate.notificationContact) + && Objects.equals(this.priority, productOrderCreate.priority) + && Objects.equals(this.requestedCompletionDate, productOrderCreate.requestedCompletionDate) + && Objects.equals(this.requestedStartDate, productOrderCreate.requestedStartDate) + && Objects.equals(this.agreement, productOrderCreate.agreement) + && Objects.equals(this.billingAccount, productOrderCreate.billingAccount) + && Objects.equals(this.channel, productOrderCreate.channel) + && Objects.equals(this.note, productOrderCreate.note) + && Objects.equals(this.orderTotalPrice, productOrderCreate.orderTotalPrice) + && Objects.equals(this.payment, productOrderCreate.payment) + && Objects.equals(this.productOfferingQualification, + productOrderCreate.productOfferingQualification) + && Objects.equals(this.productOrderItem, productOrderCreate.productOrderItem) + && Objects.equals(this.quote, productOrderCreate.quote) + && Objects.equals(this.relatedParty, productOrderCreate.relatedParty) + && Objects.equals(this.baseType, productOrderCreate.baseType) + && Objects.equals(this.schemaLocation, productOrderCreate.schemaLocation) + && Objects.equals(this.type, productOrderCreate.type); } @Override public int hashCode() { - return Objects.hash(cancellationDate, cancellationReason, category, description, externalId, notificationContact, priority, requestedCompletionDate, requestedStartDate, agreement, billingAccount, channel, note, orderTotalPrice, payment, productOfferingQualification, productOrderItem, quote, relatedParty, baseType, schemaLocation, type); + return Objects.hash(cancellationDate, cancellationReason, category, description, externalId, + notificationContact, priority, requestedCompletionDate, requestedStartDate, agreement, + billingAccount, channel, note, orderTotalPrice, payment, productOfferingQualification, + productOrderItem, quote, relatedParty, baseType, schemaLocation, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ProductOrderCreate {\n"); - + sb.append(" cancellationDate: ").append(toIndentedString(cancellationDate)).append("\n"); sb.append(" cancellationReason: ").append(toIndentedString(cancellationReason)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); - sb.append(" notificationContact: ").append(toIndentedString(notificationContact)).append("\n"); + sb.append(" notificationContact: ").append(toIndentedString(notificationContact)) + .append("\n"); sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); - sb.append(" requestedCompletionDate: ").append(toIndentedString(requestedCompletionDate)).append("\n"); + sb.append(" requestedCompletionDate: ").append(toIndentedString(requestedCompletionDate)) + .append("\n"); sb.append(" requestedStartDate: ").append(toIndentedString(requestedStartDate)).append("\n"); sb.append(" agreement: ").append(toIndentedString(agreement)).append("\n"); sb.append(" billingAccount: ").append(toIndentedString(billingAccount)).append("\n"); @@ -666,7 +771,8 @@ public class ProductOrderCreate { sb.append(" note: ").append(toIndentedString(note)).append("\n"); sb.append(" orderTotalPrice: ").append(toIndentedString(orderTotalPrice)).append("\n"); sb.append(" payment: ").append(toIndentedString(payment)).append("\n"); - sb.append(" productOfferingQualification: ").append(toIndentedString(productOfferingQualification)).append("\n"); + sb.append(" productOfferingQualification: ") + .append(toIndentedString(productOfferingQualification)).append("\n"); sb.append(" productOrderItem: ").append(toIndentedString(productOrderItem)).append("\n"); sb.append(" quote: ").append(toIndentedString(quote)).append("\n"); sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); @@ -678,8 +784,7 @@ public class ProductOrderCreate { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * 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) { diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreateEvent.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreateEvent.java index 4bbbc94ec5f7bc3ba9aed107aec04832793ef214..f49750ddae92c9bb1a94bc4d5fc1313c800a338f 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreateEvent.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreateEvent.java @@ -21,11 +21,8 @@ package org.etsi.osl.tmf.po622.model; import java.time.OffsetDateTime; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; @@ -296,6 +293,9 @@ public class ProductOrderCreateEvent { @Valid public ProductOrderCreateEventPayload getEvent() { + if (event==null) { + event = new ProductOrderCreateEventPayload(); + } return event; } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreateEventPayload.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreateEventPayload.java index f89b45db0ec823740a0bc988b02e50497b56bdc5..9dd985f1112da0bf1651d151d51d541166806a71 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreateEventPayload.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreateEventPayload.java @@ -20,11 +20,8 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreateNotification.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreateNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..29d452210bf6dbe9107d0f5c0116232e3909d4e4 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreateNotification.java @@ -0,0 +1,91 @@ +package org.etsi.osl.tmf.po622.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +public class ProductOrderCreateNotification extends Notification { + + @JsonProperty("event") + private ProductOrderCreateEvent event = null; + + public ProductOrderCreateNotification eventId(String eventId) { + this.eventId = eventId; + return this; + } + + + + public ProductOrderCreateNotification event(ProductOrderCreateEvent event) { + this.event = event; + return this; + } + + /** + * The event linked to the involved resource object + * @return event + **/ + @Schema(description = "The event linked to the involved resource object") + + @Valid + + public ProductOrderCreateEvent getEvent() { + return event; + } + + public void setEvent(ProductOrderCreateEvent event) { + this.event = event; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductOrderCreateNotification prodOrderCreateNotification = (ProductOrderCreateNotification) o; + return Objects.equals(this.eventId, prodOrderCreateNotification.eventId) && + Objects.equals(this.eventTime, prodOrderCreateNotification.eventTime) && + Objects.equals(this.eventType, prodOrderCreateNotification.eventType) && + Objects.equals(this.fieldPath, prodOrderCreateNotification.fieldPath) && + Objects.equals(this.resourcePath, prodOrderCreateNotification.resourcePath) && + Objects.equals(this.event, prodOrderCreateNotification.event); + } + + @Override + public int hashCode() { + return Objects.hash(eventId, eventTime, eventType, fieldPath, resourcePath, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductOrderCreateNotification {\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(" fieldPath: ").append(toIndentedString(fieldPath)).append("\n"); + sb.append(" resourcePath: ").append(toIndentedString(resourcePath)).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(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/po622/model/ProductOrderDeleteEvent.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderDeleteEvent.java index dd87d1c2594fba8e898da2403214a417ca8db98f..e4f4d2965521a9c108c59eeb871583e991f313b8 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderDeleteEvent.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderDeleteEvent.java @@ -21,11 +21,8 @@ package org.etsi.osl.tmf.po622.model; import java.time.OffsetDateTime; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; @@ -296,6 +293,9 @@ public class ProductOrderDeleteEvent { @Valid public ProductOrderDeleteEventPayload getEvent() { + if (event==null) { + event = new ProductOrderDeleteEventPayload(); + } return event; } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderDeleteEventPayload.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderDeleteEventPayload.java index 94de1d9401fe89347312f8f2c2dacf029dfcb130..474cdc8d9004d73053bbca2c555c19ffb51f492a 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderDeleteEventPayload.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderDeleteEventPayload.java @@ -20,11 +20,8 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderDeleteNotification.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderDeleteNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..a88c4b578f309e4d1f14017cfaf5ba105198722c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderDeleteNotification.java @@ -0,0 +1,92 @@ +package org.etsi.osl.tmf.po622.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +public class ProductOrderDeleteNotification extends Notification { + + + @JsonProperty("event") + private ProductOrderDeleteEvent event = null; + + public ProductOrderDeleteNotification eventId(String eventId) { + this.eventId = eventId; + return this; + } + + + + public ProductOrderDeleteNotification event(ProductOrderDeleteEvent event) { + this.event = event; + return this; + } + + /** + * The event linked to the involved resource object + * @return event + **/ + @Schema(description = "The event linked to the involved resource object") + + @Valid + + public ProductOrderDeleteEvent getEvent() { + return event; + } + + public void setEvent(ProductOrderDeleteEvent event) { + this.event = event; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductOrderDeleteNotification productOrderDeleteNotification = (ProductOrderDeleteNotification) o; + return Objects.equals(this.eventId, productOrderDeleteNotification.eventId) && + Objects.equals(this.eventTime, productOrderDeleteNotification.eventTime) && + Objects.equals(this.eventType, productOrderDeleteNotification.eventType) && + Objects.equals(this.fieldPath, productOrderDeleteNotification.fieldPath) && + Objects.equals(this.resourcePath, productOrderDeleteNotification.resourcePath) && + Objects.equals(this.event, productOrderDeleteNotification.event); + } + + @Override + public int hashCode() { + return Objects.hash(eventId, eventTime, eventType, fieldPath, resourcePath, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductOrderDeleteNotification {\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(" fieldPath: ").append(toIndentedString(fieldPath)).append("\n"); + sb.append(" resourcePath: ").append(toIndentedString(resourcePath)).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(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/po622/model/ProductOrderInformationRequiredEvent.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderInformationRequiredEvent.java index 38a85af6c8b9818eea00504db1d7c9abaf391876..ab26a297734dc6675ec1720d50097f6f83a4d85e 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderInformationRequiredEvent.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderInformationRequiredEvent.java @@ -21,11 +21,8 @@ package org.etsi.osl.tmf.po622.model; import java.time.OffsetDateTime; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderInformationRequiredEventPayload.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderInformationRequiredEventPayload.java index 603295d4eb3468dba906c2eb5d27701a4f76da6e..d0743f12e1578e3506dd64077362c44f969be12e 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderInformationRequiredEventPayload.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderInformationRequiredEventPayload.java @@ -20,11 +20,8 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderItem.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderItem.java index a2dcbb8d0562635acd83bc54fc289b228d4cb21b..a9042a24d7dd0931597a77ba54bdc6e955b51904 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderItem.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderItem.java @@ -19,15 +19,22 @@ */ package org.etsi.osl.tmf.po622.model; -import java.util.ArrayList; -import java.util.List; +import java.util.HashSet; import java.util.Objects; - +import java.util.Set; import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.pcm620.model.ProductOfferingRef; +import org.etsi.osl.tmf.pim637.model.BillingAccountRef; +import org.etsi.osl.tmf.pim637.model.ProductRef; +import org.etsi.osl.tmf.pim637.model.ProductRefOrValue; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.OneToMany; +import jakarta.persistence.OneToOne; import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; @@ -37,7 +44,8 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "An identified part of the order. A product order is decomposed into one or more order items.") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductOrderItem { +@Entity(name = "POItem622") +public class ProductOrderItem extends BaseRootEntity { @JsonProperty("id") private String id = null; @@ -48,67 +56,73 @@ public class ProductOrderItem { private OrderItemActionType action = null; @JsonProperty("appointment") + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "appoint_refuuid", referencedColumnName = "uuid") private AppointmentRef appointment = null; @JsonProperty("billingAccount") + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "billing_acc_refuuid", referencedColumnName = "uuid") private BillingAccountRef billingAccount = null; @JsonProperty("itemPrice") @Valid - private List<OrderPrice> itemPrice = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set<OrderPrice> itemPrice = new HashSet<>(); @JsonProperty("itemTerm") @Valid - private List<OrderTerm> itemTerm = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set<OrderTerm> itemTerm = new HashSet<>(); @JsonProperty("itemTotalPrice") @Valid - private List<OrderPrice> itemTotalPrice = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set<OrderPrice> itemTotalPrice = new HashSet<>(); @JsonProperty("payment") @Valid - private List<PaymentRef> payment = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set<PaymentRef> payment = new HashSet<>(); @JsonProperty("product") + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "prod_refuuid", referencedColumnName = "uuid") private ProductRefOrValue product = null; @JsonProperty("productOffering") + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "prodoff_refuuid", referencedColumnName = "uuid") private ProductOfferingRef productOffering = null; @JsonProperty("productOfferingQualificationItem") + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "prodoffqual_refuuid", referencedColumnName = "uuid") private ProductOfferingQualificationItemRef productOfferingQualificationItem = null; @JsonProperty("productOrderItem") @Valid - private List<ProductOrderItem> productOrderItem = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set<ProductOrderItem> productOrderItem = new HashSet<>(); @JsonProperty("productOrderItemRelationship") @Valid - private List<OrderItemRelationship> productOrderItemRelationship = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set<OrderItemRelationship> productOrderItemRelationship = new HashSet<>(); @JsonProperty("qualification") @Valid - private List<ProductOfferingQualificationRef> qualification = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set<ProductOfferingQualificationRef> qualification = new HashSet<>(); @JsonProperty("quoteItem") + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "qitem_refuuid", referencedColumnName = "uuid") private QuoteItemRef quoteItem = null; @JsonProperty("state") - private ProductOrderItemStateType state = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; + private ProductOrderItemStateType state = ProductOrderItemStateType.INITIAL; - @JsonProperty("@type") - private String type = null; - - public ProductOrderItem id(String id) { - this.id = id; - return this; - } /** * Identifier of the line item (generally it is a sequence number 01, 02, 03, ...) @@ -118,12 +132,9 @@ public class ProductOrderItem { @NotNull public String getId() { - return id; + return uuid; } - public void setId(String id) { - this.id = id; - } public ProductOrderItem quantity(Integer quantity) { this.quantity = quantity; @@ -205,14 +216,14 @@ public class ProductOrderItem { this.billingAccount = billingAccount; } - public ProductOrderItem itemPrice(List<OrderPrice> itemPrice) { + public ProductOrderItem itemPrice(Set<OrderPrice> itemPrice) { this.itemPrice = itemPrice; return this; } public ProductOrderItem addItemPriceItem(OrderPrice itemPriceItem) { if (this.itemPrice == null) { - this.itemPrice = new ArrayList<>(); + this.itemPrice = new HashSet<>(); } this.itemPrice.add(itemPriceItem); return this; @@ -224,22 +235,22 @@ public class ProductOrderItem { **/ @Schema(description = "") @Valid - public List<OrderPrice> getItemPrice() { + public Set<OrderPrice> getItemPrice() { return itemPrice; } - public void setItemPrice(List<OrderPrice> itemPrice) { + public void setItemPrice(Set<OrderPrice> itemPrice) { this.itemPrice = itemPrice; } - public ProductOrderItem itemTerm(List<OrderTerm> itemTerm) { + public ProductOrderItem itemTerm(Set<OrderTerm> itemTerm) { this.itemTerm = itemTerm; return this; } public ProductOrderItem addItemTermItem(OrderTerm itemTermItem) { if (this.itemTerm == null) { - this.itemTerm = new ArrayList<>(); + this.itemTerm = new HashSet<>(); } this.itemTerm.add(itemTermItem); return this; @@ -251,22 +262,22 @@ public class ProductOrderItem { **/ @Schema(description = "") @Valid - public List<OrderTerm> getItemTerm() { + public Set<OrderTerm> getItemTerm() { return itemTerm; } - public void setItemTerm(List<OrderTerm> itemTerm) { + public void setItemTerm(Set<OrderTerm> itemTerm) { this.itemTerm = itemTerm; } - public ProductOrderItem itemTotalPrice(List<OrderPrice> itemTotalPrice) { + public ProductOrderItem itemTotalPrice(Set<OrderPrice> itemTotalPrice) { this.itemTotalPrice = itemTotalPrice; return this; } public ProductOrderItem addItemTotalPriceItem(OrderPrice itemTotalPriceItem) { if (this.itemTotalPrice == null) { - this.itemTotalPrice = new ArrayList<>(); + this.itemTotalPrice = new HashSet<>(); } this.itemTotalPrice.add(itemTotalPriceItem); return this; @@ -278,22 +289,22 @@ public class ProductOrderItem { **/ @Schema(description = "") @Valid - public List<OrderPrice> getItemTotalPrice() { + public Set<OrderPrice> getItemTotalPrice() { return itemTotalPrice; } - public void setItemTotalPrice(List<OrderPrice> itemTotalPrice) { + public void setItemTotalPrice(Set<OrderPrice> itemTotalPrice) { this.itemTotalPrice = itemTotalPrice; } - public ProductOrderItem payment(List<PaymentRef> payment) { + public ProductOrderItem payment(Set<PaymentRef> payment) { this.payment = payment; return this; } public ProductOrderItem addPaymentItem(PaymentRef paymentItem) { if (this.payment == null) { - this.payment = new ArrayList<>(); + this.payment = new HashSet<>(); } this.payment.add(paymentItem); return this; @@ -305,11 +316,11 @@ public class ProductOrderItem { **/ @Schema(description = "") @Valid - public List<PaymentRef> getPayment() { + public Set<PaymentRef> getPayment() { return payment; } - public void setPayment(List<PaymentRef> payment) { + public void setPayment(Set<PaymentRef> payment) { this.payment = payment; } @@ -373,15 +384,12 @@ public class ProductOrderItem { this.productOfferingQualificationItem = productOfferingQualificationItem; } - public ProductOrderItem productOrderItem(List<ProductOrderItem> productOrderItem) { + public ProductOrderItem productOrderItem(Set<ProductOrderItem> productOrderItem) { this.productOrderItem = productOrderItem; return this; } public ProductOrderItem addProductOrderItemItem(ProductOrderItem productOrderItemItem) { - if (this.productOrderItem == null) { - this.productOrderItem = new ArrayList<>(); - } this.productOrderItem.add(productOrderItemItem); return this; } @@ -392,22 +400,22 @@ public class ProductOrderItem { **/ @Schema(description = "") @Valid - public List<ProductOrderItem> getProductOrderItem() { + public Set<ProductOrderItem> getProductOrderItem() { return productOrderItem; } - public void setProductOrderItem(List<ProductOrderItem> productOrderItem) { + public void setProductOrderItem(Set<ProductOrderItem> productOrderItem) { this.productOrderItem = productOrderItem; } - public ProductOrderItem productOrderItemRelationship(List<OrderItemRelationship> productOrderItemRelationship) { + public ProductOrderItem productOrderItemRelationship(Set<OrderItemRelationship> productOrderItemRelationship) { this.productOrderItemRelationship = productOrderItemRelationship; return this; } public ProductOrderItem addProductOrderItemRelationshipItem(OrderItemRelationship productOrderItemRelationshipItem) { if (this.productOrderItemRelationship == null) { - this.productOrderItemRelationship = new ArrayList<>(); + this.productOrderItemRelationship = new HashSet<>(); } this.productOrderItemRelationship.add(productOrderItemRelationshipItem); return this; @@ -419,22 +427,22 @@ public class ProductOrderItem { **/ @Schema(description = "") @Valid - public List<OrderItemRelationship> getProductOrderItemRelationship() { + public Set<OrderItemRelationship> getProductOrderItemRelationship() { return productOrderItemRelationship; } - public void setProductOrderItemRelationship(List<OrderItemRelationship> productOrderItemRelationship) { + public void setProductOrderItemRelationship(Set<OrderItemRelationship> productOrderItemRelationship) { this.productOrderItemRelationship = productOrderItemRelationship; } - public ProductOrderItem qualification(List<ProductOfferingQualificationRef> qualification) { + public ProductOrderItem qualification(Set<ProductOfferingQualificationRef> qualification) { this.qualification = qualification; return this; } public ProductOrderItem addQualificationItem(ProductOfferingQualificationRef qualificationItem) { if (this.qualification == null) { - this.qualification = new ArrayList<>(); + this.qualification = new HashSet<>(); } this.qualification.add(qualificationItem); return this; @@ -446,11 +454,11 @@ public class ProductOrderItem { **/ @Schema(description = "") @Valid - public List<ProductOfferingQualificationRef> getQualification() { + public Set<ProductOfferingQualificationRef> getQualification() { return qualification; } - public void setQualification(List<ProductOfferingQualificationRef> qualification) { + public void setQualification(Set<ProductOfferingQualificationRef> qualification) { this.qualification = qualification; } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderItemStateType.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderItemStateType.java index 1fff283fd0a1aeb933020610f5adabe6b1e3ea56..423f489ce5d76d46502144de40759d02a69e927b 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderItemStateType.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderItemStateType.java @@ -26,16 +26,17 @@ import com.fasterxml.jackson.annotation.JsonValue; * Possible values for the state of the product order item */ public enum ProductOrderItemStateType { - ACKNOWLEDGED("acknowledged"), - REJECTED("rejected"), - PENDING("pending"), - HELD("held"), - INPROGRESS("inProgress"), - CANCELLED("cancelled"), - COMPLETED("completed"), - FAILED("failed"), - ASSESSINGCANCELLATION("assessingCancellation"), - PENDINGCANCELLATION("pendingCancellation"); + INITIAL("INITIAL"), + ACKNOWLEDGED("ACKNOWLEDGED"), + REJECTED("REJECTED"), + PENDING("PENDING"), + HELD("HELD"), + INPROGRESS("INPROGRESS"), + CANCELLED("CANCELLED"), + COMPLETED("COMPLETED"), + FAILED("FAILED"), + ASSESSINGCANCELLATION("ASSESSINGCANCELLATION"), + PENDINGCANCELLATION("PENDINGCANCELLATION"); private String value; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderMapper.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..f6c7a411c40d62fd3839d68c0405e3d9cce1f989 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderMapper.java @@ -0,0 +1,155 @@ +package org.etsi.osl.tmf.po622.model; + +import java.util.List; +import java.util.Set; +import org.etsi.osl.tmf.common.model.Any; +import org.etsi.osl.tmf.common.model.service.Characteristic; +import org.etsi.osl.tmf.common.model.service.Note; +import org.etsi.osl.tmf.common.model.service.ResourceRef; +import org.etsi.osl.tmf.common.model.service.ServiceRef; +import org.etsi.osl.tmf.prm669.model.RelatedParty; +import org.etsi.osl.tmf.so641.model.ServiceOrderRelationship; +import org.mapstruct.BeanMapping; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.mapstruct.MappingTarget; +import org.mapstruct.NullValueCheckStrategy; +import org.mapstruct.NullValueMappingStrategy; +import org.mapstruct.NullValuePropertyMappingStrategy; + +@Mapper(nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT, + nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) +public interface ProductOrderMapper { + + @Mapping(target = "uuid", ignore = true) + @Mapping(target = "baseType", ignore = true) + @Mapping(target = "href", ignore = true) + @Mapping(target = "schemaLocation", ignore = true) + @Mapping(target = "type", ignore = true) + ProductOrder fromProductOrderUpdate(ProductOrderUpdate rpdto); + + + + @Mapping(target = "baseType", ignore = true) + @Mapping(target = "schemaLocation", ignore = true) + @Mapping(target = "href", ignore = true) + @Mapping(target = "type", ignore = true) + @Mapping(target = "uuid", ignore = true) + @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE) + @Mapping(target = "productOrderItem", expression = "java(updateProductOrderItem(entity, updateEntity))") + @Mapping(target = "note", expression = "java(updateNote(entity, updateEntity))") + @Mapping(target = "relatedParty", expression = "java(updateRelatedParty(entity, updateEntity))") + ProductOrder updateProductOrder(@MappingTarget ProductOrder entity, + ProductOrderUpdate updateEntity); + + default Set<ProductOrderItem> updateProductOrderItem(ProductOrder so, + ProductOrderUpdate updateEntity) { + if (updateEntity.getProductOrderItem() != null) { + for (ProductOrderItem soiUpd : updateEntity.getProductOrderItem()) { + ProductOrderItem soiOrigin = so.findOrderItemById(soiUpd.getId()); + if (soiOrigin != null) { + soiOrigin = updateOrderItem(soiOrigin, soiUpd); + + + /** + * When we patch the order and see a MODIFY or DELETE action, we set the state to + * ACKNOWLEDGED + */ + if (soiOrigin.getAction().equals(OrderItemActionType.MODIFY) + || soiOrigin.getAction().equals(OrderItemActionType.DELETE)) { + soiOrigin.setState(ProductOrderItemStateType.ACKNOWLEDGED); + so.setState(ProductOrderStateType.ACKNOWLEDGED); + + + } + + }else { + so.addProductOrderItemItem(soiUpd); + } + } + } + return so.getProductOrderItem(); + } + + + default ProductOrderItem updateOrderItem(final ProductOrderItem soi, final ProductOrderItem soiUpd) { + ProductOrderItem soiOrigin = soi; + if (soiUpd.getAction() != null) { + soiOrigin.setAction(soiUpd.getAction()); + } + + + + if (soiUpd.getProductOffering() != null) { + soiOrigin.setProductOffering(soiUpd.getProductOffering()); + } + + if (soiUpd.getProduct() != null) { + if (soiOrigin.getProduct() == null) { + soiOrigin.setProduct(soiUpd.getProduct()); + } else { + soiOrigin.getProduct().setStatus(soiUpd.getProduct().getStatus());// this probably will + // change only + soiOrigin.getProduct().setName(soiUpd.getProduct().getName()); + + + for (Characteristic updChar : soiUpd.getProduct().getProductCharacteristic()) { + String charname = updChar.getName(); + Characteristic originChar = soiOrigin.getProduct().findCharacteristicByName(charname); + if ((originChar != null) && (updChar != null) && (originChar.getValue() != null) + && (originChar.getValue().getValue() != null) && (updChar.getValue() != null)) { + if (!originChar.getValue().getValue().equals(updChar.getValue().getValue())) { + originChar.setValue(new Any(updChar.getValue())); + } + } else if ((originChar != null) && (originChar.getValue() == null) + && (updChar.getValue() != null)) { + originChar.setValue(new Any(updChar.getValue())); + } + } + + // we need also to update supportingServices + for (ServiceRef serviceRef : soiUpd.getProduct().getRealizingService()) { + if (soiOrigin.getProduct().getRealizingServiceById(serviceRef.getId()) == null) { + soiOrigin.getProduct().addRealizingServiceItem(serviceRef); + } + } + + for (ResourceRef resourceRef : soiUpd.getProduct().getRealizingResource()) { + if (soiOrigin.getProduct().getRealizingResourceById(resourceRef.getId()) == null) { + soiOrigin.getProduct().addRealizingResourceItem(resourceRef); + } + } + + + } + } + return soiOrigin; + } + + + + default Set<Note> updateNote(ProductOrder so, ProductOrderUpdate updateEntity) { + if (updateEntity.getNote() != null) { + for (Note n : updateEntity.getNote()) { + if (n.getUuid() == null) { + so.addNoteItem(n); + } + } + + } + return so.getNote(); + } + + default Set<RelatedParty> updateRelatedParty(ProductOrder so, ProductOrderUpdate updateEntity) { + if (updateEntity.getRelatedParty() != null) { + for (RelatedParty n : updateEntity.getRelatedParty()) { + if (n.getUuid() == null) { + so.addRelatedPartyItem(n); + } + } + } + return so.getRelatedParty(); + } + + +} diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderRef.java index 3f9c0ebc819f15942017179da9d4f0832b4de5da..b6b0162b907fde895b09b21749f86cea7bca9cf2 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderRef.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderRef.java @@ -20,11 +20,8 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateChangeEvent.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateChangeEvent.java index 613e5c7d861858e5e1e5ccb22b6cdd8feffeac0c..00b751a34a488fe038a9654a23019fd41ea986fb 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateChangeEvent.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateChangeEvent.java @@ -21,11 +21,8 @@ package org.etsi.osl.tmf.po622.model; import java.time.OffsetDateTime; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; @@ -296,6 +293,9 @@ public class ProductOrderStateChangeEvent { @Valid public ProductOrderStateChangeEventPayload getEvent() { + if (event==null) { + event = new ProductOrderStateChangeEventPayload(); + } return event; } diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateChangeEventPayload.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateChangeEventPayload.java index 3ca7b78837b469f4a93552919ec81a02123d7a7b..37e3b872a9bbfd79a36f3f0955a6f8ecf052fa55 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateChangeEventPayload.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateChangeEventPayload.java @@ -20,11 +20,8 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateChangeNotification.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateChangeNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..4fb2115154dffbc8190ff30fb4905f7be2d784f2 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateChangeNotification.java @@ -0,0 +1,90 @@ +package org.etsi.osl.tmf.po622.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +public class ProductOrderStateChangeNotification extends Notification { + + @JsonProperty("event") + private ProductOrderStateChangeEvent event = null; + + public ProductOrderStateChangeNotification eventId(String eventId) { + this.eventId = eventId; + return this; + } + + + + public ProductOrderStateChangeNotification event(ProductOrderStateChangeEvent event) { + this.event = event; + return this; + } + + /** + * The event linked to the involved resource object + * @return event + **/ + @Schema(description = "The event linked to the involved resource object") + + @Valid + + public ProductOrderStateChangeEvent getEvent() { + return event; + } + + public void setEvent(ProductOrderStateChangeEvent event) { + this.event = event; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductOrderStateChangeNotification productOrderStateChangeNotification = (ProductOrderStateChangeNotification) o; + return Objects.equals(this.eventId, productOrderStateChangeNotification.eventId) && + Objects.equals(this.eventTime, productOrderStateChangeNotification.eventTime) && + Objects.equals(this.eventType, productOrderStateChangeNotification.eventType) && + Objects.equals(this.fieldPath, productOrderStateChangeNotification.fieldPath) && + Objects.equals(this.resourcePath, productOrderStateChangeNotification.resourcePath) && + Objects.equals(this.event, productOrderStateChangeNotification.event); + } + + @Override + public int hashCode() { + return Objects.hash(eventId, eventTime, eventType, fieldPath, resourcePath, event); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductOrderStateChangeNotification {\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(" fieldPath: ").append(toIndentedString(fieldPath)).append("\n"); + sb.append(" resourcePath: ").append(toIndentedString(resourcePath)).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(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/po622/model/ProductOrderStateType.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateType.java index f6766150efc32f11df5816e670cc786786a5211b..dd26b1bc245f4ad34ba08a20a5b6622b51b5a0b0 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateType.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateType.java @@ -26,17 +26,18 @@ import com.fasterxml.jackson.annotation.JsonValue; * Possible values for the state of the order */ public enum ProductOrderStateType { - ACKNOWLEDGED("acknowledged"), - REJECTED("rejected"), - PENDING("pending"), - HELD("held"), - INPROGRESS("inProgress"), - CANCELLED("cancelled"), - COMPLETED("completed"), - FAILED("failed"), - PARTIAL("partial"), - ASSESSINGCANCELLATION("assessingCancellation"), - PENDINGCANCELLATION("pendingCancellation"); + INITIAL("INITIAL"), + ACKNOWLEDGED("ACKNOWLEDGED"), + REJECTED("REJECTED"), + PENDING("PENDING"), + HELD("HELD"), + INPROGRESS("INPROGRESS"), + CANCELLED("CANCELLED"), + COMPLETED("COMPLETED"), + FAILED("FAILED"), + PARTIAL("PARTIAL"), + ASSESSINGCANCELLATION("ASSESSINGCANCELLATION"), + PENDINGCANCELLATION("PENDINGCANCELLATION"); private String value; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderUpdate.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderUpdate.java index ddef47a6244d23c6a0ea947b73a76637b3a8f965..e705a5ac48d91435435e97a24fb37c80963eb071 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderUpdate.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderUpdate.java @@ -23,9 +23,9 @@ import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; import org.etsi.osl.tmf.common.model.service.Note; +import org.etsi.osl.tmf.pim637.model.BillingAccountRef; import org.etsi.osl.tmf.prm669.model.RelatedParty; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; @@ -34,12 +34,16 @@ import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; /** - * A Product Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa, Skipped properties: id,href,orderDate + * A Product Order is a type of order which can be used to place an order between a customer and a + * service provider or between a service provider and a partner and vice versa, Skipped properties: + * id,href,orderDate */ -@Schema(description = "A Product Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa, Skipped properties: id,href,orderDate") +@Schema( + description = "A Product Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa, Skipped properties: id,href,orderDate") @Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductOrderUpdate { +@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", + date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") +public class ProductOrderUpdate { @JsonProperty("cancellationDate") private OffsetDateTime cancellationDate = null; @@ -49,13 +53,12 @@ public class ProductOrderUpdate { @JsonProperty("category") private String category = null; - @JsonProperty("completionDate") + private OffsetDateTime completionDate = null; @JsonProperty("description") private String description = null; - @JsonProperty("expectedCompletionDate") private OffsetDateTime expectedCompletionDate = null; @JsonProperty("externalId") @@ -67,10 +70,8 @@ public class ProductOrderUpdate { @JsonProperty("priority") private String priority = null; - @JsonProperty("requestedCompletionDate") private OffsetDateTime requestedCompletionDate = null; - @JsonProperty("requestedStartDate") private OffsetDateTime requestedStartDate = null; @JsonProperty("agreement") @@ -130,13 +131,14 @@ public class ProductOrderUpdate { } /** - * Date when the order is cancelled. This is used when order is cancelled. + * Date when the order is cancelled. This is used when order is cancelled. + * * @return cancellationDate - **/ + **/ @Schema(description = "Date when the order is cancelled. This is used when order is cancelled. ") - - @Valid - public OffsetDateTime getCancellationDate() { + + @Valid + public OffsetDateTime getCancellationDate() { return cancellationDate; } @@ -150,12 +152,13 @@ public class ProductOrderUpdate { } /** - * Reason why the order is cancelled. This is used when order is cancelled. + * Reason why the order is cancelled. This is used when order is cancelled. + * * @return cancellationReason - **/ + **/ @Schema(description = "Reason why the order is cancelled. This is used when order is cancelled. ") - - public String getCancellationReason() { + + public String getCancellationReason() { return cancellationReason; } @@ -169,12 +172,15 @@ public class ProductOrderUpdate { } /** - * Used to categorize the order from a business perspective that can be useful for the OM system (e.g. \"enterprise\", \"residential\", ...) + * Used to categorize the order from a business perspective that can be useful for the OM system + * (e.g. \"enterprise\", \"residential\", ...) + * * @return category - **/ - @Schema(description = "Used to categorize the order from a business perspective that can be useful for the OM system (e.g. \"enterprise\", \"residential\", ...)") - - public String getCategory() { + **/ + @Schema( + description = "Used to categorize the order from a business perspective that can be useful for the OM system (e.g. \"enterprise\", \"residential\", ...)") + + public String getCategory() { return category; } @@ -189,12 +195,13 @@ public class ProductOrderUpdate { /** * Date when the order was completed + * * @return completionDate - **/ + **/ @Schema(description = "Date when the order was completed") - - @Valid - public OffsetDateTime getCompletionDate() { + + @Valid + public OffsetDateTime getCompletionDate() { return completionDate; } @@ -207,13 +214,33 @@ public class ProductOrderUpdate { return this; } + @JsonProperty("completionDate") + + public String getCompletionDateStr() { + if (completionDate != null) { + return completionDate.toString(); + } else { + return null; + } + } + + public void setCompletionDate(String completionDate) { + + if (completionDate != null) { + this.completionDate = OffsetDateTime.parse(completionDate); + + } + } + + /** * Description of the product order + * * @return description - **/ + **/ @Schema(description = "Description of the product order") - - public String getDescription() { + + public String getDescription() { return description; } @@ -228,19 +255,37 @@ public class ProductOrderUpdate { /** * Expected delivery date amended by the provider + * * @return expectedCompletionDate - **/ + **/ @Schema(description = "Expected delivery date amended by the provider") - - @Valid - public OffsetDateTime getExpectedCompletionDate() { + + @Valid + public OffsetDateTime getExpectedCompletionDate() { return expectedCompletionDate; } + @JsonProperty("expectedCompletionDate") + public String getExpectedCompletionDateStr() { + if (expectedCompletionDate != null) { + return expectedCompletionDate.toString(); + } else { + return null; + } + } + public void setExpectedCompletionDate(OffsetDateTime expectedCompletionDate) { this.expectedCompletionDate = expectedCompletionDate; } + public void setExpectedCompletionDate(String expectedCompletionDate) { + + if (expectedCompletionDate != null) { + this.expectedCompletionDate = OffsetDateTime.parse(expectedCompletionDate); + + } + } + public ProductOrderUpdate externalId(String externalId) { this.externalId = externalId; return this; @@ -248,11 +293,13 @@ public class ProductOrderUpdate { /** * ID given by the consumer and only understandable by him (to facilitate his searches afterwards) + * * @return externalId - **/ - @Schema(description = "ID given by the consumer and only understandable by him (to facilitate his searches afterwards)") - - public String getExternalId() { + **/ + @Schema( + description = "ID given by the consumer and only understandable by him (to facilitate his searches afterwards)") + + public String getExternalId() { return externalId; } @@ -267,11 +314,13 @@ public class ProductOrderUpdate { /** * Contact attached to the order to send back information regarding this order + * * @return notificationContact - **/ - @Schema(description = "Contact attached to the order to send back information regarding this order") - - public String getNotificationContact() { + **/ + @Schema( + description = "Contact attached to the order to send back information regarding this order") + + public String getNotificationContact() { return notificationContact; } @@ -285,12 +334,15 @@ public class ProductOrderUpdate { } /** - * A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest) + * A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the + * highest priority, and 4 the lowest) + * * @return priority - **/ - @Schema(description = "A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest)") - - public String getPriority() { + **/ + @Schema( + description = "A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest)") + + public String getPriority() { return priority; } @@ -303,14 +355,32 @@ public class ProductOrderUpdate { return this; } + @JsonProperty("requestedCompletionDate") + public String getRequestedCompletionDateStr() { + if (requestedCompletionDate != null) { + return requestedCompletionDate.toString(); + } else { + return null; + } + } + + public void setRequestedCompletionDate(String requestedCompletionDate) { + + if (requestedCompletionDate != null) { + this.requestedCompletionDate = OffsetDateTime.parse(requestedCompletionDate); + + } + } + /** * Requested delivery date from the requestor perspective + * * @return requestedCompletionDate - **/ + **/ @Schema(description = "Requested delivery date from the requestor perspective") - - @Valid - public OffsetDateTime getRequestedCompletionDate() { + + @Valid + public OffsetDateTime getRequestedCompletionDate() { return requestedCompletionDate; } @@ -324,19 +394,40 @@ public class ProductOrderUpdate { } /** - * Order fulfillment start date wished by the requestor. This is used when, for any reason, requestor cannot allow seller to begin to operationally begin the fulfillment before a date. + * Order fulfillment start date wished by the requestor. This is used when, for any reason, + * requestor cannot allow seller to begin to operationally begin the fulfillment before a date. + * * @return requestedStartDate - **/ - @Schema(description = "Order fulfillment start date wished by the requestor. This is used when, for any reason, requestor cannot allow seller to begin to operationally begin the fulfillment before a date. ") - - @Valid - public OffsetDateTime getRequestedStartDate() { + **/ + @Schema( + description = "Order fulfillment start date wished by the requestor. This is used when, for any reason, requestor cannot allow seller to begin to operationally begin the fulfillment before a date. ") + + @Valid + public OffsetDateTime getRequestedStartDate() { return requestedStartDate; } public void setRequestedStartDate(OffsetDateTime requestedStartDate) { this.requestedStartDate = requestedStartDate; } + + @JsonProperty("requestedStartDate") + public String getRequestedStartDateStr() { + + if (requestedStartDate != null) { + return requestedStartDate.toString(); + } + + return null; + } + + public void setRequestedStartDate(String requestedStartDate) { + + if (requestedStartDate != null) { + this.requestedStartDate = OffsetDateTime.parse(requestedStartDate); + + } + } public ProductOrderUpdate agreement(List<AgreementRef> agreement) { this.agreement = agreement; @@ -353,11 +444,12 @@ public class ProductOrderUpdate { /** * A reference to an agreement defined in the context of the product order + * * @return agreement - **/ + **/ @Schema(description = "A reference to an agreement defined in the context of the product order") - @Valid - public List<AgreementRef> getAgreement() { + @Valid + public List<AgreementRef> getAgreement() { return agreement; } @@ -372,12 +464,13 @@ public class ProductOrderUpdate { /** * Get billingAccount + * * @return billingAccount - **/ + **/ @Schema(description = "") - - @Valid - public BillingAccountRef getBillingAccount() { + + @Valid + public BillingAccountRef getBillingAccount() { return billingAccount; } @@ -400,11 +493,12 @@ public class ProductOrderUpdate { /** * Get channel + * * @return channel - **/ + **/ @Schema(description = "") - @Valid - public List<RelatedChannel> getChannel() { + @Valid + public List<RelatedChannel> getChannel() { return channel; } @@ -427,11 +521,12 @@ public class ProductOrderUpdate { /** * Get note + * * @return note - **/ + **/ @Schema(description = "") - @Valid - public List<Note> getNote() { + @Valid + public List<Note> getNote() { return note; } @@ -454,11 +549,12 @@ public class ProductOrderUpdate { /** * Get orderTotalPrice + * * @return orderTotalPrice - **/ + **/ @Schema(description = "") - @Valid - public List<OrderPrice> getOrderTotalPrice() { + @Valid + public List<OrderPrice> getOrderTotalPrice() { return orderTotalPrice; } @@ -481,11 +577,12 @@ public class ProductOrderUpdate { /** * Get payment + * * @return payment - **/ + **/ @Schema(description = "") - @Valid - public List<PaymentRef> getPayment() { + @Valid + public List<PaymentRef> getPayment() { return payment; } @@ -493,12 +590,14 @@ public class ProductOrderUpdate { this.payment = payment; } - public ProductOrderUpdate productOfferingQualification(List<ProductOfferingQualificationRef> productOfferingQualification) { + public ProductOrderUpdate productOfferingQualification( + List<ProductOfferingQualificationRef> productOfferingQualification) { this.productOfferingQualification = productOfferingQualification; return this; } - public ProductOrderUpdate addProductOfferingQualificationItem(ProductOfferingQualificationRef productOfferingQualificationItem) { + public ProductOrderUpdate addProductOfferingQualificationItem( + ProductOfferingQualificationRef productOfferingQualificationItem) { if (this.productOfferingQualification == null) { this.productOfferingQualification = new ArrayList<>(); } @@ -508,15 +607,17 @@ public class ProductOrderUpdate { /** * Get productOfferingQualification + * * @return productOfferingQualification - **/ + **/ @Schema(description = "") - @Valid - public List<ProductOfferingQualificationRef> getProductOfferingQualification() { + @Valid + public List<ProductOfferingQualificationRef> getProductOfferingQualification() { return productOfferingQualification; } - public void setProductOfferingQualification(List<ProductOfferingQualificationRef> productOfferingQualification) { + public void setProductOfferingQualification( + List<ProductOfferingQualificationRef> productOfferingQualification) { this.productOfferingQualification = productOfferingQualification; } @@ -532,12 +633,14 @@ public class ProductOrderUpdate { /** * Get productOrderItem + * * @return productOrderItem - **/ + **/ @Schema(description = "") - @NotNull - @Valid - @Size(min=1) public List<ProductOrderItem> getProductOrderItem() { + @NotNull + @Valid + @Size(min = 1) + public List<ProductOrderItem> getProductOrderItem() { return productOrderItem; } @@ -560,11 +663,12 @@ public class ProductOrderUpdate { /** * Get quote + * * @return quote - **/ + **/ @Schema(description = "") - @Valid - public List<QuoteRef> getQuote() { + @Valid + public List<QuoteRef> getQuote() { return quote; } @@ -587,11 +691,12 @@ public class ProductOrderUpdate { /** * Get relatedParty + * * @return relatedParty - **/ + **/ @Schema(description = "") - @Valid - public List<RelatedParty> getRelatedParty() { + @Valid + public List<RelatedParty> getRelatedParty() { return relatedParty; } @@ -606,12 +711,13 @@ public class ProductOrderUpdate { /** * Get state + * * @return state - **/ + **/ @Schema(description = "") - - @Valid - public ProductOrderStateType getState() { + + @Valid + public ProductOrderStateType getState() { return state; } @@ -626,11 +732,12 @@ public class ProductOrderUpdate { /** * When sub-classing, this defines the super-class + * * @return baseType - **/ + **/ @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { + + public String getAtBaseType() { return baseType; } @@ -645,11 +752,13 @@ public class ProductOrderUpdate { /** * A URI to a JSON-Schema file that defines additional attributes and relationships + * * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - public String getAtSchemaLocation() { + **/ + @Schema( + description = "A URI to a JSON-Schema file that defines additional attributes and relationships") + + public String getAtSchemaLocation() { return schemaLocation; } @@ -664,11 +773,12 @@ public class ProductOrderUpdate { /** * When sub-classing, this defines the sub-class entity name + * * @return type - **/ + **/ @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { + + public String getAtType() { return type; } @@ -686,53 +796,61 @@ public class ProductOrderUpdate { return false; } ProductOrderUpdate productOrderUpdate = (ProductOrderUpdate) o; - return Objects.equals(this.cancellationDate, productOrderUpdate.cancellationDate) && - Objects.equals(this.cancellationReason, productOrderUpdate.cancellationReason) && - Objects.equals(this.category, productOrderUpdate.category) && - Objects.equals(this.completionDate, productOrderUpdate.completionDate) && - Objects.equals(this.description, productOrderUpdate.description) && - Objects.equals(this.expectedCompletionDate, productOrderUpdate.expectedCompletionDate) && - Objects.equals(this.externalId, productOrderUpdate.externalId) && - Objects.equals(this.notificationContact, productOrderUpdate.notificationContact) && - Objects.equals(this.priority, productOrderUpdate.priority) && - Objects.equals(this.requestedCompletionDate, productOrderUpdate.requestedCompletionDate) && - Objects.equals(this.requestedStartDate, productOrderUpdate.requestedStartDate) && - Objects.equals(this.agreement, productOrderUpdate.agreement) && - Objects.equals(this.billingAccount, productOrderUpdate.billingAccount) && - Objects.equals(this.channel, productOrderUpdate.channel) && - Objects.equals(this.note, productOrderUpdate.note) && - Objects.equals(this.orderTotalPrice, productOrderUpdate.orderTotalPrice) && - Objects.equals(this.payment, productOrderUpdate.payment) && - Objects.equals(this.productOfferingQualification, productOrderUpdate.productOfferingQualification) && - Objects.equals(this.productOrderItem, productOrderUpdate.productOrderItem) && - Objects.equals(this.quote, productOrderUpdate.quote) && - Objects.equals(this.relatedParty, productOrderUpdate.relatedParty) && - Objects.equals(this.state, productOrderUpdate.state) && - Objects.equals(this.baseType, productOrderUpdate.baseType) && - Objects.equals(this.schemaLocation, productOrderUpdate.schemaLocation) && - Objects.equals(this.type, productOrderUpdate.type); + return Objects.equals(this.cancellationDate, productOrderUpdate.cancellationDate) + && Objects.equals(this.cancellationReason, productOrderUpdate.cancellationReason) + && Objects.equals(this.category, productOrderUpdate.category) + && Objects.equals(this.completionDate, productOrderUpdate.completionDate) + && Objects.equals(this.description, productOrderUpdate.description) + && Objects.equals(this.expectedCompletionDate, productOrderUpdate.expectedCompletionDate) + && Objects.equals(this.externalId, productOrderUpdate.externalId) + && Objects.equals(this.notificationContact, productOrderUpdate.notificationContact) + && Objects.equals(this.priority, productOrderUpdate.priority) + && Objects.equals(this.requestedCompletionDate, productOrderUpdate.requestedCompletionDate) + && Objects.equals(this.requestedStartDate, productOrderUpdate.requestedStartDate) + && Objects.equals(this.agreement, productOrderUpdate.agreement) + && Objects.equals(this.billingAccount, productOrderUpdate.billingAccount) + && Objects.equals(this.channel, productOrderUpdate.channel) + && Objects.equals(this.note, productOrderUpdate.note) + && Objects.equals(this.orderTotalPrice, productOrderUpdate.orderTotalPrice) + && Objects.equals(this.payment, productOrderUpdate.payment) + && Objects.equals(this.productOfferingQualification, + productOrderUpdate.productOfferingQualification) + && Objects.equals(this.productOrderItem, productOrderUpdate.productOrderItem) + && Objects.equals(this.quote, productOrderUpdate.quote) + && Objects.equals(this.relatedParty, productOrderUpdate.relatedParty) + && Objects.equals(this.state, productOrderUpdate.state) + && Objects.equals(this.baseType, productOrderUpdate.baseType) + && Objects.equals(this.schemaLocation, productOrderUpdate.schemaLocation) + && Objects.equals(this.type, productOrderUpdate.type); } @Override public int hashCode() { - return Objects.hash(cancellationDate, cancellationReason, category, completionDate, description, expectedCompletionDate, externalId, notificationContact, priority, requestedCompletionDate, requestedStartDate, agreement, billingAccount, channel, note, orderTotalPrice, payment, productOfferingQualification, productOrderItem, quote, relatedParty, state, baseType, schemaLocation, type); + return Objects.hash(cancellationDate, cancellationReason, category, completionDate, description, + expectedCompletionDate, externalId, notificationContact, priority, requestedCompletionDate, + requestedStartDate, agreement, billingAccount, channel, note, orderTotalPrice, payment, + productOfferingQualification, productOrderItem, quote, relatedParty, state, baseType, + schemaLocation, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ProductOrderUpdate {\n"); - + sb.append(" cancellationDate: ").append(toIndentedString(cancellationDate)).append("\n"); sb.append(" cancellationReason: ").append(toIndentedString(cancellationReason)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" completionDate: ").append(toIndentedString(completionDate)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" expectedCompletionDate: ").append(toIndentedString(expectedCompletionDate)).append("\n"); + sb.append(" expectedCompletionDate: ").append(toIndentedString(expectedCompletionDate)) + .append("\n"); sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n"); - sb.append(" notificationContact: ").append(toIndentedString(notificationContact)).append("\n"); + sb.append(" notificationContact: ").append(toIndentedString(notificationContact)) + .append("\n"); sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); - sb.append(" requestedCompletionDate: ").append(toIndentedString(requestedCompletionDate)).append("\n"); + sb.append(" requestedCompletionDate: ").append(toIndentedString(requestedCompletionDate)) + .append("\n"); sb.append(" requestedStartDate: ").append(toIndentedString(requestedStartDate)).append("\n"); sb.append(" agreement: ").append(toIndentedString(agreement)).append("\n"); sb.append(" billingAccount: ").append(toIndentedString(billingAccount)).append("\n"); @@ -740,7 +858,8 @@ public class ProductOrderUpdate { sb.append(" note: ").append(toIndentedString(note)).append("\n"); sb.append(" orderTotalPrice: ").append(toIndentedString(orderTotalPrice)).append("\n"); sb.append(" payment: ").append(toIndentedString(payment)).append("\n"); - sb.append(" productOfferingQualification: ").append(toIndentedString(productOfferingQualification)).append("\n"); + sb.append(" productOfferingQualification: ") + .append(toIndentedString(productOfferingQualification)).append("\n"); sb.append(" productOrderItem: ").append(toIndentedString(productOrderItem)).append("\n"); sb.append(" quote: ").append(toIndentedString(quote)).append("\n"); sb.append(" relatedParty: ").append(toIndentedString(relatedParty)).append("\n"); @@ -753,8 +872,7 @@ public class ProductOrderUpdate { } /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). + * 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) { diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductSpecificationRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductSpecificationRef.java deleted file mode 100644 index 02b30f6eabf04b7f5d1bc2ca9f68285d6f25a260..0000000000000000000000000000000000000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductSpecificationRef.java +++ /dev/null @@ -1,293 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; - -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import org.springframework.validation.annotation.Validated; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.Valid; -import jakarta.validation.constraints.NotNull; - -/** - * Product specification reference: A ProductSpecification is a detailed description of a tangible or intangible object made available externally in the form of a ProductOffering to customers or other parties playing a party role. - */ -@Schema(description = "Product specification reference: A ProductSpecification is a detailed description of a tangible or intangible object made available externally in the form of a ProductOffering to customers or other parties playing a party role.") -@Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductSpecificationRef { - @JsonProperty("id") - private String id = null; - - @JsonProperty("href") - private String href = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("version") - private String version = null; - - @JsonProperty("targetProductSchema") - private TargetProductSchema targetProductSchema = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; - - @JsonProperty("@referredType") - private String _atReferredType = null; - - public ProductSpecificationRef id(String id) { - this.id = id; - return this; - } - - /** - * Unique identifier of a related entity. - * @return id - **/ - @Schema(description = "Unique identifier of a related entity.") - @NotNull - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public ProductSpecificationRef href(String href) { - this.href = href; - return this; - } - - /** - * Reference of the related entity. - * @return href - **/ - @Schema(description = "Reference of the related entity.") - - public String getHref() { - return href; - } - - public void setHref(String href) { - this.href = href; - } - - public ProductSpecificationRef name(String name) { - this.name = name; - return this; - } - - /** - * Name of the related entity. - * @return name - **/ - @Schema(description = "Name of the related entity.") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ProductSpecificationRef version(String version) { - this.version = version; - return this; - } - - /** - * Version of the product specification - * @return version - **/ - @Schema(description = "Version of the product specification") - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public ProductSpecificationRef targetProductSchema(TargetProductSchema targetProductSchema) { - this.targetProductSchema = targetProductSchema; - return this; - } - - /** - * Get targetProductSchema - * @return targetProductSchema - **/ - @Schema(description = "") - - @Valid - public TargetProductSchema getTargetProductSchema() { - return targetProductSchema; - } - - public void setTargetProductSchema(TargetProductSchema targetProductSchema) { - this.targetProductSchema = targetProductSchema; - } - - public ProductSpecificationRef baseType(String baseType) { - this.baseType = baseType; - return this; - } - - /** - * When sub-classing, this defines the super-class - * @return baseType - **/ - @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { - return baseType; - } - - public void setAtBaseType(String baseType) { - this.baseType = baseType; - } - - public ProductSpecificationRef schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - public String getAtSchemaLocation() { - return schemaLocation; - } - - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - public ProductSpecificationRef type(String type) { - this.type = type; - return this; - } - - /** - * When sub-classing, this defines the sub-class entity name - * @return type - **/ - @Schema(description = "When sub-classing, this defines the sub-class entity name") - - public String getAtType() { - return type; - } - - public void setAtType(String type) { - this.type = type; - } - - public ProductSpecificationRef _atReferredType(String _atReferredType) { - this._atReferredType = _atReferredType; - return this; - } - - /** - * The actual type of the target instance when needed for disambiguation. - * @return _atReferredType - **/ - @Schema(description = "The actual type of the target instance when needed for disambiguation.") - - public String getAtReferredType() { - return _atReferredType; - } - - public void setAtReferredType(String _atReferredType) { - this._atReferredType = _atReferredType; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProductSpecificationRef productSpecificationRef = (ProductSpecificationRef) o; - return Objects.equals(this.id, productSpecificationRef.id) && - Objects.equals(this.href, productSpecificationRef.href) && - Objects.equals(this.name, productSpecificationRef.name) && - Objects.equals(this.version, productSpecificationRef.version) && - Objects.equals(this.targetProductSchema, productSpecificationRef.targetProductSchema) && - Objects.equals(this.baseType, productSpecificationRef.baseType) && - Objects.equals(this.schemaLocation, productSpecificationRef.schemaLocation) && - Objects.equals(this.type, productSpecificationRef.type) && - Objects.equals(this._atReferredType, productSpecificationRef._atReferredType); - } - - @Override - public int hashCode() { - return Objects.hash(id, href, name, version, targetProductSchema, baseType, schemaLocation, type, _atReferredType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProductSpecificationRef {\n"); - - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" version: ").append(toIndentedString(version)).append("\n"); - sb.append(" targetProductSchema: ").append(toIndentedString(targetProductSchema)).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(" _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(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/po622/model/ProductStatusType.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductStatusType.java deleted file mode 100644 index a5717e066d0c3717710f46a6e3990c226d98c1c4..0000000000000000000000000000000000000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductStatusType.java +++ /dev/null @@ -1,59 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Possible values for the status of the product - */ -public enum ProductStatusType { - CREATED("created"), - PENDINGACTIVE("pendingActive"), - CANCELLED("cancelled"), - ACTIVE("active"), - PENDINGTERMINATE("pendingTerminate"), - TERMINATED("terminated"), - SUSPENDED("suspended"), - ABORTED_("aborted "); - - private String value; - - ProductStatusType(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ProductStatusType fromValue(String text) { - for (ProductStatusType b : ProductStatusType.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } -} diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/QuoteItemRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/QuoteItemRef.java index 9ce513c9081d879f26f86c1967208918a531ed3b..7b9a91ff67cee82931009a20d4c0048b5b0a095a 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/QuoteItemRef.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/QuoteItemRef.java @@ -20,12 +20,11 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; /** @@ -34,16 +33,11 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "It's a Quote item that has been executed previously.") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class QuoteItemRef { +@Entity(name = "QuoteItRef622") +public class QuoteItemRef extends BaseRootNamedEntity { @JsonProperty("id") private String id = null; - @JsonProperty("href") - private String href = null; - - @JsonProperty("name") - private String name = null; - @JsonProperty("quoteHref") private String quoteHref = null; @@ -53,14 +47,6 @@ public class QuoteItemRef { @JsonProperty("quoteName") private String quoteName = null; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; @JsonProperty("@referredType") private String _atReferredType = null; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/QuoteRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/QuoteRef.java index 39278ba46f5f8c0cb72b4a6e597ced2a8c61dd7d..563306e92fcb94eb12e35b2d9a76f243e24077eb 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/QuoteRef.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/QuoteRef.java @@ -20,12 +20,11 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; /** @@ -34,24 +33,11 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "It's a Quote that has been executed previously") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class QuoteRef { +@Entity(name = "QuoteRef622") +public class QuoteRef extends BaseRootNamedEntity { @JsonProperty("id") private String id = null; - @JsonProperty("href") - private String href = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; @JsonProperty("@referredType") private String _atReferredType = null; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/RelatedChannel.java b/src/main/java/org/etsi/osl/tmf/po622/model/RelatedChannel.java index 6b824312249222904d660bb018a256b11e020f9d..e56f90707d0699cf525fffbc0db2cd5332ad4d5c 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/RelatedChannel.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/RelatedChannel.java @@ -20,12 +20,12 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; /** @@ -34,27 +34,15 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "Related channel to another entity. May be online web, mobile app, social ,etc.") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class RelatedChannel { +@Entity(name = "RelatedChan622") +public class RelatedChannel extends BaseRootNamedEntity { @JsonProperty("id") private String id = null; - @JsonProperty("href") - private String href = null; - - @JsonProperty("name") - private String name = null; @JsonProperty("role") private String role = null; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; @JsonProperty("@referredType") private String _atReferredType = null; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/RelatedProductOrderItem.java b/src/main/java/org/etsi/osl/tmf/po622/model/RelatedProductOrderItem.java index f9e567e8288d6ab697c2380384911d1a282ed784..11efb010f2a010ce6aa29aac1b489b878c82e9ae 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/RelatedProductOrderItem.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/RelatedProductOrderItem.java @@ -20,12 +20,12 @@ package org.etsi.osl.tmf.po622.model; import java.util.Objects; - import com.fasterxml.jackson.annotation.JsonProperty; - +import org.etsi.osl.tmf.common.model.BaseRootEntity; +import org.etsi.osl.tmf.common.model.BaseRootNamedEntity; import org.springframework.validation.annotation.Validated; - import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; import jakarta.validation.constraints.NotNull; /** @@ -34,7 +34,8 @@ import jakarta.validation.constraints.NotNull; @Schema(description = "RelatedProductOrderItem (ProductOrder item) .The product order item which triggered product creation/change/termination.") @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class RelatedProductOrderItem { +@Entity(name = "RelatedProdOrdItem622") +public class RelatedProductOrderItem extends BaseRootEntity { @JsonProperty("orderItemAction") private String orderItemAction = null; @@ -50,14 +51,6 @@ public class RelatedProductOrderItem { @JsonProperty("role") private String role = null; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; @JsonProperty("@referredType") private String _atReferredType = null; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/TargetProductSchema.java b/src/main/java/org/etsi/osl/tmf/po622/model/TargetProductSchema.java deleted file mode 100644 index 34205af02aa50605d33c1a173787219687bb3af8..0000000000000000000000000000000000000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/TargetProductSchema.java +++ /dev/null @@ -1,148 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 - 2021 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.po622.model; - -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import org.springframework.validation.annotation.Validated; - -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotNull; - -/** - * The reference object to the schema and type of target product which is described by product specification - */ -@Schema(description = "The reference object to the schema and type of target product which is described by product specification") -@Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class TargetProductSchema { - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; - - public TargetProductSchema baseType(String baseType) { - this.baseType = baseType; - return this; - } - - /** - * When sub-classing, this defines the super-class - * @return baseType - **/ - @Schema(description = "When sub-classing, this defines the super-class") - - public String getAtBaseType() { - return baseType; - } - - public void setAtBaseType(String baseType) { - this.baseType = baseType; - } - - public TargetProductSchema schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * This field provides a link to the schema describing the target product - * @return schemaLocation - **/ - @Schema(description = "This field provides a link to the schema describing the target product") - @NotNull - - public String getAtSchemaLocation() { - return schemaLocation; - } - - public void setAtSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - public TargetProductSchema type(String type) { - this.type = type; - return this; - } - - /** - * Class type of the target product - * @return type - **/ - @Schema(description = "Class type of the target product") - @NotNull - - public String getAtType() { - return type; - } - - public void setAtType(String type) { - this.type = type; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TargetProductSchema targetProductSchema = (TargetProductSchema) o; - return Objects.equals(this.baseType, targetProductSchema.baseType) && - Objects.equals(this.schemaLocation, targetProductSchema.schemaLocation) && - Objects.equals(this.type, targetProductSchema.type); - } - - @Override - public int hashCode() { - return Objects.hash(baseType, schemaLocation, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TargetProductSchema {\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/prm669/model/Characteristic.java b/src/main/java/org/etsi/osl/tmf/prm669/model/Characteristic.java deleted file mode 100644 index c0ca3cf990a1c82da38ddc388ca43dc04d3e0d72..0000000000000000000000000000000000000000 --- a/src/main/java/org/etsi/osl/tmf/prm669/model/Characteristic.java +++ /dev/null @@ -1,229 +0,0 @@ -/*- - * ========================LICENSE_START================================= - * org.etsi.osl.tmf.api - * %% - * Copyright (C) 2019 openslice.io - * %% - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * =========================LICENSE_END================================== - */ -package org.etsi.osl.tmf.prm669.model; - -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonProperty; -import org.etsi.osl.tmf.common.model.Any; -import org.springframework.validation.annotation.Validated; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.Valid; -import jakarta.validation.constraints.NotNull; - -/** - * Describes a given characteristic of an object or entity through a name/value pair. - */ -@Schema(description = "Describes a given characteristic of an object or entity through a name/value pair.") -@Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-10-19T23:20:50.154+03:00") - -public class Characteristic { - @JsonProperty("name") - private String name = null; - - @JsonProperty("valueType") - private String valueType = null; - - @JsonProperty("value") - private Any value = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; - - public Characteristic name(String name) { - this.name = name; - return this; - } - - /** - * Name of the characteristic - * @return name - **/ - @Schema(description = "Name of the characteristic") - @NotNull - - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Characteristic valueType(String valueType) { - this.valueType = valueType; - return this; - } - - /** - * Data type of the value of the characteristic - * @return valueType - **/ - @Schema(description = "Data type of the value of the characteristic") - - - public String getValueType() { - return valueType; - } - - public void setValueType(String valueType) { - this.valueType = valueType; - } - - public Characteristic value(Any value) { - this.value = value; - return this; - } - - /** - * The value of the characteristic - * @return value - **/ - @Schema(description = "The value of the characteristic") - @NotNull - - @Valid - - public Any getValue() { - return value; - } - - public void setValue(Any value) { - this.value = value; - } - - public Characteristic baseType(String baseType) { - this.baseType = baseType; - return this; - } - - /** - * When sub-classing, this defines the super-class - * @return baseType - **/ - @Schema(description = "When sub-classing, this defines the super-class") - - - public String getBaseType() { - return baseType; - } - - public void setBaseType(String baseType) { - this.baseType = baseType; - } - - public Characteristic schemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - return this; - } - - /** - * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return schemaLocation - **/ - @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - - - public String getSchemaLocation() { - return schemaLocation; - } - - public void setSchemaLocation(String schemaLocation) { - this.schemaLocation = schemaLocation; - } - - public Characteristic type(String type) { - this.type = type; - return this; - } - - /** - * When sub-classing, this defines the sub-class entity name - * @return type - **/ - @Schema(description = "When sub-classing, this defines the sub-class entity name") - - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Characteristic characteristic = (Characteristic) o; - return Objects.equals(this.name, characteristic.name) && - Objects.equals(this.valueType, characteristic.valueType) && - Objects.equals(this.value, characteristic.value) && - Objects.equals(this.baseType, characteristic.baseType) && - Objects.equals(this.schemaLocation, characteristic.schemaLocation) && - Objects.equals(this.type, characteristic.type); - } - - @Override - public int hashCode() { - return Objects.hash(name, valueType, value, baseType, schemaLocation, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Characteristic {\n"); - - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" valueType: ").append(toIndentedString(valueType)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).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/prm669/model/PartyRole.java b/src/main/java/org/etsi/osl/tmf/prm669/model/PartyRole.java index db0583cccc103506a61ec66e44adb7d3ed4229ea..b972197d63778e1551442c40814a4de812d2faf8 100644 --- a/src/main/java/org/etsi/osl/tmf/prm669/model/PartyRole.java +++ b/src/main/java/org/etsi/osl/tmf/prm669/model/PartyRole.java @@ -28,6 +28,7 @@ import org.etsi.osl.tmf.am651.model.AgreementRef; import org.etsi.osl.tmf.am666.model.AccountRef; import org.etsi.osl.tmf.am666.model.PaymentMethodRef; import org.etsi.osl.tmf.common.model.TimePeriod; +import org.etsi.osl.tmf.common.model.service.Characteristic; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/prm669/model/PartyRoleCreate.java b/src/main/java/org/etsi/osl/tmf/prm669/model/PartyRoleCreate.java index 436574c9e6bca7691ab55647f47bbf53643963f8..5b4435971dac31ebe2a4cfe73b53c255b9a945f0 100644 --- a/src/main/java/org/etsi/osl/tmf/prm669/model/PartyRoleCreate.java +++ b/src/main/java/org/etsi/osl/tmf/prm669/model/PartyRoleCreate.java @@ -28,6 +28,7 @@ import org.etsi.osl.tmf.am651.model.AgreementRef; import org.etsi.osl.tmf.am666.model.AccountRef; import org.etsi.osl.tmf.am666.model.PaymentMethodRef; import org.etsi.osl.tmf.common.model.TimePeriod; +import org.etsi.osl.tmf.common.model.service.Characteristic; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/prm669/model/PartyRoleUpdate.java b/src/main/java/org/etsi/osl/tmf/prm669/model/PartyRoleUpdate.java index 560acbf57d3d663530af95c02abcb01228744bce..3a890cb9930ce0c3dbf991aa3dc4e3c33c35600a 100644 --- a/src/main/java/org/etsi/osl/tmf/prm669/model/PartyRoleUpdate.java +++ b/src/main/java/org/etsi/osl/tmf/prm669/model/PartyRoleUpdate.java @@ -28,6 +28,7 @@ import org.etsi.osl.tmf.am651.model.AgreementRef; import org.etsi.osl.tmf.am666.model.AccountRef; import org.etsi.osl.tmf.am666.model.PaymentMethodRef; import org.etsi.osl.tmf.common.model.TimePeriod; +import org.etsi.osl.tmf.common.model.service.Characteristic; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.Valid; diff --git a/src/main/java/org/etsi/osl/tmf/ro652/model/Quantity.java b/src/main/java/org/etsi/osl/tmf/ro652/model/Quantity.java deleted file mode 100644 index 4b6899d742f0de03775539f85c409e309541dd1d..0000000000000000000000000000000000000000 --- a/src/main/java/org/etsi/osl/tmf/ro652/model/Quantity.java +++ /dev/null @@ -1,102 +0,0 @@ -package org.etsi.osl.tmf.ro652.model; - -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import org.springframework.validation.annotation.Validated; - -import io.swagger.v3.oas.annotations.media.Schema; - -/** - * An amount in a given unit - */ -@Schema(description = "An amount in a given unit") -@Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2022-09-28T23:39:08.914219800+03:00[Europe/Athens]") -public class Quantity { - @JsonProperty("amount") - private Float amount = 1.0f; - - @JsonProperty("units") - private String units = null; - - public Quantity amount(Float amount) { - this.amount = amount; - return this; - } - - /** - * Numeric value in a given unit - * @return amount - **/ - @Schema(description = "Numeric value in a given unit") - - public Float getAmount() { - return amount; - } - - public void setAmount(Float amount) { - this.amount = amount; - } - - public Quantity units(String units) { - this.units = units; - return this; - } - - /** - * Unit - * @return units - **/ - @Schema(description = "Unit") - - public String getUnits() { - return units; - } - - public void setUnits(String units) { - this.units = units; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Quantity quantity = (Quantity) o; - return Objects.equals(this.amount, quantity.amount) && - Objects.equals(this.units, quantity.units); - } - - @Override - public int hashCode() { - return Objects.hash(amount, units); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Quantity {\n"); - - sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); - sb.append(" units: ").append(toIndentedString(units)).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/rpm685/model/ProductOfferingRef.java b/src/main/java/org/etsi/osl/tmf/rpm685/model/ProductOfferingRef.java deleted file mode 100644 index a0a6750d9454dfb1fbdf418bd1f1a672d14955e7..0000000000000000000000000000000000000000 --- a/src/main/java/org/etsi/osl/tmf/rpm685/model/ProductOfferingRef.java +++ /dev/null @@ -1,183 +0,0 @@ -package org.etsi.osl.tmf.rpm685.model; - -import java.util.Objects; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import org.springframework.validation.annotation.Validated; - -import io.swagger.v3.oas.annotations.media.Schema; - -/** - * ProductOffering reference. A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information. - */ -@Schema(description = "ProductOffering reference. A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information.") -@Validated -@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2022-10-05T08:56:49.602231700+03:00[Europe/Athens]") -public class ProductOfferingRef { - @JsonProperty("href") - private String href = null; - - @JsonProperty("id") - private String id = null; - - @JsonProperty("name") - private String name = null; - -// @JsonProperty("bundledProductOffering") -// @Valid -// private List<BundledProductOfferingRef> bundledProductOffering = null; - - @JsonProperty("@referredType") - private String _atReferredType = null; - - public ProductOfferingRef href(String href) { - this.href = href; - return this; - } - - /** - * Reference of the product offering - * @return href - **/ - @Schema(description = "Reference of the product offering") - - public String getHref() { - return href; - } - - public void setHref(String href) { - this.href = href; - } - - public ProductOfferingRef id(String id) { - this.id = id; - return this; - } - - /** - * Unique identifier of the product offering - * @return id - **/ - @Schema(description = "Unique identifier of the product offering") - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public ProductOfferingRef name(String name) { - this.name = name; - return this; - } - - /** - * Name of the product offering - * @return name - **/ - @Schema(description = "Name of the product offering") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - -// public ProductOfferingRef bundledProductOffering(List<BundledProductOfferingRef> bundledProductOffering) { -// this.bundledProductOffering = bundledProductOffering; -// return this; -// } -// -// public ProductOfferingRef addBundledProductOfferingItem(BundledProductOfferingRef bundledProductOfferingItem) { -// if (this.bundledProductOffering == null) { -// this.bundledProductOffering = new ArrayList<>(); -// } -// this.bundledProductOffering.add(bundledProductOfferingItem); -// return this; -// } -// -// /** -// * Get bundledProductOffering -// * @return bundledProductOffering -// **/ -// @Schema(description = "") -// @Valid -// public List<BundledProductOfferingRef> getBundledProductOffering() { -// return bundledProductOffering; -// } -// -// public void setBundledProductOffering(List<BundledProductOfferingRef> bundledProductOffering) { -// this.bundledProductOffering = bundledProductOffering; -// } -// -// public ProductOfferingRef _atReferredType(String _atReferredType) { -// this._atReferredType = _atReferredType; -// return this; -// } - - /** - * The actual type of the target instance when needed for disambiguation. - * @return _atReferredType - **/ - @Schema(description = "The actual type of the target instance when needed for disambiguation.") - - public String getAtReferredType() { - return _atReferredType; - } - - public void setAtReferredType(String _atReferredType) { - this._atReferredType = _atReferredType; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProductOfferingRef productOfferingRef = (ProductOfferingRef) o; - return Objects.equals(this.href, productOfferingRef.href) && - Objects.equals(this.id, productOfferingRef.id) && - Objects.equals(this.name, productOfferingRef.name) && -// Objects.equals(this.bundledProductOffering, productOfferingRef.bundledProductOffering) && - Objects.equals(this._atReferredType, productOfferingRef._atReferredType); - } - - @Override - public int hashCode() { - return Objects.hash(href, id, name, _atReferredType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProductOfferingRef {\n"); - - sb.append(" href: ").append(toIndentedString(href)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); -// sb.append(" bundledProductOffering: ").append(toIndentedString(bundledProductOffering)).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(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/sim638/model/Service.java b/src/main/java/org/etsi/osl/tmf/sim638/model/Service.java index 6c2d2a72590dbcf81711fc45efa809a7c0fcfc86..601a369348430bed687903e2f84616e0df6d93e1 100644 --- a/src/main/java/org/etsi/osl/tmf/sim638/model/Service.java +++ b/src/main/java/org/etsi/osl/tmf/sim638/model/Service.java @@ -37,6 +37,7 @@ import org.etsi.osl.tmf.common.model.service.ServiceSpecificationRef; import org.etsi.osl.tmf.common.model.service.ServiceStateType; import org.etsi.osl.tmf.prm669.model.RelatedParty; import org.etsi.osl.tmf.ri639.model.Resource; +import org.etsi.osl.tmf.ri639.model.ResourceStatusType; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.persistence.CascadeType; @@ -788,71 +789,99 @@ public class Service extends BaseRootNamedEntity { * @param supportingResources * @return */ - public ServiceStateType findNextStateBasedOnSupportingResources(List<Resource> supportingResources) { + public ServiceStateType findNextStateBasedOnResourceList(List<Resource> supportingResources) { + + if (this.getState().equals( ServiceStateType.TERMINATED )) { + return ServiceStateType.TERMINATED; + } + @Valid ServiceStateType nextState = this.getState() ; - boolean allActive = this.getSupportingResource().size() > 0 ; - boolean allTerminated = this.getSupportingResource().size() > 0 ; - boolean existsInactive=false; - boolean existsTerminated=false; + boolean allResourcesAvailable = true ; + boolean allResourcesTerminated = true ; + boolean existsSuspended=false; + boolean existsStandby=false; boolean existsReserved=false; + boolean existUnknown=false; + boolean existAlarm=false; for ( Resource res : supportingResources ) { if ( res.getResourceStatus() != null ) { switch (res.getResourceStatus()) { case AVAILABLE: { - nextState = ServiceStateType.ACTIVE; + break; } case STANDBY: { - nextState = ServiceStateType.RESERVED; + existsStandby = true; break; } case SUSPENDED: { - nextState = ServiceStateType.INACTIVE; + existsSuspended = true; break; } case RESERVED: { - nextState = ServiceStateType.RESERVED; + existsReserved = true; break; } case UNKNOWN: { - if (this.getState().equals( ServiceStateType.ACTIVE )) { - nextState = ServiceStateType.TERMINATED; - } + existUnknown =true; break; } case ALARM: { - nextState = ServiceStateType.INACTIVE; + existAlarm = true; break; } default: throw new IllegalArgumentException("Unexpected value: " + res.getResourceStatus()); } - } + } else + existUnknown =true; - allActive = allActive && nextState == ServiceStateType.ACTIVE; - allTerminated = allTerminated && nextState == ServiceStateType.TERMINATED; - existsInactive = existsInactive || nextState == ServiceStateType.INACTIVE; - existsTerminated = existsTerminated || nextState == ServiceStateType.TERMINATED; - existsReserved = existsReserved || nextState == ServiceStateType.RESERVED; + allResourcesAvailable = allResourcesAvailable && res.getResourceStatus()!=null && res.getResourceStatus().equals(ResourceStatusType.AVAILABLE); + allResourcesTerminated = allResourcesTerminated && res.getResourceStatus()!=null && res.getResourceStatus().equals(ResourceStatusType.SUSPENDED); - - if ( allActive ) { - nextState = ServiceStateType.ACTIVE ; - } else if ( allTerminated ) { - nextState = ServiceStateType.TERMINATED ; - } else if ( existsInactive ) { - nextState = ServiceStateType.INACTIVE ; - } else if ( existsReserved ) { - nextState = ServiceStateType.RESERVED ; - } else if ( existsTerminated ) { - nextState = ServiceStateType.INACTIVE ; - } - } + + if ( allResourcesAvailable ) { + nextState = ServiceStateType.ACTIVE ; + } else if ( allResourcesTerminated ) { + nextState = ServiceStateType.TERMINATED ; + } else if ( existAlarm ) { + nextState = ServiceStateType.INACTIVE ; + } else if ( existsReserved || existsStandby) { + nextState = ServiceStateType.RESERVED ; + } else if ( existsSuspended ) { + nextState = ServiceStateType.TERMINATED ; + } else if ( existUnknown ) { +// if (this.getState().equals( ServiceStateType.ACTIVE )) { //helpful state for argoCD lifecycle +// nextState = ServiceStateType.TERMINATED ; +// } + } + return nextState; } + + + /** + * @param res + * @return true if this resource is same (kubernetes) kind. + */ + public boolean checkIsKindResource(Resource res) { + Characteristic serviceKindChar = this.getServiceCharacteristicByName("Kind"); + if (serviceKindChar != null && serviceKindChar.getValue()!=null) { + org.etsi.osl.tmf.ri639.model.Characteristic ckind = res.getResourceCharacteristicByName("Kind"); + String resourceKind=""; + if ( ckind != null && ckind.getValue() != null) { + resourceKind = ckind.getValue().getValue() ; //example "Application" + } + if (serviceKindChar.getValue().getValue().equals( resourceKind ) || this.getCategory().equals(resourceKind) ) { //if this service is the same kind as the resource then don't prefix the characteristic + return true; + } + } + + return false; + } } diff --git a/src/main/java/org/etsi/osl/tmf/sim638/model/ServiceUpdate.java b/src/main/java/org/etsi/osl/tmf/sim638/model/ServiceUpdate.java index e7a9aac28b9976c2ef13ee9ef1192a9814c2f217..940dd4d772f9342b91b92e5d66adcc9ebba271a3 100644 --- a/src/main/java/org/etsi/osl/tmf/sim638/model/ServiceUpdate.java +++ b/src/main/java/org/etsi/osl/tmf/sim638/model/ServiceUpdate.java @@ -819,4 +819,14 @@ public class ServiceUpdate { } return o.toString().replace("\n", "\n "); } + + public Characteristic getServiceCharacteristicByName(String characteristicname) { + + for (Characteristic c : this.serviceCharacteristic) { + if ( c.getName().equals( characteristicname )) { + return c; + } + } + return null; + } }