From bda97e5ba98f3a74dbc5fecdd8a660bb5c8bf8f3 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Sun, 4 Aug 2024 01:10:57 +0300 Subject: [PATCH 1/9] model changes for product inventory 637 --- .../etsi/osl/tmf/am651/model/Agreement.java | 1 + .../osl/tmf/am651/model/AgreementCreate.java | 1 + .../osl/tmf/am651/model/AgreementUpdate.java | 1 + .../osl/tmf/am651/model/Characteristic.java | 175 ---- .../tmf/pim637/model/BillingAccountRef.java | 229 +++++ .../etsi/osl/tmf/pim637/model/EntityRef.java | 229 +++++ .../org/etsi/osl/tmf/pim637/model/Error.java | 254 +++++ .../tmf/pim637/model/EventSubscription.java | 129 +++ .../pim637/model/EventSubscriptionInput.java | 104 ++ .../org/etsi/osl/tmf/pim637/model/Money.java | 104 ++ .../org/etsi/osl/tmf/pim637/model/Place.java | 204 ++++ .../org/etsi/osl/tmf/pim637/model/Price.java | 232 +++++ .../osl/tmf/pim637/model/PriceAlteration.java | 357 +++++++ .../etsi/osl/tmf/pim637/model/Product.java | 869 +++++++++++++++++ .../ProductAttributeValueChangeEvent.java | 334 +++++++ ...oductAttributeValueChangeEventPayload.java | 81 ++ .../tmf/pim637/model/ProductBatchEvent.java | 359 +++++++ .../model/ProductBatchEventPayload.java | 81 ++ .../osl/tmf/pim637/model/ProductCreate.java | 819 ++++++++++++++++ .../tmf/pim637/model/ProductCreateEvent.java | 359 +++++++ .../model/ProductCreateEventPayload.java | 81 ++ .../tmf/pim637/model/ProductDeleteEvent.java | 359 +++++++ .../model/ProductDeleteEventPayload.java | 81 ++ .../pim637/model/ProductOfferingPriceRef.java | 229 +++++ .../tmf/pim637/model/ProductOfferingRef.java | 229 +++++ .../osl/tmf/pim637/model/ProductPrice.java | 369 ++++++++ .../etsi/osl/tmf/pim637/model/ProductRef.java | 228 +++++ .../tmf/pim637/model/ProductRefOrValue.java | 894 ++++++++++++++++++ .../tmf/pim637/model/ProductRelationship.java | 181 ++++ .../pim637/model/ProductSpecificationRef.java | 281 ++++++ .../pim637/model/ProductStateChangeEvent.java | 359 +++++++ .../model/ProductStateChangeEventPayload.java | 81 ++ .../tmf/pim637/model/ProductStatusType.java | 40 + .../osl/tmf/pim637/model/ProductTerm.java | 233 +++++ .../osl/tmf/pim637/model/ProductUpdate.java | 819 ++++++++++++++++ .../pim637/model/RelatedPlaceRefOrValue.java | 254 +++++ .../pim637/model/RelatedProductOrderItem.java | 279 ++++++ .../tmf/pim637/model/TargetProductSchema.java | 129 +++ .../osl/tmf/po622/model/Characteristic.java | 222 ----- .../org/etsi/osl/tmf/po622/model/Product.java | 1 + .../tmf/po622/model/ProductRefOrValue.java | 1 + .../osl/tmf/prm669/model/Characteristic.java | 229 ----- .../etsi/osl/tmf/prm669/model/PartyRole.java | 1 + .../osl/tmf/prm669/model/PartyRoleCreate.java | 1 + .../osl/tmf/prm669/model/PartyRoleUpdate.java | 1 + .../etsi/osl/tmf/ro652/model/Quantity.java | 102 -- 46 files changed, 9878 insertions(+), 728 deletions(-) delete mode 100644 src/main/java/org/etsi/osl/tmf/am651/model/Characteristic.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/BillingAccountRef.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/EntityRef.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/Error.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/EventSubscription.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/EventSubscriptionInput.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/Money.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/Place.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/Price.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/PriceAlteration.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/Product.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductAttributeValueChangeEvent.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductAttributeValueChangeEventPayload.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductBatchEvent.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductBatchEventPayload.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductCreate.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductCreateEvent.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductCreateEventPayload.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductDeleteEvent.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductDeleteEventPayload.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductOfferingPriceRef.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductOfferingRef.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductPrice.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductRef.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductRefOrValue.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductRelationship.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductSpecificationRef.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductStateChangeEvent.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductStateChangeEventPayload.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductStatusType.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductTerm.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductUpdate.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/RelatedPlaceRefOrValue.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/RelatedProductOrderItem.java create mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/TargetProductSchema.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/Characteristic.java delete mode 100644 src/main/java/org/etsi/osl/tmf/prm669/model/Characteristic.java delete mode 100644 src/main/java/org/etsi/osl/tmf/ro652/model/Quantity.java 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 9dd3e97..113259c 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 841688a..02f5906 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/AgreementUpdate.java b/src/main/java/org/etsi/osl/tmf/am651/model/AgreementUpdate.java index b98ce9b..c3a3498 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 b00b36d..0000000 --- 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/pim637/model/BillingAccountRef.java b/src/main/java/org/etsi/osl/tmf/pim637/model/BillingAccountRef.java new file mode 100644 index 0000000..fed7801 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/BillingAccountRef.java @@ -0,0 +1,229 @@ +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; + +/** + * BillingAccount reference. A BillingAccount is a detailed description of a bill structure. + */ +@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 = "2024-08-04T00:27:07.324017400+03: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 _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = null; + + @JsonProperty("@referredType") + private String _atReferredType = null; + + public BillingAccountRef id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the billing account + * @return id + **/ + @Schema(required = true, description = "Unique identifier of the billing account") + @NotNull + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public BillingAccountRef href(String href) { + this.href = href; + return this; + } + + /** + * Reference of the billing account + * @return href + **/ + @Schema(description = "Reference of the billing account") + @NotNull + + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public BillingAccountRef name(String name) { + this.name = name; + return this; + } + + /** + * Name of the billing account + * @return name + **/ + @Schema(description = "Name of the billing account") + @NotNull + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public BillingAccountRef _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 BillingAccountRef _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 BillingAccountRef _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; + } + + public BillingAccountRef _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; + } + + 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; + } + BillingAccountRef billingAccountRef = (BillingAccountRef) o; + return Objects.equals(this.id, billingAccountRef.id) && + Objects.equals(this.href, billingAccountRef.href) && + Objects.equals(this.name, billingAccountRef.name) && + Objects.equals(this._atBaseType, billingAccountRef._atBaseType) && + Objects.equals(this._atSchemaLocation, billingAccountRef._atSchemaLocation) && + Objects.equals(this._atType, billingAccountRef._atType) && + Objects.equals(this._atReferredType, billingAccountRef._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 BillingAccountRef {\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(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/EntityRef.java b/src/main/java/org/etsi/osl/tmf/pim637/model/EntityRef.java new file mode 100644 index 0000000..600dbe9 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/EntityRef.java @@ -0,0 +1,229 @@ +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; + +/** + * Entity reference schema to be use for all entityRef class. + */ +@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 = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class EntityRef { + @JsonProperty("id") + private String id = null; + + @JsonProperty("href") + private String href = null; + + @JsonProperty("name") + private String name = null; + + @JsonProperty("@baseType") + private String _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = null; + + @JsonProperty("@referredType") + private String _atReferredType = null; + + public EntityRef id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of a related entity. + * @return id + **/ + @Schema(required = true, description = "Unique identifier of a related entity.") + @NotNull + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public EntityRef href(String href) { + this.href = href; + return this; + } + + /** + * Reference of the related entity. + * @return href + **/ + @Schema(description = "Reference of the related entity.") + @NotNull + + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public EntityRef name(String name) { + this.name = name; + return this; + } + + /** + * Name of the related entity. + * @return name + **/ + @Schema(description = "Name of the related entity.") + @NotNull + + 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(description = "When sub-classing, this defines the super-class") + @NotNull + + public String getAtBaseType() { + return _atBaseType; + } + + public void setAtBaseType(String _atBaseType) { + this._atBaseType = _atBaseType; + } + + public EntityRef _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 EntityRef _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; + } + + public EntityRef _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; + } + + 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; + } + 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(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/Error.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Error.java new file mode 100644 index 0000000..e13ea9a --- /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 0000000..1d27292 --- /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 0000000..2561f94 --- /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/pim637/model/Money.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Money.java new file mode 100644 index 0000000..3dba051 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/Money.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; + +/** + * 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 = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class Money { + @JsonProperty("unit") + private String unit = null; + + @JsonProperty("value") + private Float value = null; + + public Money unit(String unit) { + this.unit = unit; + return this; + } + + /** + * 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; + } + + public void setUnit(String unit) { + this.unit = unit; + } + + public Money value(Float value) { + this.value = value; + return this; + } + + /** + * A positive floating point number + * @return value + **/ + @Schema(description = "A positive floating point number") + @NotNull + + public Float getValue() { + return value; + } + + public void setValue(Float value) { + this.value = value; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Money money = (Money) o; + return Objects.equals(this.unit, money.unit) && + Objects.equals(this.value, money.value); + } + + @Override + public int hashCode() { + return Objects.hash(unit, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Money {\n"); + + sb.append(" unit: ").append(toIndentedString(unit)).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(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/Place.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Place.java new file mode 100644 index 0000000..7b98f7d --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/Place.java @@ -0,0 +1,204 @@ +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 = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class Place { + @JsonProperty("id") + private String id = null; + + @JsonProperty("href") + private String href = null; + + @JsonProperty("name") + private String name = null; + + @JsonProperty("@baseType") + private String _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = null; + + public Place id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the place + * @return id + **/ + @Schema(description = "Unique identifier of the place") + @NotNull + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Place href(String href) { + this.href = href; + return this; + } + + /** + * Unique reference of the place + * @return href + **/ + @Schema(description = "Unique reference of the place") + @NotNull + + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public Place name(String name) { + this.name = name; + return this; + } + + /** + * 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; + } + + public void setName(String name) { + this.name = name; + } + + public Place _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 Place _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 Place _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; + } + Place place = (Place) o; + return Objects.equals(this.id, place.id) && + Objects.equals(this.href, place.href) && + Objects.equals(this.name, place.name) && + 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, _atBaseType, _atSchemaLocation, _atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Place {\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("}"); + 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/Price.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Price.java new file mode 100644 index 0000000..0642c80 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/Price.java @@ -0,0 +1,232 @@ +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; + +/** + * 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 = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class Price { + @JsonProperty("percentage") + private Float percentage = null; + + @JsonProperty("taxRate") + private Float taxRate = null; + + @JsonProperty("dutyFreeAmount") + private Money dutyFreeAmount = null; + + @JsonProperty("taxIncludedAmount") + private Money taxIncludedAmount = null; + + @JsonProperty("@baseType") + private String _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = null; + + public Price percentage(Float percentage) { + this.percentage = percentage; + return this; + } + + /** + * Percentage to apply for ProdOfferPriceAlteration + * @return percentage + **/ + @Schema(description = "Percentage to apply for ProdOfferPriceAlteration") + @NotNull + + public Float getPercentage() { + return percentage; + } + + public void setPercentage(Float percentage) { + this.percentage = percentage; + } + + public Price taxRate(Float taxRate) { + this.taxRate = taxRate; + return this; + } + + /** + * Tax rate + * @return taxRate + **/ + @Schema(description = "Tax rate") + @NotNull + + public Float getTaxRate() { + return taxRate; + } + + public void setTaxRate(Float taxRate) { + this.taxRate = taxRate; + } + + public Price dutyFreeAmount(Money dutyFreeAmount) { + this.dutyFreeAmount = dutyFreeAmount; + return this; + } + + /** + * Get dutyFreeAmount + * @return dutyFreeAmount + **/ + @Schema(description = "") + @NotNull + + @Valid + public Money getDutyFreeAmount() { + return dutyFreeAmount; + } + + public void setDutyFreeAmount(Money dutyFreeAmount) { + this.dutyFreeAmount = dutyFreeAmount; + } + + public Price taxIncludedAmount(Money taxIncludedAmount) { + this.taxIncludedAmount = taxIncludedAmount; + return this; + } + + /** + * Get taxIncludedAmount + * @return taxIncludedAmount + **/ + @Schema(description = "") + @NotNull + + @Valid + public Money getTaxIncludedAmount() { + return taxIncludedAmount; + } + + public void setTaxIncludedAmount(Money taxIncludedAmount) { + this.taxIncludedAmount = taxIncludedAmount; + } + + public Price _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 Price _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 Price _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; + } + Price price = (Price) o; + return Objects.equals(this.percentage, price.percentage) && + Objects.equals(this.taxRate, price.taxRate) && + Objects.equals(this.dutyFreeAmount, price.dutyFreeAmount) && + Objects.equals(this.taxIncludedAmount, price.taxIncludedAmount) && + 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, _atBaseType, _atSchemaLocation, _atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Price {\n"); + + sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); + 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(" _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/PriceAlteration.java b/src/main/java/org/etsi/osl/tmf/pim637/model/PriceAlteration.java new file mode 100644 index 0000000..efa0404 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/PriceAlteration.java @@ -0,0 +1,357 @@ +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; + +/** + * Is an amount, usually of money, that modifies the price charged for an order item. + */ +@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 = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class PriceAlteration { + @JsonProperty("applicationDuration") + private Integer applicationDuration = null; + + @JsonProperty("description") + private String description = null; + + @JsonProperty("name") + private String name = null; + + @JsonProperty("priceType") + private String priceType = null; + + @JsonProperty("priority") + private Integer priority = null; + + @JsonProperty("recurringChargePeriod") + private String recurringChargePeriod = null; + + @JsonProperty("unitOfMeasure") + private String unitOfMeasure = null; + + @JsonProperty("price") + private Price price = null; + + @JsonProperty("productOfferingPrice") + private ProductOfferingPriceRef productOfferingPrice = null; + + @JsonProperty("@baseType") + private String _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = null; + + public PriceAlteration applicationDuration(Integer applicationDuration) { + this.applicationDuration = applicationDuration; + return this; + } + + /** + * 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; + } + + public void setApplicationDuration(Integer applicationDuration) { + this.applicationDuration = applicationDuration; + } + + public PriceAlteration description(String description) { + this.description = description; + return this; + } + + /** + * 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; + } + + public void setDescription(String description) { + this.description = description; + } + + public PriceAlteration name(String name) { + this.name = name; + return this; + } + + /** + * Name of the order item price alteration + * @return name + **/ + @Schema(description = "Name of the order item price alteration") + @NotNull + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public PriceAlteration priceType(String priceType) { + this.priceType = priceType; + return this; + } + + /** + * A category that describes the price such as recurring, one time and usage. + * @return priceType + **/ + @Schema(required = true, description = "A category that describes the price such as recurring, one time and usage.") + @NotNull + + public String getPriceType() { + return priceType; + } + + public void setPriceType(String priceType) { + this.priceType = priceType; + } + + public PriceAlteration priority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * 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; + } + + public void setPriority(Integer priority) { + this.priority = priority; + } + + public PriceAlteration recurringChargePeriod(String recurringChargePeriod) { + this.recurringChargePeriod = recurringChargePeriod; + return this; + } + + /** + * Could be month, week... + * @return recurringChargePeriod + **/ + @Schema(description = "Could be month, week...") + @NotNull + + public String getRecurringChargePeriod() { + return recurringChargePeriod; + } + + public void setRecurringChargePeriod(String recurringChargePeriod) { + this.recurringChargePeriod = recurringChargePeriod; + } + + public PriceAlteration unitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + return this; + } + + /** + * Could be minutes, GB... + * @return unitOfMeasure + **/ + @Schema(description = "Could be minutes, GB...") + @NotNull + + public String getUnitOfMeasure() { + return unitOfMeasure; + } + + public void setUnitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + } + + public PriceAlteration price(Price price) { + this.price = price; + return this; + } + + /** + * Get price + * @return price + **/ + @Schema(required = true, description = "") + @NotNull + + @Valid + public Price getPrice() { + return price; + } + + public void setPrice(Price price) { + this.price = price; + } + + public PriceAlteration productOfferingPrice(ProductOfferingPriceRef productOfferingPrice) { + this.productOfferingPrice = productOfferingPrice; + return this; + } + + /** + * Get productOfferingPrice + * @return productOfferingPrice + **/ + @Schema(description = "") + @NotNull + + @Valid + public ProductOfferingPriceRef getProductOfferingPrice() { + return productOfferingPrice; + } + + public void setProductOfferingPrice(ProductOfferingPriceRef productOfferingPrice) { + this.productOfferingPrice = productOfferingPrice; + } + + public PriceAlteration _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 PriceAlteration _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 PriceAlteration _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; + } + PriceAlteration priceAlteration = (PriceAlteration) o; + return Objects.equals(this.applicationDuration, priceAlteration.applicationDuration) && + Objects.equals(this.description, priceAlteration.description) && + Objects.equals(this.name, priceAlteration.name) && + Objects.equals(this.priceType, priceAlteration.priceType) && + Objects.equals(this.priority, priceAlteration.priority) && + Objects.equals(this.recurringChargePeriod, priceAlteration.recurringChargePeriod) && + Objects.equals(this.unitOfMeasure, priceAlteration.unitOfMeasure) && + Objects.equals(this.price, priceAlteration.price) && + Objects.equals(this.productOfferingPrice, priceAlteration.productOfferingPrice) && + Objects.equals(this._atBaseType, priceAlteration._atBaseType) && + Objects.equals(this._atSchemaLocation, priceAlteration._atSchemaLocation) && + Objects.equals(this._atType, priceAlteration._atType); + } + + @Override + public int hashCode() { + return Objects.hash(applicationDuration, description, name, priceType, priority, recurringChargePeriod, unitOfMeasure, price, productOfferingPrice, _atBaseType, _atSchemaLocation, _atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PriceAlteration {\n"); + + sb.append(" applicationDuration: ").append(toIndentedString(applicationDuration)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" priceType: ").append(toIndentedString(priceType)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" recurringChargePeriod: ").append(toIndentedString(recurringChargePeriod)).append("\n"); + 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(" _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/Product.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java new file mode 100644 index 0000000..edb686b --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java @@ -0,0 +1,869 @@ +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.po622.model.AgreementItemRef; +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). + */ +@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 = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class Product { + @JsonProperty("id") + private String id = null; + + @JsonProperty("href") + private String href = null; + + @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 agreement = null; + + @JsonProperty("billingAccount") + private BillingAccountRef billingAccount = null; + + @JsonProperty("place") + @Valid + private List place = null; + + @JsonProperty("product") + @Valid + private List product = null; + + @JsonProperty("productCharacteristic") + @Valid + private List productCharacteristic = null; + + @JsonProperty("productOffering") + private ProductOfferingRef productOffering = null; + + @JsonProperty("productOrderItem") + @Valid + private List productOrderItem = null; + + @JsonProperty("productPrice") + @Valid + private List productPrice = null; + + @JsonProperty("productRelationship") + @Valid + private List productRelationship = null; + + @JsonProperty("productSpecification") + private ProductSpecificationRef productSpecification = null; + + @JsonProperty("productTerm") + @Valid + private List productTerm = null; + + @JsonProperty("realizingResource") + @Valid + private List realizingResource = null; + + @JsonProperty("realizingService") + @Valid + private List realizingService = null; + + @JsonProperty("relatedParty") + @Valid + private List 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 Product id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the product + * @return id + **/ + @Schema(description = "Unique identifier of the product") + @NotNull + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Product href(String href) { + this.href = href; + return this; + } + + /** + * Reference of the product + * @return href + **/ + @Schema(description = "Reference of the product") + @NotNull + + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public Product 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 Product 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 Product 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 Product 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 Product 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 Product 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 Product 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 Product 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 Product agreement(List agreement) { + this.agreement = agreement; + return this; + } + + public Product addAgreementItem(AgreementItemRef agreementItem) { + if (this.agreement == null) { + this.agreement = new ArrayList(); + } + this.agreement.add(agreementItem); + return this; + } + + /** + * Get agreement + * @return agreement + **/ + @Schema(description = "") + @NotNull + @Valid + public List getAgreement() { + return agreement; + } + + public void setAgreement(List agreement) { + this.agreement = agreement; + } + + public Product 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 Product place(List place) { + this.place = place; + return this; + } + + public Product addPlaceItem(RelatedPlaceRefOrValue placeItem) { + if (this.place == null) { + this.place = new ArrayList(); + } + this.place.add(placeItem); + return this; + } + + /** + * Get place + * @return place + **/ + @Schema(description = "") + @NotNull + @Valid + public List getPlace() { + return place; + } + + public void setPlace(List place) { + this.place = place; + } + + public Product product(List product) { + this.product = product; + return this; + } + + public Product addProductItem(ProductRefOrValue productItem) { + if (this.product == null) { + this.product = new ArrayList(); + } + this.product.add(productItem); + return this; + } + + /** + * Get product + * @return product + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProduct() { + return product; + } + + public void setProduct(List product) { + this.product = product; + } + + public Product productCharacteristic(List productCharacteristic) { + this.productCharacteristic = productCharacteristic; + return this; + } + + public Product addProductCharacteristicItem(Characteristic productCharacteristicItem) { + if (this.productCharacteristic == null) { + this.productCharacteristic = new ArrayList(); + } + this.productCharacteristic.add(productCharacteristicItem); + return this; + } + + /** + * Get productCharacteristic + * @return productCharacteristic + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductCharacteristic() { + return productCharacteristic; + } + + public void setProductCharacteristic(List productCharacteristic) { + this.productCharacteristic = productCharacteristic; + } + + public Product 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 Product productOrderItem(List productOrderItem) { + this.productOrderItem = productOrderItem; + return this; + } + + public Product addProductOrderItemItem(RelatedProductOrderItem productOrderItemItem) { + if (this.productOrderItem == null) { + this.productOrderItem = new ArrayList(); + } + this.productOrderItem.add(productOrderItemItem); + return this; + } + + /** + * Get productOrderItem + * @return productOrderItem + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductOrderItem() { + return productOrderItem; + } + + public void setProductOrderItem(List productOrderItem) { + this.productOrderItem = productOrderItem; + } + + public Product productPrice(List productPrice) { + this.productPrice = productPrice; + return this; + } + + public Product addProductPriceItem(ProductPrice productPriceItem) { + if (this.productPrice == null) { + this.productPrice = new ArrayList(); + } + this.productPrice.add(productPriceItem); + return this; + } + + /** + * Get productPrice + * @return productPrice + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductPrice() { + return productPrice; + } + + public void setProductPrice(List productPrice) { + this.productPrice = productPrice; + } + + public Product productRelationship(List productRelationship) { + this.productRelationship = productRelationship; + return this; + } + + public Product addProductRelationshipItem(ProductRelationship productRelationshipItem) { + if (this.productRelationship == null) { + this.productRelationship = new ArrayList(); + } + this.productRelationship.add(productRelationshipItem); + return this; + } + + /** + * Get productRelationship + * @return productRelationship + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductRelationship() { + return productRelationship; + } + + public void setProductRelationship(List productRelationship) { + this.productRelationship = productRelationship; + } + + public Product 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 Product productTerm(List productTerm) { + this.productTerm = productTerm; + return this; + } + + public Product addProductTermItem(ProductTerm productTermItem) { + if (this.productTerm == null) { + this.productTerm = new ArrayList(); + } + this.productTerm.add(productTermItem); + return this; + } + + /** + * Get productTerm + * @return productTerm + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductTerm() { + return productTerm; + } + + public void setProductTerm(List productTerm) { + this.productTerm = productTerm; + } + + public Product realizingResource(List realizingResource) { + this.realizingResource = realizingResource; + return this; + } + + public Product addRealizingResourceItem(ResourceRef realizingResourceItem) { + if (this.realizingResource == null) { + this.realizingResource = new ArrayList(); + } + this.realizingResource.add(realizingResourceItem); + return this; + } + + /** + * Get realizingResource + * @return realizingResource + **/ + @Schema(description = "") + @NotNull + @Valid + public List getRealizingResource() { + return realizingResource; + } + + public void setRealizingResource(List realizingResource) { + this.realizingResource = realizingResource; + } + + public Product realizingService(List realizingService) { + this.realizingService = realizingService; + return this; + } + + public Product addRealizingServiceItem(ServiceRef realizingServiceItem) { + if (this.realizingService == null) { + this.realizingService = new ArrayList(); + } + this.realizingService.add(realizingServiceItem); + return this; + } + + /** + * Get realizingService + * @return realizingService + **/ + @Schema(description = "") + @NotNull + @Valid + public List getRealizingService() { + return realizingService; + } + + public void setRealizingService(List realizingService) { + this.realizingService = realizingService; + } + + public Product relatedParty(List relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public Product addRelatedPartyItem(RelatedParty relatedPartyItem) { + if (this.relatedParty == null) { + this.relatedParty = new ArrayList(); + } + this.relatedParty.add(relatedPartyItem); + return this; + } + + /** + * Get relatedParty + * @return relatedParty + **/ + @Schema(description = "") + @NotNull + @Valid + public List getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List relatedParty) { + this.relatedParty = relatedParty; + } + + public Product status(ProductStatusType status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @Schema(description = "") + @NotNull + + @Valid + public ProductStatusType getStatus() { + return status; + } + + public void setStatus(ProductStatusType status) { + this.status = status; + } + + public Product _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 Product _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 Product _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; + } + Product product = (Product) o; + return Objects.equals(this.id, product.id) && + Objects.equals(this.href, product.href) && + Objects.equals(this.description, product.description) && + Objects.equals(this.isBundle, product.isBundle) && + Objects.equals(this.isCustomerVisible, product.isCustomerVisible) && + Objects.equals(this.name, product.name) && + Objects.equals(this.orderDate, product.orderDate) && + Objects.equals(this.productSerialNumber, product.productSerialNumber) && + Objects.equals(this.startDate, product.startDate) && + Objects.equals(this.terminationDate, product.terminationDate) && + Objects.equals(this.agreement, product.agreement) && + Objects.equals(this.billingAccount, product.billingAccount) && + Objects.equals(this.place, product.place) && + Objects.equals(this.product, product.product) && + Objects.equals(this.productCharacteristic, product.productCharacteristic) && + Objects.equals(this.productOffering, product.productOffering) && + Objects.equals(this.productOrderItem, product.productOrderItem) && + Objects.equals(this.productPrice, product.productPrice) && + Objects.equals(this.productRelationship, product.productRelationship) && + Objects.equals(this.productSpecification, product.productSpecification) && + Objects.equals(this.productTerm, product.productTerm) && + Objects.equals(this.realizingResource, product.realizingResource) && + Objects.equals(this.realizingService, product.realizingService) && + Objects.equals(this.relatedParty, product.relatedParty) && + Objects.equals(this.status, product.status) && + Objects.equals(this._atBaseType, product._atBaseType) && + Objects.equals(this._atSchemaLocation, product._atSchemaLocation) && + Objects.equals(this._atType, product._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, _atBaseType, _atSchemaLocation, _atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Product {\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"); + 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/ProductAttributeValueChangeEvent.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductAttributeValueChangeEvent.java new file mode 100644 index 0000000..3511cd1 --- /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 0000000..50b4c3a --- /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 0000000..f1a1186 --- /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 0000000..e90831c --- /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 0000000..571957c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductCreate.java @@ -0,0 +1,819 @@ +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.po622.model.AgreementItemRef; +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 agreement = null; + + @JsonProperty("billingAccount") + private BillingAccountRef billingAccount = null; + + @JsonProperty("place") + @Valid + private List place = null; + + @JsonProperty("product") + @Valid + private List product = null; + + @JsonProperty("productCharacteristic") + @Valid + private List productCharacteristic = null; + + @JsonProperty("productOffering") + private ProductOfferingRef productOffering = null; + + @JsonProperty("productOrderItem") + @Valid + private List productOrderItem = null; + + @JsonProperty("productPrice") + @Valid + private List productPrice = null; + + @JsonProperty("productRelationship") + @Valid + private List productRelationship = null; + + @JsonProperty("productSpecification") + private ProductSpecificationRef productSpecification = null; + + @JsonProperty("productTerm") + @Valid + private List productTerm = null; + + @JsonProperty("realizingResource") + @Valid + private List realizingResource = null; + + @JsonProperty("realizingService") + @Valid + private List realizingService = null; + + @JsonProperty("relatedParty") + @Valid + private List 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 agreement) { + this.agreement = agreement; + return this; + } + + public ProductCreate addAgreementItem(AgreementItemRef agreementItem) { + if (this.agreement == null) { + this.agreement = new ArrayList(); + } + this.agreement.add(agreementItem); + return this; + } + + /** + * Get agreement + * @return agreement + **/ + @Schema(description = "") + @NotNull + @Valid + public List getAgreement() { + return agreement; + } + + public void setAgreement(List 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 place) { + this.place = place; + return this; + } + + public ProductCreate addPlaceItem(RelatedPlaceRefOrValue placeItem) { + if (this.place == null) { + this.place = new ArrayList(); + } + this.place.add(placeItem); + return this; + } + + /** + * Get place + * @return place + **/ + @Schema(description = "") + @NotNull + @Valid + public List getPlace() { + return place; + } + + public void setPlace(List place) { + this.place = place; + } + + public ProductCreate product(List product) { + this.product = product; + return this; + } + + public ProductCreate addProductItem(ProductRefOrValue productItem) { + if (this.product == null) { + this.product = new ArrayList(); + } + this.product.add(productItem); + return this; + } + + /** + * Get product + * @return product + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProduct() { + return product; + } + + public void setProduct(List product) { + this.product = product; + } + + public ProductCreate productCharacteristic(List productCharacteristic) { + this.productCharacteristic = productCharacteristic; + return this; + } + + public ProductCreate addProductCharacteristicItem(Characteristic productCharacteristicItem) { + if (this.productCharacteristic == null) { + this.productCharacteristic = new ArrayList(); + } + this.productCharacteristic.add(productCharacteristicItem); + return this; + } + + /** + * Get productCharacteristic + * @return productCharacteristic + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductCharacteristic() { + return productCharacteristic; + } + + public void setProductCharacteristic(List 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 productOrderItem) { + this.productOrderItem = productOrderItem; + return this; + } + + public ProductCreate addProductOrderItemItem(RelatedProductOrderItem productOrderItemItem) { + if (this.productOrderItem == null) { + this.productOrderItem = new ArrayList(); + } + this.productOrderItem.add(productOrderItemItem); + return this; + } + + /** + * Get productOrderItem + * @return productOrderItem + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductOrderItem() { + return productOrderItem; + } + + public void setProductOrderItem(List productOrderItem) { + this.productOrderItem = productOrderItem; + } + + public ProductCreate productPrice(List productPrice) { + this.productPrice = productPrice; + return this; + } + + public ProductCreate addProductPriceItem(ProductPrice productPriceItem) { + if (this.productPrice == null) { + this.productPrice = new ArrayList(); + } + this.productPrice.add(productPriceItem); + return this; + } + + /** + * Get productPrice + * @return productPrice + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductPrice() { + return productPrice; + } + + public void setProductPrice(List productPrice) { + this.productPrice = productPrice; + } + + public ProductCreate productRelationship(List productRelationship) { + this.productRelationship = productRelationship; + return this; + } + + public ProductCreate addProductRelationshipItem(ProductRelationship productRelationshipItem) { + if (this.productRelationship == null) { + this.productRelationship = new ArrayList(); + } + this.productRelationship.add(productRelationshipItem); + return this; + } + + /** + * Get productRelationship + * @return productRelationship + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductRelationship() { + return productRelationship; + } + + public void setProductRelationship(List 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) { + this.productTerm = productTerm; + return this; + } + + public ProductCreate addProductTermItem(ProductTerm productTermItem) { + if (this.productTerm == null) { + this.productTerm = new ArrayList(); + } + this.productTerm.add(productTermItem); + return this; + } + + /** + * Get productTerm + * @return productTerm + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductTerm() { + return productTerm; + } + + public void setProductTerm(List productTerm) { + this.productTerm = productTerm; + } + + public ProductCreate realizingResource(List realizingResource) { + this.realizingResource = realizingResource; + return this; + } + + public ProductCreate addRealizingResourceItem(ResourceRef realizingResourceItem) { + if (this.realizingResource == null) { + this.realizingResource = new ArrayList(); + } + this.realizingResource.add(realizingResourceItem); + return this; + } + + /** + * Get realizingResource + * @return realizingResource + **/ + @Schema(description = "") + @NotNull + @Valid + public List getRealizingResource() { + return realizingResource; + } + + public void setRealizingResource(List realizingResource) { + this.realizingResource = realizingResource; + } + + public ProductCreate realizingService(List realizingService) { + this.realizingService = realizingService; + return this; + } + + public ProductCreate addRealizingServiceItem(ServiceRef realizingServiceItem) { + if (this.realizingService == null) { + this.realizingService = new ArrayList(); + } + this.realizingService.add(realizingServiceItem); + return this; + } + + /** + * Get realizingService + * @return realizingService + **/ + @Schema(description = "") + @NotNull + @Valid + public List getRealizingService() { + return realizingService; + } + + public void setRealizingService(List realizingService) { + this.realizingService = realizingService; + } + + public ProductCreate relatedParty(List relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public ProductCreate addRelatedPartyItem(RelatedParty relatedPartyItem) { + if (this.relatedParty == null) { + this.relatedParty = new ArrayList(); + } + this.relatedParty.add(relatedPartyItem); + return this; + } + + /** + * Get relatedParty + * @return relatedParty + **/ + @Schema(description = "") + @NotNull + @Valid + public List getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List 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 0000000..74731e4 --- /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 0000000..e292e83 --- /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 0000000..6637c5c --- /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 0000000..fbe073e --- /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/pim637/model/ProductOfferingPriceRef.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductOfferingPriceRef.java new file mode 100644 index 0000000..c7fada7 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductOfferingPriceRef.java @@ -0,0 +1,229 @@ +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; + +/** + * 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 = "2024-08-04T00:27:07.324017400+03: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 _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = 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(required = true, 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.") + @NotNull + + 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.") + @NotNull + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ProductOfferingPriceRef _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 ProductOfferingPriceRef _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 ProductOfferingPriceRef _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; + } + + 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.") + @NotNull + + 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._atBaseType, productOfferingPriceRef._atBaseType) && + Objects.equals(this._atSchemaLocation, productOfferingPriceRef._atSchemaLocation) && + Objects.equals(this._atType, productOfferingPriceRef._atType) && + Objects.equals(this._atReferredType, productOfferingPriceRef._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 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(" _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(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/ProductOfferingRef.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductOfferingRef.java new file mode 100644 index 0000000..e9933e8 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductOfferingRef.java @@ -0,0 +1,229 @@ +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; + +/** + * 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 = "2024-08-04T00:27:07.324017400+03: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 _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = 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(required = true, 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.") + @NotNull + + 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.") + @NotNull + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ProductOfferingRef _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 ProductOfferingRef _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 ProductOfferingRef _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; + } + + 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.") + @NotNull + + 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._atBaseType, productOfferingRef._atBaseType) && + Objects.equals(this._atSchemaLocation, productOfferingRef._atSchemaLocation) && + Objects.equals(this._atType, productOfferingRef._atType) && + Objects.equals(this._atReferredType, productOfferingRef._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 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(" _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(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/ProductPrice.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductPrice.java new file mode 100644 index 0000000..e233652 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductPrice.java @@ -0,0 +1,369 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.ArrayList; +import java.util.List; +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; + +/** + * 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. + */ +@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 = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class ProductPrice { + @JsonProperty("description") + private String description = null; + + @JsonProperty("name") + private String name = null; + + @JsonProperty("priceType") + private String priceType = null; + + @JsonProperty("recurringChargePeriod") + private String recurringChargePeriod = null; + + @JsonProperty("unitOfMeasure") + private String unitOfMeasure = null; + + @JsonProperty("billingAccount") + private BillingAccountRef billingAccount = null; + + @JsonProperty("price") + private Price price = null; + + @JsonProperty("productOfferingPrice") + private ProductOfferingPriceRef productOfferingPrice = null; + + @JsonProperty("productPriceAlteration") + @Valid + private List productPriceAlteration = null; + + @JsonProperty("@baseType") + private String _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = null; + + public ProductPrice description(String description) { + this.description = description; + return this; + } + + /** + * 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; + } + + public void setDescription(String description) { + this.description = description; + } + + public ProductPrice name(String name) { + this.name = name; + return this; + } + + /** + * 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; + } + + public void setName(String name) { + this.name = name; + } + + public ProductPrice priceType(String priceType) { + this.priceType = priceType; + return this; + } + + /** + * A category that describes the price, such as recurring, discount, allowance, penalty, and so forth. + * @return priceType + **/ + @Schema(required = true, description = "A category that describes the price, such as recurring, discount, allowance, penalty, and so forth.") + @NotNull + + public String getPriceType() { + return priceType; + } + + public void setPriceType(String priceType) { + this.priceType = priceType; + } + + public ProductPrice recurringChargePeriod(String recurringChargePeriod) { + this.recurringChargePeriod = recurringChargePeriod; + return this; + } + + /** + * Could be month, week... + * @return recurringChargePeriod + **/ + @Schema(description = "Could be month, week...") + @NotNull + + public String getRecurringChargePeriod() { + return recurringChargePeriod; + } + + public void setRecurringChargePeriod(String recurringChargePeriod) { + this.recurringChargePeriod = recurringChargePeriod; + } + + public ProductPrice unitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + return this; + } + + /** + * Could be minutes, GB... + * @return unitOfMeasure + **/ + @Schema(description = "Could be minutes, GB...") + @NotNull + + public String getUnitOfMeasure() { + return unitOfMeasure; + } + + public void setUnitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + } + + public ProductPrice 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 ProductPrice price(Price price) { + this.price = price; + return this; + } + + /** + * Get price + * @return price + **/ + @Schema(required = true, description = "") + @NotNull + + @Valid + public Price getPrice() { + return price; + } + + public void setPrice(Price price) { + this.price = price; + } + + public ProductPrice productOfferingPrice(ProductOfferingPriceRef productOfferingPrice) { + this.productOfferingPrice = productOfferingPrice; + return this; + } + + /** + * Get productOfferingPrice + * @return productOfferingPrice + **/ + @Schema(description = "") + @NotNull + + @Valid + public ProductOfferingPriceRef getProductOfferingPrice() { + return productOfferingPrice; + } + + public void setProductOfferingPrice(ProductOfferingPriceRef productOfferingPrice) { + this.productOfferingPrice = productOfferingPrice; + } + + public ProductPrice productPriceAlteration(List productPriceAlteration) { + this.productPriceAlteration = productPriceAlteration; + return this; + } + + public ProductPrice addProductPriceAlterationItem(PriceAlteration productPriceAlterationItem) { + if (this.productPriceAlteration == null) { + this.productPriceAlteration = new ArrayList(); + } + this.productPriceAlteration.add(productPriceAlterationItem); + return this; + } + + /** + * Get productPriceAlteration + * @return productPriceAlteration + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductPriceAlteration() { + return productPriceAlteration; + } + + public void setProductPriceAlteration(List productPriceAlteration) { + this.productPriceAlteration = productPriceAlteration; + } + + public ProductPrice _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 ProductPrice _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 ProductPrice _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; + } + ProductPrice productPrice = (ProductPrice) o; + return Objects.equals(this.description, productPrice.description) && + Objects.equals(this.name, productPrice.name) && + Objects.equals(this.priceType, productPrice.priceType) && + Objects.equals(this.recurringChargePeriod, productPrice.recurringChargePeriod) && + Objects.equals(this.unitOfMeasure, productPrice.unitOfMeasure) && + Objects.equals(this.billingAccount, productPrice.billingAccount) && + Objects.equals(this.price, productPrice.price) && + Objects.equals(this.productOfferingPrice, productPrice.productOfferingPrice) && + Objects.equals(this.productPriceAlteration, productPrice.productPriceAlteration) && + Objects.equals(this._atBaseType, productPrice._atBaseType) && + Objects.equals(this._atSchemaLocation, productPrice._atSchemaLocation) && + Objects.equals(this._atType, productPrice._atType); + } + + @Override + public int hashCode() { + return Objects.hash(description, name, priceType, recurringChargePeriod, unitOfMeasure, billingAccount, price, productOfferingPrice, productPriceAlteration, _atBaseType, _atSchemaLocation, _atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductPrice {\n"); + + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" priceType: ").append(toIndentedString(priceType)).append("\n"); + sb.append(" recurringChargePeriod: ").append(toIndentedString(recurringChargePeriod)).append("\n"); + sb.append(" unitOfMeasure: ").append(toIndentedString(unitOfMeasure)).append("\n"); + sb.append(" billingAccount: ").append(toIndentedString(billingAccount)).append("\n"); + 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(" _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/ProductRef.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRef.java new file mode 100644 index 0000000..4f0fca5 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRef.java @@ -0,0 +1,228 @@ +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; + +/** + * ProductRef + */ +@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 ProductRef { + @JsonProperty("id") + private String id = null; + + @JsonProperty("href") + private String href = null; + + @JsonProperty("name") + private String name = null; + + @JsonProperty("@baseType") + private String _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = null; + + @JsonProperty("@referredType") + private String _atReferredType = null; + + public ProductRef id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of a related entity. + * @return id + **/ + @Schema(required = true, description = "Unique identifier of a related entity.") + @NotNull + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ProductRef href(String href) { + this.href = href; + return this; + } + + /** + * Reference of the related entity. + * @return href + **/ + @Schema(description = "Reference of the related entity.") + @NotNull + + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public ProductRef name(String name) { + this.name = name; + return this; + } + + /** + * Name of the related entity. + * @return name + **/ + @Schema(description = "Name of the related entity.") + @NotNull + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ProductRef _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 ProductRef _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 ProductRef _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; + } + + public ProductRef _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; + } + + 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; + } + ProductRef productRef = (ProductRef) o; + return Objects.equals(this.id, productRef.id) && + Objects.equals(this.href, productRef.href) && + Objects.equals(this.name, productRef.name) && + Objects.equals(this._atBaseType, productRef._atBaseType) && + Objects.equals(this._atSchemaLocation, productRef._atSchemaLocation) && + Objects.equals(this._atType, productRef._atType) && + Objects.equals(this._atReferredType, productRef._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 ProductRef {\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(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/ProductRefOrValue.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRefOrValue.java new file mode 100644 index 0000000..e4b1308 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRefOrValue.java @@ -0,0 +1,894 @@ +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.po622.model.AgreementItemRef; +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 + */ +@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]") + + +public class ProductRefOrValue { + @JsonProperty("id") + private String id = null; + + @JsonProperty("href") + private String href = null; + + @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 agreement = null; + + @JsonProperty("billingAccount") + private BillingAccountRef billingAccount = null; + + @JsonProperty("place") + @Valid + private List place = null; + + @JsonProperty("product") + @Valid + private List product = null; + + @JsonProperty("productCharacteristic") + @Valid + private List productCharacteristic = null; + + @JsonProperty("productOffering") + private ProductOfferingRef productOffering = null; + + @JsonProperty("productOrderItem") + @Valid + private List productOrderItem = null; + + @JsonProperty("productPrice") + @Valid + private List productPrice = null; + + @JsonProperty("productRelationship") + @Valid + private List productRelationship = null; + + @JsonProperty("productSpecification") + private ProductSpecificationRef productSpecification = null; + + @JsonProperty("productTerm") + @Valid + private List productTerm = null; + + @JsonProperty("realizingResource") + @Valid + private List realizingResource = null; + + @JsonProperty("realizingService") + @Valid + private List realizingService = null; + + @JsonProperty("relatedParty") + @Valid + private List 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; + + @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") + @NotNull + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ProductRefOrValue href(String href) { + this.href = href; + return this; + } + + /** + * Reference of the product + * @return href + **/ + @Schema(description = "Reference of the product") + @NotNull + + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue agreement(List agreement) { + this.agreement = agreement; + return this; + } + + public ProductRefOrValue addAgreementItem(AgreementItemRef agreementItem) { + if (this.agreement == null) { + this.agreement = new ArrayList(); + } + this.agreement.add(agreementItem); + return this; + } + + /** + * Get agreement + * @return agreement + **/ + @Schema(description = "") + @NotNull + @Valid + public List getAgreement() { + return agreement; + } + + public void setAgreement(List agreement) { + this.agreement = agreement; + } + + public ProductRefOrValue 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 ProductRefOrValue place(List place) { + this.place = place; + return this; + } + + public ProductRefOrValue addPlaceItem(RelatedPlaceRefOrValue placeItem) { + if (this.place == null) { + this.place = new ArrayList(); + } + this.place.add(placeItem); + return this; + } + + /** + * Get place + * @return place + **/ + @Schema(description = "") + @NotNull + @Valid + public List getPlace() { + return place; + } + + public void setPlace(List place) { + this.place = place; + } + + public ProductRefOrValue product(List product) { + this.product = product; + return this; + } + + public ProductRefOrValue addProductItem(ProductRefOrValue productItem) { + if (this.product == null) { + this.product = new ArrayList(); + } + this.product.add(productItem); + return this; + } + + /** + * Get product + * @return product + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProduct() { + return product; + } + + public void setProduct(List product) { + this.product = product; + } + + public ProductRefOrValue productCharacteristic(List productCharacteristic) { + this.productCharacteristic = productCharacteristic; + return this; + } + + public ProductRefOrValue addProductCharacteristicItem(Characteristic productCharacteristicItem) { + if (this.productCharacteristic == null) { + this.productCharacteristic = new ArrayList(); + } + this.productCharacteristic.add(productCharacteristicItem); + return this; + } + + /** + * Get productCharacteristic + * @return productCharacteristic + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductCharacteristic() { + return productCharacteristic; + } + + public void setProductCharacteristic(List productCharacteristic) { + this.productCharacteristic = productCharacteristic; + } + + public ProductRefOrValue 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 ProductRefOrValue productOrderItem(List productOrderItem) { + this.productOrderItem = productOrderItem; + return this; + } + + public ProductRefOrValue addProductOrderItemItem(RelatedProductOrderItem productOrderItemItem) { + if (this.productOrderItem == null) { + this.productOrderItem = new ArrayList(); + } + this.productOrderItem.add(productOrderItemItem); + return this; + } + + /** + * Get productOrderItem + * @return productOrderItem + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductOrderItem() { + return productOrderItem; + } + + public void setProductOrderItem(List productOrderItem) { + this.productOrderItem = productOrderItem; + } + + public ProductRefOrValue productPrice(List productPrice) { + this.productPrice = productPrice; + return this; + } + + public ProductRefOrValue addProductPriceItem(ProductPrice productPriceItem) { + if (this.productPrice == null) { + this.productPrice = new ArrayList(); + } + this.productPrice.add(productPriceItem); + return this; + } + + /** + * Get productPrice + * @return productPrice + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductPrice() { + return productPrice; + } + + public void setProductPrice(List productPrice) { + this.productPrice = productPrice; + } + + public ProductRefOrValue productRelationship(List productRelationship) { + this.productRelationship = productRelationship; + return this; + } + + public ProductRefOrValue addProductRelationshipItem(ProductRelationship productRelationshipItem) { + if (this.productRelationship == null) { + this.productRelationship = new ArrayList(); + } + this.productRelationship.add(productRelationshipItem); + return this; + } + + /** + * Get productRelationship + * @return productRelationship + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductRelationship() { + return productRelationship; + } + + public void setProductRelationship(List productRelationship) { + this.productRelationship = productRelationship; + } + + public ProductRefOrValue 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 ProductRefOrValue productTerm(List productTerm) { + this.productTerm = productTerm; + return this; + } + + public ProductRefOrValue addProductTermItem(ProductTerm productTermItem) { + if (this.productTerm == null) { + this.productTerm = new ArrayList(); + } + this.productTerm.add(productTermItem); + return this; + } + + /** + * Get productTerm + * @return productTerm + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductTerm() { + return productTerm; + } + + public void setProductTerm(List productTerm) { + this.productTerm = productTerm; + } + + public ProductRefOrValue realizingResource(List realizingResource) { + this.realizingResource = realizingResource; + return this; + } + + public ProductRefOrValue addRealizingResourceItem(ResourceRef realizingResourceItem) { + if (this.realizingResource == null) { + this.realizingResource = new ArrayList(); + } + this.realizingResource.add(realizingResourceItem); + return this; + } + + /** + * Get realizingResource + * @return realizingResource + **/ + @Schema(description = "") + @NotNull + @Valid + public List getRealizingResource() { + return realizingResource; + } + + public void setRealizingResource(List realizingResource) { + this.realizingResource = realizingResource; + } + + public ProductRefOrValue realizingService(List realizingService) { + this.realizingService = realizingService; + return this; + } + + public ProductRefOrValue addRealizingServiceItem(ServiceRef realizingServiceItem) { + if (this.realizingService == null) { + this.realizingService = new ArrayList(); + } + this.realizingService.add(realizingServiceItem); + return this; + } + + /** + * Get realizingService + * @return realizingService + **/ + @Schema(description = "") + @NotNull + @Valid + public List getRealizingService() { + return realizingService; + } + + public void setRealizingService(List realizingService) { + this.realizingService = realizingService; + } + + public ProductRefOrValue relatedParty(List relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public ProductRefOrValue addRelatedPartyItem(RelatedParty relatedPartyItem) { + if (this.relatedParty == null) { + this.relatedParty = new ArrayList(); + } + this.relatedParty.add(relatedPartyItem); + return this; + } + + /** + * Get relatedParty + * @return relatedParty + **/ + @Schema(description = "") + @NotNull + @Valid + public List getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List relatedParty) { + this.relatedParty = relatedParty; + } + + public ProductRefOrValue status(ProductStatusType status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @Schema(description = "") + @NotNull + + @Valid + public ProductStatusType getStatus() { + return status; + } + + public void setStatus(ProductStatusType status) { + this.status = status; + } + + public ProductRefOrValue _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 ProductRefOrValue _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 ProductRefOrValue _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; + } + + 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.") + @NotNull + + 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; + } + 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._atBaseType, productRefOrValue._atBaseType) && + Objects.equals(this._atSchemaLocation, productRefOrValue._atSchemaLocation) && + Objects.equals(this._atType, productRefOrValue._atType) && + Objects.equals(this._atReferredType, productRefOrValue._atReferredType); + } + + @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, _atBaseType, _atSchemaLocation, _atType, _atReferredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductRefOrValue {\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"); + 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(" _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/pim637/model/ProductRelationship.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRelationship.java new file mode 100644 index 0000000..e0da3df --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRelationship.java @@ -0,0 +1,181 @@ +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; + +/** + * 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 + */ +@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 = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class ProductRelationship { + @JsonProperty("relationshipType") + private String relationshipType = null; + + @JsonProperty("product") + private ProductRefOrValue product = null; + + @JsonProperty("@baseType") + private String _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = null; + + public ProductRelationship relationshipType(String relationshipType) { + this.relationshipType = relationshipType; + return this; + } + + /** + * 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(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() { + return relationshipType; + } + + public void setRelationshipType(String relationshipType) { + this.relationshipType = relationshipType; + } + + public ProductRelationship product(ProductRefOrValue product) { + this.product = product; + return this; + } + + /** + * Get product + * @return product + **/ + @Schema(required = true, description = "") + @NotNull + + @Valid + public ProductRefOrValue getProduct() { + return product; + } + + public void setProduct(ProductRefOrValue product) { + this.product = product; + } + + public ProductRelationship _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 ProductRelationship _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 ProductRelationship _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; + } + ProductRelationship productRelationship = (ProductRelationship) o; + return Objects.equals(this.relationshipType, productRelationship.relationshipType) && + Objects.equals(this.product, productRelationship.product) && + Objects.equals(this._atBaseType, productRelationship._atBaseType) && + Objects.equals(this._atSchemaLocation, productRelationship._atSchemaLocation) && + Objects.equals(this._atType, productRelationship._atType); + } + + @Override + public int hashCode() { + return Objects.hash(relationshipType, product, _atBaseType, _atSchemaLocation, _atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductRelationship {\n"); + + sb.append(" relationshipType: ").append(toIndentedString(relationshipType)).append("\n"); + sb.append(" product: ").append(toIndentedString(product)).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/ProductSpecificationRef.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductSpecificationRef.java new file mode 100644 index 0000000..6139e53 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductSpecificationRef.java @@ -0,0 +1,281 @@ +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; + +/** + * 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 = "2024-08-04T00:27:07.324017400+03: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 _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = 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(required = true, 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.") + @NotNull + + 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.") + @NotNull + + 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") + @NotNull + + 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 = "") + @NotNull + + @Valid + public TargetProductSchema getTargetProductSchema() { + return targetProductSchema; + } + + public void setTargetProductSchema(TargetProductSchema targetProductSchema) { + this.targetProductSchema = targetProductSchema; + } + + public ProductSpecificationRef _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 ProductSpecificationRef _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 ProductSpecificationRef _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; + } + + 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.") + @NotNull + + 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._atBaseType, productSpecificationRef._atBaseType) && + Objects.equals(this._atSchemaLocation, productSpecificationRef._atSchemaLocation) && + Objects.equals(this._atType, productSpecificationRef._atType) && + Objects.equals(this._atReferredType, productSpecificationRef._atReferredType); + } + + @Override + public int hashCode() { + return Objects.hash(id, href, name, version, targetProductSchema, _atBaseType, _atSchemaLocation, _atType, _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(" _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(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/ProductStateChangeEvent.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductStateChangeEvent.java new file mode 100644 index 0000000..a5aa7f6 --- /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 0000000..a492a3f --- /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 0000000..3623cfc --- /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/pim637/model/ProductTerm.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductTerm.java new file mode 100644 index 0000000..be680b1 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductTerm.java @@ -0,0 +1,233 @@ +package org.etsi.osl.tmf.pim637.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +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.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 = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class ProductTerm { + @JsonProperty("description") + private String description = null; + + @JsonProperty("name") + private String name = null; + + @JsonProperty("duration") + private Quantity duration = null; + + @JsonProperty("validFor") + private TimePeriod validFor = null; + + @JsonProperty("@baseType") + private String _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = null; + + public ProductTerm description(String description) { + this.description = description; + return this; + } + + /** + * Description of the productTerm + * @return description + **/ + @Schema(description = "Description of the productTerm") + @NotNull + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ProductTerm name(String name) { + this.name = name; + return this; + } + + /** + * Name of the productTerm + * @return name + **/ + @Schema(description = "Name of the productTerm") + @NotNull + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ProductTerm duration(Quantity duration) { + this.duration = duration; + return this; + } + + /** + * Get duration + * @return duration + **/ + @Schema(description = "") + @NotNull + + @Valid + public Quantity getDuration() { + return duration; + } + + public void setDuration(Quantity duration) { + this.duration = duration; + } + + public ProductTerm validFor(TimePeriod validFor) { + this.validFor = validFor; + return this; + } + + /** + * Get validFor + * @return validFor + **/ + @Schema(description = "") + @NotNull + + @Valid + public TimePeriod getValidFor() { + return validFor; + } + + public void setValidFor(TimePeriod validFor) { + this.validFor = validFor; + } + + public ProductTerm _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 ProductTerm _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 ProductTerm _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; + } + ProductTerm productTerm = (ProductTerm) o; + return Objects.equals(this.description, productTerm.description) && + Objects.equals(this.name, productTerm.name) && + Objects.equals(this.duration, productTerm.duration) && + Objects.equals(this.validFor, productTerm.validFor) && + Objects.equals(this._atBaseType, productTerm._atBaseType) && + Objects.equals(this._atSchemaLocation, productTerm._atSchemaLocation) && + Objects.equals(this._atType, productTerm._atType); + } + + @Override + public int hashCode() { + return Objects.hash(description, name, duration, validFor, _atBaseType, _atSchemaLocation, _atType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductTerm {\n"); + + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + 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(" _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/ProductUpdate.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductUpdate.java new file mode 100644 index 0000000..a839117 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductUpdate.java @@ -0,0 +1,819 @@ +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.po622.model.AgreementItemRef; +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 ProductUpdate { + @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 agreement = null; + + @JsonProperty("billingAccount") + private BillingAccountRef billingAccount = null; + + @JsonProperty("place") + @Valid + private List place = null; + + @JsonProperty("product") + @Valid + private List product = null; + + @JsonProperty("productCharacteristic") + @Valid + private List productCharacteristic = null; + + @JsonProperty("productOffering") + private ProductOfferingRef productOffering = null; + + @JsonProperty("productOrderItem") + @Valid + private List productOrderItem = null; + + @JsonProperty("productPrice") + @Valid + private List productPrice = null; + + @JsonProperty("productRelationship") + @Valid + private List productRelationship = null; + + @JsonProperty("productSpecification") + private ProductSpecificationRef productSpecification = null; + + @JsonProperty("productTerm") + @Valid + private List productTerm = null; + + @JsonProperty("realizingResource") + @Valid + private List realizingResource = null; + + @JsonProperty("realizingService") + @Valid + private List realizingService = null; + + @JsonProperty("relatedParty") + @Valid + private List 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 ProductUpdate 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 ProductUpdate 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 ProductUpdate 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 ProductUpdate 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 ProductUpdate 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 ProductUpdate 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 ProductUpdate 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 ProductUpdate 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 ProductUpdate agreement(List agreement) { + this.agreement = agreement; + return this; + } + + public ProductUpdate addAgreementItem(AgreementItemRef agreementItem) { + if (this.agreement == null) { + this.agreement = new ArrayList(); + } + this.agreement.add(agreementItem); + return this; + } + + /** + * Get agreement + * @return agreement + **/ + @Schema(description = "") + @NotNull + @Valid + public List getAgreement() { + return agreement; + } + + public void setAgreement(List agreement) { + this.agreement = agreement; + } + + public ProductUpdate 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 ProductUpdate place(List place) { + this.place = place; + return this; + } + + public ProductUpdate addPlaceItem(RelatedPlaceRefOrValue placeItem) { + if (this.place == null) { + this.place = new ArrayList(); + } + this.place.add(placeItem); + return this; + } + + /** + * Get place + * @return place + **/ + @Schema(description = "") + @NotNull + @Valid + public List getPlace() { + return place; + } + + public void setPlace(List place) { + this.place = place; + } + + public ProductUpdate product(List product) { + this.product = product; + return this; + } + + public ProductUpdate addProductItem(ProductRefOrValue productItem) { + if (this.product == null) { + this.product = new ArrayList(); + } + this.product.add(productItem); + return this; + } + + /** + * Get product + * @return product + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProduct() { + return product; + } + + public void setProduct(List product) { + this.product = product; + } + + public ProductUpdate productCharacteristic(List productCharacteristic) { + this.productCharacteristic = productCharacteristic; + return this; + } + + public ProductUpdate addProductCharacteristicItem(Characteristic productCharacteristicItem) { + if (this.productCharacteristic == null) { + this.productCharacteristic = new ArrayList(); + } + this.productCharacteristic.add(productCharacteristicItem); + return this; + } + + /** + * Get productCharacteristic + * @return productCharacteristic + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductCharacteristic() { + return productCharacteristic; + } + + public void setProductCharacteristic(List productCharacteristic) { + this.productCharacteristic = productCharacteristic; + } + + public ProductUpdate 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 ProductUpdate productOrderItem(List productOrderItem) { + this.productOrderItem = productOrderItem; + return this; + } + + public ProductUpdate addProductOrderItemItem(RelatedProductOrderItem productOrderItemItem) { + if (this.productOrderItem == null) { + this.productOrderItem = new ArrayList(); + } + this.productOrderItem.add(productOrderItemItem); + return this; + } + + /** + * Get productOrderItem + * @return productOrderItem + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductOrderItem() { + return productOrderItem; + } + + public void setProductOrderItem(List productOrderItem) { + this.productOrderItem = productOrderItem; + } + + public ProductUpdate productPrice(List productPrice) { + this.productPrice = productPrice; + return this; + } + + public ProductUpdate addProductPriceItem(ProductPrice productPriceItem) { + if (this.productPrice == null) { + this.productPrice = new ArrayList(); + } + this.productPrice.add(productPriceItem); + return this; + } + + /** + * Get productPrice + * @return productPrice + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductPrice() { + return productPrice; + } + + public void setProductPrice(List productPrice) { + this.productPrice = productPrice; + } + + public ProductUpdate productRelationship(List productRelationship) { + this.productRelationship = productRelationship; + return this; + } + + public ProductUpdate addProductRelationshipItem(ProductRelationship productRelationshipItem) { + if (this.productRelationship == null) { + this.productRelationship = new ArrayList(); + } + this.productRelationship.add(productRelationshipItem); + return this; + } + + /** + * Get productRelationship + * @return productRelationship + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductRelationship() { + return productRelationship; + } + + public void setProductRelationship(List productRelationship) { + this.productRelationship = productRelationship; + } + + public ProductUpdate 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 ProductUpdate productTerm(List productTerm) { + this.productTerm = productTerm; + return this; + } + + public ProductUpdate addProductTermItem(ProductTerm productTermItem) { + if (this.productTerm == null) { + this.productTerm = new ArrayList(); + } + this.productTerm.add(productTermItem); + return this; + } + + /** + * Get productTerm + * @return productTerm + **/ + @Schema(description = "") + @NotNull + @Valid + public List getProductTerm() { + return productTerm; + } + + public void setProductTerm(List productTerm) { + this.productTerm = productTerm; + } + + public ProductUpdate realizingResource(List realizingResource) { + this.realizingResource = realizingResource; + return this; + } + + public ProductUpdate addRealizingResourceItem(ResourceRef realizingResourceItem) { + if (this.realizingResource == null) { + this.realizingResource = new ArrayList(); + } + this.realizingResource.add(realizingResourceItem); + return this; + } + + /** + * Get realizingResource + * @return realizingResource + **/ + @Schema(description = "") + @NotNull + @Valid + public List getRealizingResource() { + return realizingResource; + } + + public void setRealizingResource(List realizingResource) { + this.realizingResource = realizingResource; + } + + public ProductUpdate realizingService(List realizingService) { + this.realizingService = realizingService; + return this; + } + + public ProductUpdate addRealizingServiceItem(ServiceRef realizingServiceItem) { + if (this.realizingService == null) { + this.realizingService = new ArrayList(); + } + this.realizingService.add(realizingServiceItem); + return this; + } + + /** + * Get realizingService + * @return realizingService + **/ + @Schema(description = "") + @NotNull + @Valid + public List getRealizingService() { + return realizingService; + } + + public void setRealizingService(List realizingService) { + this.realizingService = realizingService; + } + + public ProductUpdate relatedParty(List relatedParty) { + this.relatedParty = relatedParty; + return this; + } + + public ProductUpdate addRelatedPartyItem(RelatedParty relatedPartyItem) { + if (this.relatedParty == null) { + this.relatedParty = new ArrayList(); + } + this.relatedParty.add(relatedPartyItem); + return this; + } + + /** + * Get relatedParty + * @return relatedParty + **/ + @Schema(description = "") + @NotNull + @Valid + public List getRelatedParty() { + return relatedParty; + } + + public void setRelatedParty(List relatedParty) { + this.relatedParty = relatedParty; + } + + public ProductUpdate status(ProductStatusType status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @Schema(description = "") + @NotNull + + @Valid + public ProductStatusType getStatus() { + return status; + } + + public void setStatus(ProductStatusType status) { + this.status = status; + } + + public ProductUpdate _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 ProductUpdate _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 ProductUpdate _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; + } + 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(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 ProductUpdate {\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/RelatedPlaceRefOrValue.java b/src/main/java/org/etsi/osl/tmf/pim637/model/RelatedPlaceRefOrValue.java new file mode 100644 index 0000000..7aebfcb --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/RelatedPlaceRefOrValue.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; + +/** + * 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 + */ +@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 = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class RelatedPlaceRefOrValue { + @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 _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = null; + + @JsonProperty("@referredType") + private String _atReferredType = null; + + public RelatedPlaceRefOrValue id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the place + * @return id + **/ + @Schema(description = "Unique identifier of the place") + @NotNull + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public RelatedPlaceRefOrValue href(String href) { + this.href = href; + return this; + } + + /** + * Unique reference of the place + * @return href + **/ + @Schema(description = "Unique reference of the place") + @NotNull + + public String getHref() { + return href; + } + + public void setHref(String href) { + this.href = href; + } + + public RelatedPlaceRefOrValue name(String name) { + this.name = name; + return this; + } + + /** + * 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; + } + + public void setName(String name) { + this.name = name; + } + + public RelatedPlaceRefOrValue role(String role) { + this.role = role; + return this; + } + + /** + * Get role + * @return role + **/ + @Schema(required = true, description = "") + @NotNull + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public RelatedPlaceRefOrValue _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 RelatedPlaceRefOrValue _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 RelatedPlaceRefOrValue _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; + } + + 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; + } + + 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; + } + RelatedPlaceRefOrValue relatedPlaceRefOrValue = (RelatedPlaceRefOrValue) o; + return Objects.equals(this.id, relatedPlaceRefOrValue.id) && + Objects.equals(this.href, relatedPlaceRefOrValue.href) && + Objects.equals(this.name, relatedPlaceRefOrValue.name) && + Objects.equals(this.role, relatedPlaceRefOrValue.role) && + Objects.equals(this._atBaseType, relatedPlaceRefOrValue._atBaseType) && + Objects.equals(this._atSchemaLocation, relatedPlaceRefOrValue._atSchemaLocation) && + Objects.equals(this._atType, relatedPlaceRefOrValue._atType) && + Objects.equals(this._atReferredType, relatedPlaceRefOrValue._atReferredType); + } + + @Override + public int hashCode() { + return Objects.hash(id, href, name, role, _atBaseType, _atSchemaLocation, _atType, _atReferredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelatedPlaceRefOrValue {\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(" role: ").append(toIndentedString(role)).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(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/RelatedProductOrderItem.java b/src/main/java/org/etsi/osl/tmf/pim637/model/RelatedProductOrderItem.java new file mode 100644 index 0000000..3e52de6 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/RelatedProductOrderItem.java @@ -0,0 +1,279 @@ +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; + +/** + * RelatedProductOrderItem (ProductOrder item) .The product order item which triggered product creation/change/termination. + */ +@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 = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") + + +public class RelatedProductOrderItem { + @JsonProperty("orderItemAction") + private String orderItemAction = null; + + @JsonProperty("orderItemId") + private String orderItemId = null; + + @JsonProperty("productOrderHref") + private String productOrderHref = null; + + @JsonProperty("productOrderId") + private String productOrderId = null; + + @JsonProperty("role") + private String role = null; + + @JsonProperty("@baseType") + private String _atBaseType = null; + + @JsonProperty("@schemaLocation") + private String _atSchemaLocation = null; + + @JsonProperty("@type") + private String _atType = null; + + @JsonProperty("@referredType") + private String _atReferredType = null; + + public RelatedProductOrderItem orderItemAction(String orderItemAction) { + this.orderItemAction = orderItemAction; + return this; + } + + /** + * Action of the order item for this product + * @return orderItemAction + **/ + @Schema(description = "Action of the order item for this product") + @NotNull + + public String getOrderItemAction() { + return orderItemAction; + } + + public void setOrderItemAction(String orderItemAction) { + this.orderItemAction = orderItemAction; + } + + public RelatedProductOrderItem orderItemId(String orderItemId) { + this.orderItemId = orderItemId; + return this; + } + + /** + * Identifier of the order item where the product was managed + * @return orderItemId + **/ + @Schema(required = true, description = "Identifier of the order item where the product was managed") + @NotNull + + public String getOrderItemId() { + return orderItemId; + } + + public void setOrderItemId(String orderItemId) { + this.orderItemId = orderItemId; + } + + public RelatedProductOrderItem productOrderHref(String productOrderHref) { + this.productOrderHref = productOrderHref; + return this; + } + + /** + * Reference of the related entity. + * @return productOrderHref + **/ + @Schema(description = "Reference of the related entity.") + @NotNull + + public String getProductOrderHref() { + return productOrderHref; + } + + public void setProductOrderHref(String productOrderHref) { + this.productOrderHref = productOrderHref; + } + + public RelatedProductOrderItem productOrderId(String productOrderId) { + this.productOrderId = productOrderId; + return this; + } + + /** + * Unique identifier of a related entity. + * @return productOrderId + **/ + @Schema(required = true, description = "Unique identifier of a related entity.") + @NotNull + + public String getProductOrderId() { + return productOrderId; + } + + public void setProductOrderId(String productOrderId) { + this.productOrderId = productOrderId; + } + + public RelatedProductOrderItem role(String role) { + this.role = role; + return this; + } + + /** + * role of the product order item for this product + * @return role + **/ + @Schema(description = "role of the product order item for this product") + @NotNull + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public RelatedProductOrderItem _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 RelatedProductOrderItem _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 RelatedProductOrderItem _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; + } + + public RelatedProductOrderItem _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; + } + + 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; + } + RelatedProductOrderItem relatedProductOrderItem = (RelatedProductOrderItem) o; + return Objects.equals(this.orderItemAction, relatedProductOrderItem.orderItemAction) && + Objects.equals(this.orderItemId, relatedProductOrderItem.orderItemId) && + Objects.equals(this.productOrderHref, relatedProductOrderItem.productOrderHref) && + Objects.equals(this.productOrderId, relatedProductOrderItem.productOrderId) && + Objects.equals(this.role, relatedProductOrderItem.role) && + Objects.equals(this._atBaseType, relatedProductOrderItem._atBaseType) && + Objects.equals(this._atSchemaLocation, relatedProductOrderItem._atSchemaLocation) && + Objects.equals(this._atType, relatedProductOrderItem._atType) && + Objects.equals(this._atReferredType, relatedProductOrderItem._atReferredType); + } + + @Override + public int hashCode() { + return Objects.hash(orderItemAction, orderItemId, productOrderHref, productOrderId, role, _atBaseType, _atSchemaLocation, _atType, _atReferredType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RelatedProductOrderItem {\n"); + + sb.append(" orderItemAction: ").append(toIndentedString(orderItemAction)).append("\n"); + sb.append(" orderItemId: ").append(toIndentedString(orderItemId)).append("\n"); + sb.append(" productOrderHref: ").append(toIndentedString(productOrderHref)).append("\n"); + sb.append(" productOrderId: ").append(toIndentedString(productOrderId)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).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(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/TargetProductSchema.java b/src/main/java/org/etsi/osl/tmf/pim637/model/TargetProductSchema.java new file mode 100644 index 0000000..c0659e5 --- /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/po622/model/Characteristic.java b/src/main/java/org/etsi/osl/tmf/po622/model/Characteristic.java deleted file mode 100644 index d709b73..0000000 --- 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/Product.java b/src/main/java/org/etsi/osl/tmf/po622/model/Product.java index ee4c02b..30ee6d1 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/Product.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/Product.java @@ -25,6 +25,7 @@ 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.prm669.model.RelatedParty; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductRefOrValue.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductRefOrValue.java index c77a6ed..d419500 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductRefOrValue.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductRefOrValue.java @@ -25,6 +25,7 @@ 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.prm669.model.RelatedParty; 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 c0ca3cf..0000000 --- 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 db0583c..b972197 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 436574c..5b44359 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 560acbf..3a890cb 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 4b6899d..0000000 --- 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 "); - } -} -- GitLab From 12192c9a3c6e69f86f189e81acff32ca8aca85c8 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Mon, 5 Aug 2024 16:37:04 +0300 Subject: [PATCH 2/9] adding model jpa elements --- .../osl/tmf/am651/model/AgreementItem.java | 2 +- .../tmf/am651/model/ProductOfferingRef.java | 175 ---- .../tmf/pcm620/model/ProductOfferingRef.java | 2 + .../tmf/pim637/model/BillingAccountRef.java | 125 +-- .../org/etsi/osl/tmf/pim637/model/Money.java | 6 +- .../org/etsi/osl/tmf/pim637/model/Price.java | 9 +- .../osl/tmf/pim637/model/PriceAlteration.java | 15 +- .../etsi/osl/tmf/pim637/model/Product.java | 2 + .../osl/tmf/pim637/model/ProductCreate.java | 2 + .../pim637/model/ProductOfferingPriceRef.java | 229 ----- .../tmf/pim637/model/ProductOfferingRef.java | 229 ----- .../osl/tmf/pim637/model/ProductPrice.java | 1 + .../etsi/osl/tmf/pim637/model/ProductRef.java | 92 +- .../tmf/pim637/model/ProductRefOrValue.java | 2 + .../tmf/pim637/model/ProductStatusType.java | 16 +- .../osl/tmf/pim637/model/ProductUpdate.java | 2 + .../pim637/model/RelatedProductOrderItem.java | 279 ------ .../osl/tmf/po622/model/AgreementItemRef.java | 3 - .../osl/tmf/po622/model/AgreementRef.java | 22 +- .../org/etsi/osl/tmf/po622/model/Any.java | 1 - .../osl/tmf/po622/model/AppointmentRef.java | 24 +- .../tmf/po622/model/BillingAccountRef.java | 243 ----- .../etsi/osl/tmf/po622/model/CancelOrder.java | 3 - .../tmf/po622/model/CancelProductOrder.java | 3 - .../po622/model/CancelProductOrderCreate.java | 3 - .../model/CancelProductOrderCreateEvent.java | 3 - .../CancelProductOrderCreateEventPayload.java | 3 - ...lProductOrderInformationRequiredEvent.java | 3 - ...tOrderInformationRequiredEventPayload.java | 3 - .../CancelProductOrderStateChangeEvent.java | 3 - ...elProductOrderStateChangeEventPayload.java | 3 - .../etsi/osl/tmf/po622/model/EntityRef.java | 243 ----- .../org/etsi/osl/tmf/po622/model/Money.java | 121 --- .../tmf/po622/model/OrderItemActionType.java | 8 +- .../po622/model/OrderItemRelationship.java | 15 +- .../etsi/osl/tmf/po622/model/OrderPrice.java | 51 +- .../etsi/osl/tmf/po622/model/OrderTerm.java | 22 +- .../etsi/osl/tmf/po622/model/PaymentRef.java | 24 +- .../org/etsi/osl/tmf/po622/model/Place.java | 217 ----- .../org/etsi/osl/tmf/po622/model/Price.java | 244 ----- .../osl/tmf/po622/model/PriceAlteration.java | 367 -------- .../org/etsi/osl/tmf/po622/model/Product.java | 857 ----------------- .../po622/model/ProductOfferingPriceRef.java | 243 ----- .../ProductOfferingQualificationItemRef.java | 18 +- .../ProductOfferingQualificationRef.java | 22 +- .../tmf/po622/model/ProductOfferingRef.java | 243 ----- .../osl/tmf/po622/model/ProductOrder.java | 542 +++++++---- ...ProductOrderAttributeValueChangeEvent.java | 3 - ...OrderAttributeValueChangeEventPayload.java | 3 - .../tmf/po622/model/ProductOrderCreate.java | 18 +- .../po622/model/ProductOrderCreateEvent.java | 3 - .../model/ProductOrderCreateEventPayload.java | 3 - .../po622/model/ProductOrderDeleteEvent.java | 3 - .../model/ProductOrderDeleteEventPayload.java | 3 - .../ProductOrderInformationRequiredEvent.java | 3 - ...tOrderInformationRequiredEventPayload.java | 3 - .../osl/tmf/po622/model/ProductOrderItem.java | 127 +-- .../model/ProductOrderItemStateType.java | 21 +- .../osl/tmf/po622/model/ProductOrderRef.java | 3 - .../model/ProductOrderStateChangeEvent.java | 3 - .../ProductOrderStateChangeEventPayload.java | 3 - .../po622/model/ProductOrderStateType.java | 23 +- .../tmf/po622/model/ProductOrderUpdate.java | 2 +- .../osl/tmf/po622/model/ProductPrice.java | 379 -------- .../etsi/osl/tmf/po622/model/ProductRef.java | 242 ----- .../tmf/po622/model/ProductRefOrValue.java | 881 ------------------ .../tmf/po622/model/ProductRelationship.java | 198 ---- .../po622/model/ProductSpecificationRef.java | 293 ------ .../tmf/po622/model/ProductStatusType.java | 59 -- .../etsi/osl/tmf/po622/model/ProductTerm.java | 244 ----- .../osl/tmf/po622/model/QuoteItemRef.java | 22 +- .../etsi/osl/tmf/po622/model/QuoteRef.java | 22 +- .../osl/tmf/po622/model/RelatedChannel.java | 22 +- .../po622/model/RelatedPlaceRefOrValue.java | 267 ------ .../po622/model/RelatedProductOrderItem.java | 3 - .../tmf/po622/model/TargetProductSchema.java | 148 --- .../tmf/rpm685/model/ProductOfferingRef.java | 183 ---- 77 files changed, 663 insertions(+), 7269 deletions(-) delete mode 100644 src/main/java/org/etsi/osl/tmf/am651/model/ProductOfferingRef.java delete mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductOfferingPriceRef.java delete mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductOfferingRef.java delete mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/RelatedProductOrderItem.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/BillingAccountRef.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/EntityRef.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/Money.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/Place.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/Price.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/PriceAlteration.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/Product.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingPriceRef.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingRef.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/ProductPrice.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/ProductRef.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/ProductRefOrValue.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/ProductRelationship.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/ProductSpecificationRef.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/ProductStatusType.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/ProductTerm.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/RelatedPlaceRefOrValue.java delete mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/TargetProductSchema.java delete mode 100644 src/main/java/org/etsi/osl/tmf/rpm685/model/ProductOfferingRef.java 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 a07440a..17a3742 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/ProductOfferingRef.java b/src/main/java/org/etsi/osl/tmf/am651/model/ProductOfferingRef.java deleted file mode 100644 index 07b20c4..0000000 --- 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/pcm620/model/ProductOfferingRef.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingRef.java index dd47df1..616d8c3 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/pim637/model/BillingAccountRef.java b/src/main/java/org/etsi/osl/tmf/pim637/model/BillingAccountRef.java index fed7801..0a30fb7 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/BillingAccountRef.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/BillingAccountRef.java @@ -1,9 +1,30 @@ +/*- + * ========================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.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; /** @@ -11,28 +32,14 @@ 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 = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") +@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 { +@Entity(name = "BillingAccRef622") +public class BillingAccountRef extends BaseRootNamedEntity { @JsonProperty("id") private String id = null; - @JsonProperty("href") - private String href = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("@baseType") - private String _atBaseType = null; - - @JsonProperty("@schemaLocation") - private String _atSchemaLocation = null; - - @JsonProperty("@type") - private String _atType = null; - @JsonProperty("@referredType") private String _atReferredType = null; @@ -44,8 +51,8 @@ public class BillingAccountRef { /** * Unique identifier of the billing account * @return id - **/ - @Schema(required = true, description = "Unique identifier of the billing account") + **/ + @Schema(description = "Unique identifier of the billing account") @NotNull public String getId() { @@ -64,10 +71,9 @@ public class BillingAccountRef { /** * Reference of the billing account * @return href - **/ + **/ @Schema(description = "Reference of the billing account") - @NotNull - + public String getHref() { return href; } @@ -84,10 +90,9 @@ public class BillingAccountRef { /** * Name of the billing account * @return name - **/ + **/ @Schema(description = "Name of the billing account") - @NotNull - + public String getName() { return name; } @@ -96,64 +101,61 @@ public class BillingAccountRef { this.name = name; } - public BillingAccountRef _atBaseType(String _atBaseType) { - this._atBaseType = _atBaseType; + public BillingAccountRef baseType(String baseType) { + this.baseType = baseType; return this; } /** * When sub-classing, this defines the super-class - * @return _atBaseType - **/ + * @return baseType + **/ @Schema(description = "When sub-classing, this defines the super-class") - @NotNull - + public String getAtBaseType() { - return _atBaseType; + return baseType; } - public void setAtBaseType(String _atBaseType) { - this._atBaseType = _atBaseType; + public void setAtBaseType(String baseType) { + this.baseType = baseType; } - public BillingAccountRef _atSchemaLocation(String _atSchemaLocation) { - this._atSchemaLocation = _atSchemaLocation; + public BillingAccountRef schemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; return this; } /** * A URI to a JSON-Schema file that defines additional attributes and relationships - * @return _atSchemaLocation - **/ + * @return schemaLocation + **/ @Schema(description = "A URI to a JSON-Schema file that defines additional attributes and relationships") - @NotNull - + public String getAtSchemaLocation() { - return _atSchemaLocation; + return schemaLocation; } - public void setAtSchemaLocation(String _atSchemaLocation) { - this._atSchemaLocation = _atSchemaLocation; + public void setAtSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; } - public BillingAccountRef _atType(String _atType) { - this._atType = _atType; + public BillingAccountRef type(String type) { + this.type = type; return this; } /** * When sub-classing, this defines the sub-class entity name - * @return _atType - **/ + * @return type + **/ @Schema(description = "When sub-classing, this defines the sub-class entity name") - @NotNull - + public String getAtType() { - return _atType; + return type; } - public void setAtType(String _atType) { - this._atType = _atType; + public void setAtType(String type) { + this.type = type; } public BillingAccountRef _atReferredType(String _atReferredType) { @@ -164,10 +166,9 @@ public class BillingAccountRef { /** * 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; } @@ -189,15 +190,15 @@ public class BillingAccountRef { return Objects.equals(this.id, billingAccountRef.id) && Objects.equals(this.href, billingAccountRef.href) && Objects.equals(this.name, billingAccountRef.name) && - Objects.equals(this._atBaseType, billingAccountRef._atBaseType) && - Objects.equals(this._atSchemaLocation, billingAccountRef._atSchemaLocation) && - Objects.equals(this._atType, billingAccountRef._atType) && + Objects.equals(this.baseType, billingAccountRef.baseType) && + Objects.equals(this.schemaLocation, billingAccountRef.schemaLocation) && + Objects.equals(this.type, billingAccountRef.type) && Objects.equals(this._atReferredType, billingAccountRef._atReferredType); } @Override public int hashCode() { - return Objects.hash(id, href, name, _atBaseType, _atSchemaLocation, _atType, _atReferredType); + return Objects.hash(id, href, name, baseType, schemaLocation, type, _atReferredType); } @Override @@ -208,9 +209,9 @@ public class BillingAccountRef { 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(" 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(); diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/Money.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Money.java index 3dba051..446fa97 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/Money.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/Money.java @@ -2,8 +2,10 @@ 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; /** @@ -13,8 +15,8 @@ import jakarta.validation.constraints.NotNull; @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 Money { +@Entity(name = "Money637") +public class Money extends BaseRootEntity { @JsonProperty("unit") private String unit = null; diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/Price.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Price.java index 0642c80..c4f2d69 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/Price.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/Price.java @@ -2,8 +2,12 @@ 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; @@ -15,7 +19,8 @@ import jakarta.validation.constraints.NotNull; @jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") -public class Price { +@Entity(name = "Price637") +public class Price extends BaseRootEntity { @JsonProperty("percentage") private Float percentage = null; @@ -23,9 +28,11 @@ 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") diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/PriceAlteration.java b/src/main/java/org/etsi/osl/tmf/pim637/model/PriceAlteration.java index efa0404..e42c15a 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/PriceAlteration.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/PriceAlteration.java @@ -2,8 +2,14 @@ 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; @@ -14,17 +20,14 @@ import jakarta.validation.constraints.NotNull; @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 PriceAlteration { +@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; @@ -38,9 +41,11 @@ 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") diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java index edb686b..d8e5aa9 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java @@ -8,7 +8,9 @@ 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.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; 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 index 571957c..1fcf509 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductCreate.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductCreate.java @@ -8,7 +8,9 @@ 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.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; diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductOfferingPriceRef.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductOfferingPriceRef.java deleted file mode 100644 index c7fada7..0000000 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductOfferingPriceRef.java +++ /dev/null @@ -1,229 +0,0 @@ -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; - -/** - * 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 = "2024-08-04T00:27:07.324017400+03: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 _atBaseType = null; - - @JsonProperty("@schemaLocation") - private String _atSchemaLocation = null; - - @JsonProperty("@type") - private String _atType = 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(required = true, 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.") - @NotNull - - 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.") - @NotNull - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ProductOfferingPriceRef _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 ProductOfferingPriceRef _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 ProductOfferingPriceRef _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; - } - - 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.") - @NotNull - - 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._atBaseType, productOfferingPriceRef._atBaseType) && - Objects.equals(this._atSchemaLocation, productOfferingPriceRef._atSchemaLocation) && - Objects.equals(this._atType, productOfferingPriceRef._atType) && - Objects.equals(this._atReferredType, productOfferingPriceRef._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 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(" _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(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/ProductOfferingRef.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductOfferingRef.java deleted file mode 100644 index e9933e8..0000000 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductOfferingRef.java +++ /dev/null @@ -1,229 +0,0 @@ -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; - -/** - * 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 = "2024-08-04T00:27:07.324017400+03: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 _atBaseType = null; - - @JsonProperty("@schemaLocation") - private String _atSchemaLocation = null; - - @JsonProperty("@type") - private String _atType = 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(required = true, 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.") - @NotNull - - 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.") - @NotNull - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ProductOfferingRef _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 ProductOfferingRef _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 ProductOfferingRef _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; - } - - 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.") - @NotNull - - 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._atBaseType, productOfferingRef._atBaseType) && - Objects.equals(this._atSchemaLocation, productOfferingRef._atSchemaLocation) && - Objects.equals(this._atType, productOfferingRef._atType) && - Objects.equals(this._atReferredType, productOfferingRef._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 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(" _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(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/ProductPrice.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductPrice.java index e233652..d60d5da 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductPrice.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductPrice.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.pcm620.model.ProductOfferingPriceRef; 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/pim637/model/ProductRef.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRef.java index 4f0fca5..41860d3 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRef.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRef.java @@ -2,8 +2,10 @@ 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; /** @@ -12,25 +14,12 @@ import jakarta.validation.constraints.NotNull; @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 ProductRef { +@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 _atBaseType = null; - @JsonProperty("@schemaLocation") - private String _atSchemaLocation = null; - - @JsonProperty("@type") - private String _atType = null; @JsonProperty("@referredType") private String _atReferredType = null; @@ -95,65 +84,8 @@ public class ProductRef { this.name = name; } - public ProductRef _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 ProductRef _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 ProductRef _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; - } public ProductRef _atReferredType(String _atReferredType) { this._atReferredType = _atReferredType; @@ -188,15 +120,15 @@ public class ProductRef { return Objects.equals(this.id, productRef.id) && Objects.equals(this.href, productRef.href) && Objects.equals(this.name, productRef.name) && - Objects.equals(this._atBaseType, productRef._atBaseType) && - Objects.equals(this._atSchemaLocation, productRef._atSchemaLocation) && - Objects.equals(this._atType, productRef._atType) && + Objects.equals(this.baseType, productRef.baseType) && + Objects.equals(this.schemaLocation, productRef.schemaLocation) && + Objects.equals(this.type, productRef.type) && Objects.equals(this._atReferredType, productRef._atReferredType); } @Override public int hashCode() { - return Objects.hash(id, href, name, _atBaseType, _atSchemaLocation, _atType, _atReferredType); + return Objects.hash(id, href, name, baseType, schemaLocation, type, _atReferredType); } @Override @@ -207,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(" _atBaseType: ").append(toIndentedString(_atBaseType)).append("\n"); - sb.append(" _atSchemaLocation: ").append(toIndentedString(_atSchemaLocation)).append("\n"); - sb.append(" _atType: ").append(toIndentedString(_atType)).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 index e4b1308..47c37dd 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRefOrValue.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRefOrValue.java @@ -8,7 +8,9 @@ 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.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; 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 index 3623cfc..616f741 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductStatusType.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductStatusType.java @@ -7,14 +7,14 @@ 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 "); + CREATED("CREATED"), + PENDINGACTIVE("PENDINGACTIVE"), + CANCELLED("CANCELLED"), + ACTIVE("ACTIVE"), + PENDINGTERMINATE("PENDINGTERMINATE"), + TERMINATED("TERMINATED"), + SUSPENDED("SUSPENDED"), + ABORTED_("ABORTED_ "); private String value; diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductUpdate.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductUpdate.java index a839117..49ee4c0 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductUpdate.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductUpdate.java @@ -8,7 +8,9 @@ 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.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; diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/RelatedProductOrderItem.java b/src/main/java/org/etsi/osl/tmf/pim637/model/RelatedProductOrderItem.java deleted file mode 100644 index 3e52de6..0000000 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/RelatedProductOrderItem.java +++ /dev/null @@ -1,279 +0,0 @@ -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; - -/** - * RelatedProductOrderItem (ProductOrder item) .The product order item which triggered product creation/change/termination. - */ -@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 = "2024-08-04T00:27:07.324017400+03:00[Europe/Athens]") - - -public class RelatedProductOrderItem { - @JsonProperty("orderItemAction") - private String orderItemAction = null; - - @JsonProperty("orderItemId") - private String orderItemId = null; - - @JsonProperty("productOrderHref") - private String productOrderHref = null; - - @JsonProperty("productOrderId") - private String productOrderId = null; - - @JsonProperty("role") - private String role = null; - - @JsonProperty("@baseType") - private String _atBaseType = null; - - @JsonProperty("@schemaLocation") - private String _atSchemaLocation = null; - - @JsonProperty("@type") - private String _atType = null; - - @JsonProperty("@referredType") - private String _atReferredType = null; - - public RelatedProductOrderItem orderItemAction(String orderItemAction) { - this.orderItemAction = orderItemAction; - return this; - } - - /** - * Action of the order item for this product - * @return orderItemAction - **/ - @Schema(description = "Action of the order item for this product") - @NotNull - - public String getOrderItemAction() { - return orderItemAction; - } - - public void setOrderItemAction(String orderItemAction) { - this.orderItemAction = orderItemAction; - } - - public RelatedProductOrderItem orderItemId(String orderItemId) { - this.orderItemId = orderItemId; - return this; - } - - /** - * Identifier of the order item where the product was managed - * @return orderItemId - **/ - @Schema(required = true, description = "Identifier of the order item where the product was managed") - @NotNull - - public String getOrderItemId() { - return orderItemId; - } - - public void setOrderItemId(String orderItemId) { - this.orderItemId = orderItemId; - } - - public RelatedProductOrderItem productOrderHref(String productOrderHref) { - this.productOrderHref = productOrderHref; - return this; - } - - /** - * Reference of the related entity. - * @return productOrderHref - **/ - @Schema(description = "Reference of the related entity.") - @NotNull - - public String getProductOrderHref() { - return productOrderHref; - } - - public void setProductOrderHref(String productOrderHref) { - this.productOrderHref = productOrderHref; - } - - public RelatedProductOrderItem productOrderId(String productOrderId) { - this.productOrderId = productOrderId; - return this; - } - - /** - * Unique identifier of a related entity. - * @return productOrderId - **/ - @Schema(required = true, description = "Unique identifier of a related entity.") - @NotNull - - public String getProductOrderId() { - return productOrderId; - } - - public void setProductOrderId(String productOrderId) { - this.productOrderId = productOrderId; - } - - public RelatedProductOrderItem role(String role) { - this.role = role; - return this; - } - - /** - * role of the product order item for this product - * @return role - **/ - @Schema(description = "role of the product order item for this product") - @NotNull - - public String getRole() { - return role; - } - - public void setRole(String role) { - this.role = role; - } - - public RelatedProductOrderItem _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 RelatedProductOrderItem _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 RelatedProductOrderItem _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; - } - - public RelatedProductOrderItem _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; - } - - 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; - } - RelatedProductOrderItem relatedProductOrderItem = (RelatedProductOrderItem) o; - return Objects.equals(this.orderItemAction, relatedProductOrderItem.orderItemAction) && - Objects.equals(this.orderItemId, relatedProductOrderItem.orderItemId) && - Objects.equals(this.productOrderHref, relatedProductOrderItem.productOrderHref) && - Objects.equals(this.productOrderId, relatedProductOrderItem.productOrderId) && - Objects.equals(this.role, relatedProductOrderItem.role) && - Objects.equals(this._atBaseType, relatedProductOrderItem._atBaseType) && - Objects.equals(this._atSchemaLocation, relatedProductOrderItem._atSchemaLocation) && - Objects.equals(this._atType, relatedProductOrderItem._atType) && - Objects.equals(this._atReferredType, relatedProductOrderItem._atReferredType); - } - - @Override - public int hashCode() { - return Objects.hash(orderItemAction, orderItemId, productOrderHref, productOrderId, role, _atBaseType, _atSchemaLocation, _atType, _atReferredType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RelatedProductOrderItem {\n"); - - sb.append(" orderItemAction: ").append(toIndentedString(orderItemAction)).append("\n"); - sb.append(" orderItemId: ").append(toIndentedString(orderItemId)).append("\n"); - sb.append(" productOrderHref: ").append(toIndentedString(productOrderHref)).append("\n"); - sb.append(" productOrderId: ").append(toIndentedString(productOrderId)).append("\n"); - sb.append(" role: ").append(toIndentedString(role)).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(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/AgreementItemRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/AgreementItemRef.java index 73de861..27a09bb 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,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/AgreementRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/AgreementRef.java index c729d63..b730987 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 8367307..822f9aa 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 44e145e..5273f1f 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/BillingAccountRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/BillingAccountRef.java deleted file mode 100644 index 5dd0323..0000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/BillingAccountRef.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; - -/** - * BillingAccount reference. A BillingAccount is a detailed description of a bill structure. - */ -@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; - - @JsonProperty("@referredType") - private String _atReferredType = null; - - public BillingAccountRef id(String id) { - this.id = id; - return this; - } - - /** - * Unique identifier of the billing account - * @return id - **/ - @Schema(description = "Unique identifier of the billing account") - @NotNull - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public BillingAccountRef href(String href) { - this.href = href; - return this; - } - - /** - * Reference of the billing account - * @return href - **/ - @Schema(description = "Reference of the billing account") - - public String getHref() { - return href; - } - - public void setHref(String href) { - this.href = href; - } - - public BillingAccountRef name(String name) { - this.name = name; - return this; - } - - /** - * Name of the billing account - * @return name - **/ - @Schema(description = "Name of the billing account") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public BillingAccountRef 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 BillingAccountRef 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 BillingAccountRef 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 BillingAccountRef _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; - } - BillingAccountRef billingAccountRef = (BillingAccountRef) o; - return Objects.equals(this.id, billingAccountRef.id) && - Objects.equals(this.href, billingAccountRef.href) && - Objects.equals(this.name, billingAccountRef.name) && - Objects.equals(this.baseType, billingAccountRef.baseType) && - Objects.equals(this.schemaLocation, billingAccountRef.schemaLocation) && - Objects.equals(this.type, billingAccountRef.type) && - Objects.equals(this._atReferredType, billingAccountRef._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 BillingAccountRef {\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/CancelOrder.java b/src/main/java/org/etsi/osl/tmf/po622/model/CancelOrder.java index c431bb5..24571b8 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 6a6ac36..72083e6 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 018dda0..4cd79a7 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 59d42a2..f2ca202 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 86c4ec6..f0454d8 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 fd6e530..898aee3 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 75bf9e5..739c278 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 c0280f5..0702f78 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 dde76f6..ff5831c 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/EntityRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/EntityRef.java deleted file mode 100644 index 97784a5..0000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/EntityRef.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; - -/** - * Entity reference schema to be use for all entityRef class. - */ -@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]") -public class EntityRef { - @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 EntityRef 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 EntityRef 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 EntityRef 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 EntityRef 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 EntityRef 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 EntityRef 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 EntityRef _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; - } - 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.baseType, entityRef.baseType) && - Objects.equals(this.schemaLocation, entityRef.schemaLocation) && - Objects.equals(this.type, entityRef.type) && - Objects.equals(this._atReferredType, entityRef._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 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(" 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/Money.java b/src/main/java/org/etsi/osl/tmf/po622/model/Money.java deleted file mode 100644 index 3e92fbf..0000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/Money.java +++ /dev/null @@ -1,121 +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; - -/** - * 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 { - @JsonProperty("unit") - private String unit = null; - - @JsonProperty("value") - private Float value = null; - - public Money unit(String unit) { - this.unit = unit; - return this; - } - - /** - * Currency (ISO4217 norm uses 3 letters to define the currency) - * @return unit - **/ - @Schema(description = "Currency (ISO4217 norm uses 3 letters to define the currency)") - - public String getUnit() { - return unit; - } - - public void setUnit(String unit) { - this.unit = unit; - } - - public Money value(Float value) { - this.value = value; - return this; - } - - /** - * A positive floating point number - * @return value - **/ - @Schema(description = "A positive floating point number") - - public Float getValue() { - return value; - } - - public void setValue(Float value) { - this.value = value; - } - - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Money money = (Money) o; - return Objects.equals(this.unit, money.unit) && - Objects.equals(this.value, money.value); - } - - @Override - public int hashCode() { - return Objects.hash(unit, value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Money {\n"); - - sb.append(" unit: ").append(toIndentedString(unit)).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(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 f9477f2..30871bb 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 9ab0338..5e786ab 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 ec9f853..992572d 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 = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set 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) { + public OrderPrice priceAlteration(Set 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 getPriceAlteration() { + public Set getPriceAlteration() { return priceAlteration; } - public void setPriceAlteration(List priceAlteration) { + public void setPriceAlteration(Set 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 999b3db..ff34691 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 d60169e..84ead8a 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/Place.java b/src/main/java/org/etsi/osl/tmf/po622/model/Place.java deleted file mode 100644 index 62c9689..0000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/Place.java +++ /dev/null @@ -1,217 +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; - -/** - * 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]") -public class Place { - @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; - - public Place id(String id) { - this.id = id; - return this; - } - - /** - * Unique identifier of the place - * @return id - **/ - @Schema(description = "Unique identifier of the place") - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public Place href(String href) { - this.href = href; - return this; - } - - /** - * Unique reference of the place - * @return href - **/ - @Schema(description = "Unique reference of the place") - - public String getHref() { - return href; - } - - public void setHref(String href) { - this.href = href; - } - - public Place name(String name) { - this.name = name; - return this; - } - - /** - * 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]") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Place 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 Place 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 Place 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; - } - Place place = (Place) o; - 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); - } - - @Override - public int hashCode() { - return Objects.hash(id, href, name, baseType, schemaLocation, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Place {\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("}"); - 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/Price.java b/src/main/java/org/etsi/osl/tmf/po622/model/Price.java deleted file mode 100644 index e1c950d..0000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/Price.java +++ /dev/null @@ -1,244 +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; - -/** - * 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 { - @JsonProperty("percentage") - private Float percentage = null; - - @JsonProperty("taxRate") - private Float taxRate = null; - - @JsonProperty("dutyFreeAmount") - private Money dutyFreeAmount = null; - - @JsonProperty("taxIncludedAmount") - private Money taxIncludedAmount = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; - - public Price percentage(Float percentage) { - this.percentage = percentage; - return this; - } - - /** - * Percentage to apply for ProdOfferPriceAlteration - * @return percentage - **/ - @Schema(description = "Percentage to apply for ProdOfferPriceAlteration") - - public Float getPercentage() { - return percentage; - } - - public void setPercentage(Float percentage) { - this.percentage = percentage; - } - - public Price taxRate(Float taxRate) { - this.taxRate = taxRate; - return this; - } - - /** - * Tax rate - * @return taxRate - **/ - @Schema(description = "Tax rate") - - public Float getTaxRate() { - return taxRate; - } - - public void setTaxRate(Float taxRate) { - this.taxRate = taxRate; - } - - public Price dutyFreeAmount(Money dutyFreeAmount) { - this.dutyFreeAmount = dutyFreeAmount; - return this; - } - - /** - * Get dutyFreeAmount - * @return dutyFreeAmount - **/ - @Schema(description = "") - - @Valid - public Money getDutyFreeAmount() { - return dutyFreeAmount; - } - - public void setDutyFreeAmount(Money dutyFreeAmount) { - this.dutyFreeAmount = dutyFreeAmount; - } - - public Price taxIncludedAmount(Money taxIncludedAmount) { - this.taxIncludedAmount = taxIncludedAmount; - return this; - } - - /** - * Get taxIncludedAmount - * @return taxIncludedAmount - **/ - @Schema(description = "") - - @Valid - public Money getTaxIncludedAmount() { - return taxIncludedAmount; - } - - public void setTaxIncludedAmount(Money taxIncludedAmount) { - this.taxIncludedAmount = taxIncludedAmount; - } - - public Price 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 Price 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 Price 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; - } - Price price = (Price) o; - return Objects.equals(this.percentage, price.percentage) && - 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); - } - - @Override - public int hashCode() { - return Objects.hash(percentage, taxRate, dutyFreeAmount, taxIncludedAmount, baseType, schemaLocation, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Price {\n"); - - sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n"); - 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("}"); - 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/PriceAlteration.java b/src/main/java/org/etsi/osl/tmf/po622/model/PriceAlteration.java deleted file mode 100644 index 5efe9e7..0000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/PriceAlteration.java +++ /dev/null @@ -1,367 +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; - -/** - * Is an amount, usually of money, that modifies the price charged for an order item. - */ -@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 { - @JsonProperty("applicationDuration") - private Integer applicationDuration = null; - - @JsonProperty("description") - private String description = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("priceType") - private String priceType = null; - - @JsonProperty("priority") - private Integer priority = null; - - @JsonProperty("recurringChargePeriod") - private String recurringChargePeriod = null; - - @JsonProperty("unitOfMeasure") - private String unitOfMeasure = null; - - @JsonProperty("price") - private Price price = null; - - @JsonProperty("productOfferingPrice") - 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; - } - - /** - * 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)") - - public Integer getApplicationDuration() { - return applicationDuration; - } - - public void setApplicationDuration(Integer applicationDuration) { - this.applicationDuration = applicationDuration; - } - - public PriceAlteration description(String description) { - this.description = description; - return this; - } - - /** - * 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") - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public PriceAlteration name(String name) { - this.name = name; - return this; - } - - /** - * Name of the order item price alteration - * @return name - **/ - @Schema(description = "Name of the order item price alteration") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public PriceAlteration priceType(String priceType) { - this.priceType = priceType; - return this; - } - - /** - * 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.") - @NotNull - - public String getPriceType() { - return priceType; - } - - public void setPriceType(String priceType) { - this.priceType = priceType; - } - - public PriceAlteration priority(Integer priority) { - this.priority = priority; - return this; - } - - /** - * 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") - - public Integer getPriority() { - return priority; - } - - public void setPriority(Integer priority) { - this.priority = priority; - } - - public PriceAlteration recurringChargePeriod(String recurringChargePeriod) { - this.recurringChargePeriod = recurringChargePeriod; - return this; - } - - /** - * Could be month, week... - * @return recurringChargePeriod - **/ - @Schema(description = "Could be month, week...") - - public String getRecurringChargePeriod() { - return recurringChargePeriod; - } - - public void setRecurringChargePeriod(String recurringChargePeriod) { - this.recurringChargePeriod = recurringChargePeriod; - } - - public PriceAlteration unitOfMeasure(String unitOfMeasure) { - this.unitOfMeasure = unitOfMeasure; - return this; - } - - /** - * Could be minutes, GB... - * @return unitOfMeasure - **/ - @Schema(description = "Could be minutes, GB...") - - public String getUnitOfMeasure() { - return unitOfMeasure; - } - - public void setUnitOfMeasure(String unitOfMeasure) { - this.unitOfMeasure = unitOfMeasure; - } - - public PriceAlteration price(Price price) { - this.price = price; - return this; - } - - /** - * Get price - * @return price - **/ - @Schema(description = "") - @NotNull - - @Valid - public Price getPrice() { - return price; - } - - public void setPrice(Price price) { - this.price = price; - } - - public PriceAlteration productOfferingPrice(ProductOfferingPriceRef productOfferingPrice) { - this.productOfferingPrice = productOfferingPrice; - return this; - } - - /** - * Get productOfferingPrice - * @return productOfferingPrice - **/ - @Schema(description = "") - - @Valid - public ProductOfferingPriceRef getProductOfferingPrice() { - return productOfferingPrice; - } - - public void setProductOfferingPrice(ProductOfferingPriceRef productOfferingPrice) { - 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 - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - PriceAlteration priceAlteration = (PriceAlteration) o; - return Objects.equals(this.applicationDuration, priceAlteration.applicationDuration) && - Objects.equals(this.description, priceAlteration.description) && - Objects.equals(this.name, priceAlteration.name) && - Objects.equals(this.priceType, priceAlteration.priceType) && - Objects.equals(this.priority, priceAlteration.priority) && - Objects.equals(this.recurringChargePeriod, priceAlteration.recurringChargePeriod) && - Objects.equals(this.unitOfMeasure, priceAlteration.unitOfMeasure) && - Objects.equals(this.price, priceAlteration.price) && - Objects.equals(this.productOfferingPrice, priceAlteration.productOfferingPrice) && - Objects.equals(this.baseType, priceAlteration.baseType) && - Objects.equals(this.schemaLocation, priceAlteration.schemaLocation) && - Objects.equals(this.type, priceAlteration.type); - } - - @Override - public int hashCode() { - return Objects.hash(applicationDuration, description, name, priceType, priority, recurringChargePeriod, unitOfMeasure, price, productOfferingPrice, baseType, schemaLocation, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class PriceAlteration {\n"); - - sb.append(" applicationDuration: ").append(toIndentedString(applicationDuration)).append("\n"); - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" priceType: ").append(toIndentedString(priceType)).append("\n"); - sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); - sb.append(" recurringChargePeriod: ").append(toIndentedString(recurringChargePeriod)).append("\n"); - 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("}"); - 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/Product.java b/src/main/java/org/etsi/osl/tmf/po622/model/Product.java deleted file mode 100644 index 30ee6d1..0000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/Product.java +++ /dev/null @@ -1,857 +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.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.Characteristic; -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.springframework.validation.annotation.Validated; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.Valid; - -/** - * 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 { - @JsonProperty("id") - private String id = null; - - @JsonProperty("href") - private String href = null; - - @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 OffsetDateTime orderDate = null; - - @JsonProperty("productSerialNumber") - private String productSerialNumber = null; - - @JsonProperty("startDate") - private OffsetDateTime startDate = null; - - @JsonProperty("terminationDate") - private OffsetDateTime terminationDate = null; - - @JsonProperty("agreement") - @Valid - private List agreement = null; - - @JsonProperty("billingAccount") - private BillingAccountRef billingAccount = null; - - @JsonProperty("place") - @Valid - private List place = null; - - @JsonProperty("product") - @Valid - private List product = null; - - @JsonProperty("productCharacteristic") - @Valid - private List productCharacteristic = null; - - @JsonProperty("productOffering") - private ProductOfferingRef productOffering = null; - - @JsonProperty("productOrderItem") - @Valid - private List productOrderItem = null; - - @JsonProperty("productPrice") - @Valid - private List productPrice = null; - - @JsonProperty("productRelationship") - @Valid - private List productRelationship = null; - - @JsonProperty("productSpecification") - private ProductSpecificationRef productSpecification = null; - - @JsonProperty("productTerm") - @Valid - private List productTerm = null; - - @JsonProperty("realizingResource") - @Valid - private List realizingResource = null; - - @JsonProperty("realizingService") - @Valid - private List realizingService = null; - - @JsonProperty("relatedParty") - @Valid - private List relatedParty = null; - - @JsonProperty("status") - private 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; - 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 Product href(String href) { - this.href = href; - return this; - } - - /** - * 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 Product 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.") - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Product 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.") - - public Boolean isIsBundle() { - return isBundle; - } - - public void setIsBundle(Boolean isBundle) { - this.isBundle = isBundle; - } - - public Product 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.") - - public Boolean isIsCustomerVisible() { - return isCustomerVisible; - } - - public void setIsCustomerVisible(Boolean isCustomerVisible) { - this.isCustomerVisible = isCustomerVisible; - } - - public Product 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") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Product orderDate(OffsetDateTime 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") - - @Valid - public OffsetDateTime getOrderDate() { - return orderDate; - } - - public void setOrderDate(OffsetDateTime orderDate) { - this.orderDate = orderDate; - } - - public Product 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.") - - public String getProductSerialNumber() { - return productSerialNumber; - } - - public void setProductSerialNumber(String productSerialNumber) { - this.productSerialNumber = productSerialNumber; - } - - public Product startDate(OffsetDateTime 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") - - @Valid - public OffsetDateTime getStartDate() { - return startDate; - } - - public void setStartDate(OffsetDateTime startDate) { - this.startDate = startDate; - } - - public Product terminationDate(OffsetDateTime 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") - - @Valid - public OffsetDateTime getTerminationDate() { - return terminationDate; - } - - public void setTerminationDate(OffsetDateTime terminationDate) { - this.terminationDate = terminationDate; - } - - public Product agreement(List agreement) { - this.agreement = agreement; - return this; - } - - public Product addAgreementItem(AgreementItemRef agreementItem) { - if (this.agreement == null) { - this.agreement = new ArrayList<>(); - } - this.agreement.add(agreementItem); - return this; - } - - /** - * Get agreement - * @return agreement - **/ - @Schema(description = "") - @Valid - public List getAgreement() { - return agreement; - } - - public void setAgreement(List agreement) { - this.agreement = agreement; - } - - public Product billingAccount(BillingAccountRef billingAccount) { - this.billingAccount = billingAccount; - return this; - } - - /** - * Get billingAccount - * @return billingAccount - **/ - @Schema(description = "") - - @Valid - public BillingAccountRef getBillingAccount() { - return billingAccount; - } - - public void setBillingAccount(BillingAccountRef billingAccount) { - this.billingAccount = billingAccount; - } - - public Product place(List place) { - this.place = place; - return this; - } - - public Product addPlaceItem(RelatedPlaceRefOrValue placeItem) { - if (this.place == null) { - this.place = new ArrayList<>(); - } - this.place.add(placeItem); - return this; - } - - /** - * Get place - * @return place - **/ - @Schema(description = "") - @Valid - public List getPlace() { - return place; - } - - public void setPlace(List place) { - this.place = place; - } - - public Product product(List product) { - this.product = product; - return this; - } - - public Product addProductItem(ProductRefOrValue productItem) { - if (this.product == null) { - this.product = new ArrayList<>(); - } - this.product.add(productItem); - return this; - } - - /** - * Get product - * @return product - **/ - @Schema(description = "") - @Valid - public List getProduct() { - return product; - } - - public void setProduct(List product) { - this.product = product; - } - - public Product productCharacteristic(List productCharacteristic) { - this.productCharacteristic = productCharacteristic; - return this; - } - - public Product addProductCharacteristicItem(Characteristic productCharacteristicItem) { - if (this.productCharacteristic == null) { - this.productCharacteristic = new ArrayList<>(); - } - this.productCharacteristic.add(productCharacteristicItem); - return this; - } - - /** - * Get productCharacteristic - * @return productCharacteristic - **/ - @Schema(description = "") - @Valid - public List getProductCharacteristic() { - return productCharacteristic; - } - - public void setProductCharacteristic(List productCharacteristic) { - this.productCharacteristic = productCharacteristic; - } - - public Product productOffering(ProductOfferingRef productOffering) { - this.productOffering = productOffering; - return this; - } - - /** - * Get productOffering - * @return productOffering - **/ - @Schema(description = "") - - @Valid - public ProductOfferingRef getProductOffering() { - return productOffering; - } - - public void setProductOffering(ProductOfferingRef productOffering) { - this.productOffering = productOffering; - } - - public Product productOrderItem(List productOrderItem) { - this.productOrderItem = productOrderItem; - return this; - } - - public Product addProductOrderItemItem(RelatedProductOrderItem productOrderItemItem) { - if (this.productOrderItem == null) { - this.productOrderItem = new ArrayList<>(); - } - this.productOrderItem.add(productOrderItemItem); - return this; - } - - /** - * Get productOrderItem - * @return productOrderItem - **/ - @Schema(description = "") - @Valid - public List getProductOrderItem() { - return productOrderItem; - } - - public void setProductOrderItem(List productOrderItem) { - this.productOrderItem = productOrderItem; - } - - public Product productPrice(List productPrice) { - this.productPrice = productPrice; - return this; - } - - public Product addProductPriceItem(ProductPrice productPriceItem) { - if (this.productPrice == null) { - this.productPrice = new ArrayList<>(); - } - this.productPrice.add(productPriceItem); - return this; - } - - /** - * Get productPrice - * @return productPrice - **/ - @Schema(description = "") - @Valid - public List getProductPrice() { - return productPrice; - } - - public void setProductPrice(List productPrice) { - this.productPrice = productPrice; - } - - public Product productRelationship(List productRelationship) { - this.productRelationship = productRelationship; - return this; - } - - public Product addProductRelationshipItem(ProductRelationship productRelationshipItem) { - if (this.productRelationship == null) { - this.productRelationship = new ArrayList<>(); - } - this.productRelationship.add(productRelationshipItem); - return this; - } - - /** - * Get productRelationship - * @return productRelationship - **/ - @Schema(description = "") - @Valid - public List getProductRelationship() { - return productRelationship; - } - - public void setProductRelationship(List productRelationship) { - this.productRelationship = productRelationship; - } - - public Product productSpecification(ProductSpecificationRef productSpecification) { - this.productSpecification = productSpecification; - return this; - } - - /** - * Get productSpecification - * @return productSpecification - **/ - @Schema(description = "") - - @Valid - public ProductSpecificationRef getProductSpecification() { - return productSpecification; - } - - public void setProductSpecification(ProductSpecificationRef productSpecification) { - this.productSpecification = productSpecification; - } - - public Product productTerm(List productTerm) { - this.productTerm = productTerm; - return this; - } - - public Product addProductTermItem(ProductTerm productTermItem) { - if (this.productTerm == null) { - this.productTerm = new ArrayList<>(); - } - this.productTerm.add(productTermItem); - return this; - } - - /** - * Get productTerm - * @return productTerm - **/ - @Schema(description = "") - @Valid - public List getProductTerm() { - return productTerm; - } - - public void setProductTerm(List productTerm) { - this.productTerm = productTerm; - } - - public Product realizingResource(List realizingResource) { - this.realizingResource = realizingResource; - return this; - } - - public Product addRealizingResourceItem(ResourceRef realizingResourceItem) { - if (this.realizingResource == null) { - this.realizingResource = new ArrayList<>(); - } - this.realizingResource.add(realizingResourceItem); - return this; - } - - /** - * Get realizingResource - * @return realizingResource - **/ - @Schema(description = "") - @Valid - public List getRealizingResource() { - return realizingResource; - } - - public void setRealizingResource(List realizingResource) { - this.realizingResource = realizingResource; - } - - public Product realizingService(List realizingService) { - this.realizingService = realizingService; - return this; - } - - public Product addRealizingServiceItem(ServiceRef realizingServiceItem) { - if (this.realizingService == null) { - this.realizingService = new ArrayList<>(); - } - this.realizingService.add(realizingServiceItem); - return this; - } - - /** - * Get realizingService - * @return realizingService - **/ - @Schema(description = "") - @Valid - public List getRealizingService() { - return realizingService; - } - - public void setRealizingService(List realizingService) { - this.realizingService = realizingService; - } - - public Product relatedParty(List relatedParty) { - this.relatedParty = relatedParty; - return this; - } - - public Product addRelatedPartyItem(RelatedParty relatedPartyItem) { - if (this.relatedParty == null) { - this.relatedParty = new ArrayList<>(); - } - this.relatedParty.add(relatedPartyItem); - return this; - } - - /** - * Get relatedParty - * @return relatedParty - **/ - @Schema(description = "") - @Valid - public List getRelatedParty() { - return relatedParty; - } - - public void setRelatedParty(List relatedParty) { - this.relatedParty = relatedParty; - } - - public Product status(ProductStatusType status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @Schema(description = "") - - @Valid - public ProductStatusType getStatus() { - return status; - } - - public void setStatus(ProductStatusType status) { - 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 - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Product product = (Product) o; - return Objects.equals(this.id, product.id) && - Objects.equals(this.href, product.href) && - Objects.equals(this.description, product.description) && - Objects.equals(this.isBundle, product.isBundle) && - Objects.equals(this.isCustomerVisible, product.isCustomerVisible) && - Objects.equals(this.name, product.name) && - Objects.equals(this.orderDate, product.orderDate) && - Objects.equals(this.productSerialNumber, product.productSerialNumber) && - Objects.equals(this.startDate, product.startDate) && - Objects.equals(this.terminationDate, product.terminationDate) && - Objects.equals(this.agreement, product.agreement) && - Objects.equals(this.billingAccount, product.billingAccount) && - Objects.equals(this.place, product.place) && - Objects.equals(this.product, product.product) && - Objects.equals(this.productCharacteristic, product.productCharacteristic) && - Objects.equals(this.productOffering, product.productOffering) && - Objects.equals(this.productOrderItem, product.productOrderItem) && - Objects.equals(this.productPrice, product.productPrice) && - Objects.equals(this.productRelationship, product.productRelationship) && - Objects.equals(this.productSpecification, product.productSpecification) && - Objects.equals(this.productTerm, product.productTerm) && - Objects.equals(this.realizingResource, product.realizingResource) && - Objects.equals(this.realizingService, product.realizingService) && - Objects.equals(this.relatedParty, product.relatedParty) && - Objects.equals(this.status, product.status) && - Objects.equals(this.baseType, product.baseType) && - Objects.equals(this.schemaLocation, product.schemaLocation) && - 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 String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Product {\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"); - 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(" 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/ProductOfferingPriceRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOfferingPriceRef.java deleted file mode 100644 index 25224fb..0000000 --- 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 1c3b20c..2ff1407 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 ed7f58a..efa5411 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 f18eb07..0000000 --- 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 b8a7a38..b8c4afc 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 @@ -21,31 +21,45 @@ package org.etsi.osl.tmf.po622.model; import java.time.OffsetDateTime; 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.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.BaseRootEntity; 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 +69,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,68 +86,70 @@ 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 agreement = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set 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 channel = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set channel = new HashSet<>(); @JsonProperty("note") @Valid - private List note = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set note = new HashSet<>(); @JsonProperty("orderTotalPrice") @Valid - private List orderTotalPrice = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set orderTotalPrice = new HashSet<>(); @JsonProperty("payment") @Valid - private List payment = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set payment = new HashSet<>(); @JsonProperty("productOfferingQualification") @Valid - private List productOfferingQualification = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set productOfferingQualification = new HashSet<>(); @JsonProperty("productOrderItem") @Valid - private List productOrderItem = new ArrayList<>(); + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set productOrderItem = new HashSet<>(); @JsonProperty("quote") @Valid - private List quote = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set quote = new HashSet<>(); @JsonProperty("relatedParty") @Valid - private List relatedParty = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set relatedParty = new HashSet<>(); @JsonProperty("state") - private ProductOrderStateType state = null; + private ProductOrderStateType state = ProductOrderStateType.INITIAL ; - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; + public ProductOrder id(String id) { this.id = id; @@ -140,11 +158,12 @@ public class ProductOrder { /** * ID created on repository side (OM system) + * * @return id - **/ + **/ @Schema(description = "ID created on repository side (OM system)") - - public String getId() { + + public String getId() { return id; } @@ -159,11 +178,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 +197,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 +218,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 +238,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,18 +261,35 @@ public class ProductOrder { /** * Date when the order was completed + * * @return completionDate - **/ + **/ @Schema(description = "Date when the order was completed") + + @Valid + @JsonProperty("completionDate") + public String getCompletionDateString() { + if ( this.completionDate == null) { + return null; + } + return this.completionDate.toString(); + } - @Valid - public OffsetDateTime getCompletionDate() { + @Valid + public OffsetDateTime getCompletionDate() { return completionDate; } public void setCompletionDate(OffsetDateTime completionDate) { this.completionDate = completionDate; } + + public void setCompletionDate(String completionDate) { + if (completionDate!=null) { + this.completionDate = OffsetDateTime.parse( completionDate ); + } +} + public ProductOrder description(String description) { this.description = description; @@ -256,11 +298,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,18 +318,35 @@ public class ProductOrder { /** * Expected delivery date amended by the provider + * * @return expectedCompletionDate - **/ + **/ @Schema(description = "Expected delivery date amended by the provider") + + @JsonProperty("expectedCompletionDate") + public String getExpectedCompletionDateString() { + + if ( this.expectedCompletionDate == null) { + return null; + } + return this.expectedCompletionDate.toString(); + } - @Valid - public OffsetDateTime getExpectedCompletionDate() { + @Valid + public OffsetDateTime getExpectedCompletionDate() { return expectedCompletionDate; } public void setExpectedCompletionDate(OffsetDateTime expectedCompletionDate) { this.expectedCompletionDate = expectedCompletionDate; } + + public void setExpectedCompletionDate(String expectedCompletionDate) { + if (expectedCompletionDate!=null) { + this.expectedCompletionDate = OffsetDateTime.parse( expectedCompletionDate ); + + } +} public ProductOrder externalId(String externalId) { this.externalId = externalId; @@ -295,11 +355,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 +376,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,18 +397,36 @@ 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; } public void setOrderDate(OffsetDateTime orderDate) { this.orderDate = orderDate; } + + public void setOrderDate(String orderDate) { + + if (orderDate!=null) { + this.orderDate = OffsetDateTime.parse( orderDate ); + + } +} public ProductOrder priority(String priority) { this.priority = priority; @@ -352,12 +434,15 @@ public class ProductOrder { } /** - * 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,18 +457,37 @@ public class ProductOrder { /** * Requested delivery date from the requestor perspective + * * @return requestedCompletionDate - **/ + **/ @Schema(description = "Requested delivery date from the requestor perspective") + + @Valid + @JsonProperty("requestedCompletionDate") + public String getRequestedCompletionDateString() { + + if ( this.requestedCompletionDate == null) { + return null; + } + return this.requestedCompletionDate.toString(); + } - @Valid - public OffsetDateTime getRequestedCompletionDate() { + @Valid + public OffsetDateTime getRequestedCompletionDate() { return requestedCompletionDate; } public void setRequestedCompletionDate(OffsetDateTime requestedCompletionDate) { this.requestedCompletionDate = requestedCompletionDate; } + + public void setRequestedCompletionDate(String requestedCompletionDate) { + + if (requestedCompletionDate!=null) { + this.requestedCompletionDate = OffsetDateTime.parse( requestedCompletionDate ); + + } +} public ProductOrder requestedStartDate(OffsetDateTime requestedStartDate) { this.requestedStartDate = requestedStartDate; @@ -391,28 +495,50 @@ public class ProductOrder { } /** - * 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. ") + **/ + @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() { + @Valid + public OffsetDateTime getRequestedStartDate() { return requestedStartDate; } public void setRequestedStartDate(OffsetDateTime requestedStartDate) { this.requestedStartDate = requestedStartDate; } + + + public void setRequestedStartDate(String requestedStartDate) { + + if (requestedStartDate!=null) { + this.requestedStartDate = OffsetDateTime.parse( requestedStartDate ); + + } + } - public ProductOrder agreement(List agreement) { + public ProductOrder agreement(Set 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 +546,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 getAgreement() { + @Valid + public Set getAgreement() { return agreement; } - public void setAgreement(List agreement) { + public void setAgreement(Set agreement) { this.agreement = agreement; } @@ -439,12 +566,13 @@ public class ProductOrder { /** * Get billingAccount + * * @return billingAccount - **/ + **/ @Schema(description = "") - - @Valid - public BillingAccountRef getBillingAccount() { + + @Valid + public BillingAccountRef getBillingAccount() { return billingAccount; } @@ -452,14 +580,14 @@ public class ProductOrder { this.billingAccount = billingAccount; } - public ProductOrder channel(List channel) { + public ProductOrder channel(Set 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 +595,27 @@ public class ProductOrder { /** * Get channel + * * @return channel - **/ + **/ @Schema(description = "") - @Valid - public List getChannel() { + @Valid + public Set getChannel() { return channel; } - public void setChannel(List channel) { + public void setChannel(Set channel) { this.channel = channel; } - public ProductOrder note(List note) { + public ProductOrder note(Set 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 +623,27 @@ public class ProductOrder { /** * Get note + * * @return note - **/ + **/ @Schema(description = "") - @Valid - public List getNote() { + @Valid + public Set getNote() { return note; } - public void setNote(List note) { + public void setNote(Set note) { this.note = note; } - public ProductOrder orderTotalPrice(List orderTotalPrice) { + public ProductOrder orderTotalPrice(Set 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 +651,27 @@ public class ProductOrder { /** * Get orderTotalPrice + * * @return orderTotalPrice - **/ + **/ @Schema(description = "") - @Valid - public List getOrderTotalPrice() { + @Valid + public Set getOrderTotalPrice() { return orderTotalPrice; } - public void setOrderTotalPrice(List orderTotalPrice) { + public void setOrderTotalPrice(Set orderTotalPrice) { this.orderTotalPrice = orderTotalPrice; } - public ProductOrder payment(List payment) { + public ProductOrder payment(Set 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 +679,29 @@ public class ProductOrder { /** * Get payment + * * @return payment - **/ + **/ @Schema(description = "") - @Valid - public List getPayment() { + @Valid + public Set getPayment() { return payment; } - public void setPayment(List payment) { + public void setPayment(Set payment) { this.payment = payment; } - public ProductOrder productOfferingQualification(List productOfferingQualification) { + public ProductOrder productOfferingQualification( + Set 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 +709,21 @@ public class ProductOrder { /** * Get productOfferingQualification + * * @return productOfferingQualification - **/ + **/ @Schema(description = "") - @Valid - public List getProductOfferingQualification() { + @Valid + public Set getProductOfferingQualification() { return productOfferingQualification; } - public void setProductOfferingQualification(List productOfferingQualification) { + public void setProductOfferingQualification( + Set productOfferingQualification) { this.productOfferingQualification = productOfferingQualification; } - public ProductOrder productOrderItem(List productOrderItem) { + public ProductOrder productOrderItem(Set productOrderItem) { this.productOrderItem = productOrderItem; return this; } @@ -599,27 +735,29 @@ public class ProductOrder { /** * Get productOrderItem + * * @return productOrderItem - **/ + **/ @Schema(description = "") - @NotNull - @Valid - @Size(min=1) public List getProductOrderItem() { + @NotNull + @Valid + @Size(min = 1) + public Set getProductOrderItem() { return productOrderItem; } - public void setProductOrderItem(List productOrderItem) { + public void setProductOrderItem(Set productOrderItem) { this.productOrderItem = productOrderItem; } - public ProductOrder quote(List quote) { + public ProductOrder quote(Set 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 +765,27 @@ public class ProductOrder { /** * Get quote + * * @return quote - **/ + **/ @Schema(description = "") - @Valid - public List getQuote() { + @Valid + public Set getQuote() { return quote; } - public void setQuote(List quote) { + public void setQuote(Set quote) { this.quote = quote; } - public ProductOrder relatedParty(List relatedParty) { + public ProductOrder relatedParty(Set 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 +793,16 @@ public class ProductOrder { /** * Get relatedParty + * * @return relatedParty - **/ + **/ @Schema(description = "") - @Valid - public List getRelatedParty() { + @Valid + public Set getRelatedParty() { return relatedParty; } - public void setRelatedParty(List relatedParty) { + public void setRelatedParty(Set relatedParty) { this.relatedParty = relatedParty; } @@ -673,12 +813,13 @@ public class ProductOrder { /** * Get state + * * @return state - **/ + **/ @Schema(description = "") - - @Valid - public ProductOrderStateType getState() { + + @Valid + public ProductOrderStateType getState() { return state; } @@ -693,11 +834,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 +854,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 +875,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 +898,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 +949,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 +965,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 +979,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) { 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 84c8851..b0c7a8e 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; 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 28ebc7c..e7cd65c 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/ProductOrderCreate.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreate.java index 7da8d3d..91b5fac 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; @@ -268,6 +268,14 @@ public class ProductOrderCreate { 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; @@ -288,6 +296,14 @@ public class ProductOrderCreate { public void setRequestedStartDate(OffsetDateTime requestedStartDate) { this.requestedStartDate = requestedStartDate; } + + public void setRequestedStartDate(String requestedStartDate) { + + if (requestedStartDate!=null) { + this.requestedStartDate = OffsetDateTime.parse( requestedStartDate ); + + } +} public ProductOrderCreate agreement(List agreement) { this.agreement = agreement; 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 4bbbc94..1e519b2 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; 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 f89b45d..9dd985f 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/ProductOrderDeleteEvent.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderDeleteEvent.java index dd87d1c..c434043 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; 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 94de1d9..474cdc8 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/ProductOrderInformationRequiredEvent.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderInformationRequiredEvent.java index 38a85af..ab26a29 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 603295d..d0743f1 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 a2dcbb8..9675773 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,62 +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 itemPrice = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set itemPrice = new HashSet<>(); @JsonProperty("itemTerm") @Valid - private List itemTerm = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set itemTerm = new HashSet<>(); @JsonProperty("itemTotalPrice") @Valid - private List itemTotalPrice = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set itemTotalPrice = new HashSet<>(); @JsonProperty("payment") @Valid - private List payment = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set payment = new HashSet<>(); @JsonProperty("product") - private ProductRefOrValue product = null; + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "prod_refuuid", referencedColumnName = "uuid") + private ProductRef 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 = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set productOrderItem = new HashSet<>(); @JsonProperty("productOrderItemRelationship") @Valid - private List productOrderItemRelationship = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set productOrderItemRelationship = new HashSet<>(); @JsonProperty("qualification") @Valid - private List qualification = null; + @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + private Set 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; @@ -205,14 +224,14 @@ public class ProductOrderItem { this.billingAccount = billingAccount; } - public ProductOrderItem itemPrice(List itemPrice) { + public ProductOrderItem itemPrice(Set 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 +243,22 @@ public class ProductOrderItem { **/ @Schema(description = "") @Valid - public List getItemPrice() { + public Set getItemPrice() { return itemPrice; } - public void setItemPrice(List itemPrice) { + public void setItemPrice(Set itemPrice) { this.itemPrice = itemPrice; } - public ProductOrderItem itemTerm(List itemTerm) { + public ProductOrderItem itemTerm(Set 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 +270,22 @@ public class ProductOrderItem { **/ @Schema(description = "") @Valid - public List getItemTerm() { + public Set getItemTerm() { return itemTerm; } - public void setItemTerm(List itemTerm) { + public void setItemTerm(Set itemTerm) { this.itemTerm = itemTerm; } - public ProductOrderItem itemTotalPrice(List itemTotalPrice) { + public ProductOrderItem itemTotalPrice(Set 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 +297,22 @@ public class ProductOrderItem { **/ @Schema(description = "") @Valid - public List getItemTotalPrice() { + public Set getItemTotalPrice() { return itemTotalPrice; } - public void setItemTotalPrice(List itemTotalPrice) { + public void setItemTotalPrice(Set itemTotalPrice) { this.itemTotalPrice = itemTotalPrice; } - public ProductOrderItem payment(List payment) { + public ProductOrderItem payment(Set 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,15 +324,15 @@ public class ProductOrderItem { **/ @Schema(description = "") @Valid - public List getPayment() { + public Set getPayment() { return payment; } - public void setPayment(List payment) { + public void setPayment(Set payment) { this.payment = payment; } - public ProductOrderItem product(ProductRefOrValue product) { + public ProductOrderItem product(ProductRef product) { this.product = product; return this; } @@ -325,11 +344,11 @@ public class ProductOrderItem { @Schema(description = "") @Valid - public ProductRefOrValue getProduct() { + public ProductRef getProduct() { return product; } - public void setProduct(ProductRefOrValue product) { + public void setProduct(ProductRef product) { this.product = product; } @@ -373,14 +392,14 @@ public class ProductOrderItem { this.productOfferingQualificationItem = productOfferingQualificationItem; } - public ProductOrderItem productOrderItem(List productOrderItem) { + public ProductOrderItem productOrderItem(Set productOrderItem) { this.productOrderItem = productOrderItem; return this; } public ProductOrderItem addProductOrderItemItem(ProductOrderItem productOrderItemItem) { if (this.productOrderItem == null) { - this.productOrderItem = new ArrayList<>(); + this.productOrderItem = new HashSet<>(); } this.productOrderItem.add(productOrderItemItem); return this; @@ -392,22 +411,22 @@ public class ProductOrderItem { **/ @Schema(description = "") @Valid - public List getProductOrderItem() { + public Set getProductOrderItem() { return productOrderItem; } - public void setProductOrderItem(List productOrderItem) { + public void setProductOrderItem(Set productOrderItem) { this.productOrderItem = productOrderItem; } - public ProductOrderItem productOrderItemRelationship(List productOrderItemRelationship) { + public ProductOrderItem productOrderItemRelationship(Set 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 +438,22 @@ public class ProductOrderItem { **/ @Schema(description = "") @Valid - public List getProductOrderItemRelationship() { + public Set getProductOrderItemRelationship() { return productOrderItemRelationship; } - public void setProductOrderItemRelationship(List productOrderItemRelationship) { + public void setProductOrderItemRelationship(Set productOrderItemRelationship) { this.productOrderItemRelationship = productOrderItemRelationship; } - public ProductOrderItem qualification(List qualification) { + public ProductOrderItem qualification(Set 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 +465,11 @@ public class ProductOrderItem { **/ @Schema(description = "") @Valid - public List getQualification() { + public Set getQualification() { return qualification; } - public void setQualification(List qualification) { + public void setQualification(Set 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 1fff283..423f489 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/ProductOrderRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderRef.java index 3f9c0eb..b6b0162 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 613e5c7..68f304d 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; 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 3ca7b78..37e3b87 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/ProductOrderStateType.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateType.java index f676615..dd26b1b 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 ddef47a..2de1e00 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; diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductPrice.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductPrice.java deleted file mode 100644 index 58f6b58..0000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductPrice.java +++ /dev/null @@ -1,379 +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.ArrayList; -import java.util.List; -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; - -/** - * 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. - */ -@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 { - @JsonProperty("description") - private String description = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("priceType") - private String priceType = null; - - @JsonProperty("recurringChargePeriod") - private String recurringChargePeriod = null; - - @JsonProperty("unitOfMeasure") - private String unitOfMeasure = null; - - @JsonProperty("billingAccount") - private BillingAccountRef billingAccount = null; - - @JsonProperty("price") - private Price price = null; - - @JsonProperty("productOfferingPrice") - private ProductOfferingPriceRef productOfferingPrice = null; - - @JsonProperty("productPriceAlteration") - @Valid - private List productPriceAlteration = null; - - @JsonProperty("@baseType") - private String baseType = null; - - @JsonProperty("@schemaLocation") - private String schemaLocation = null; - - @JsonProperty("@type") - private String type = null; - - public ProductPrice description(String description) { - this.description = description; - return this; - } - - /** - * 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.") - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public ProductPrice name(String name) { - this.name = name; - return this; - } - - /** - * A short descriptive name such as \"Subscription price\". - * @return name - **/ - @Schema(description = "A short descriptive name such as \"Subscription price\".") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ProductPrice priceType(String priceType) { - this.priceType = priceType; - return this; - } - - /** - * 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.") - @NotNull - - public String getPriceType() { - return priceType; - } - - public void setPriceType(String priceType) { - this.priceType = priceType; - } - - public ProductPrice recurringChargePeriod(String recurringChargePeriod) { - this.recurringChargePeriod = recurringChargePeriod; - return this; - } - - /** - * Could be month, week... - * @return recurringChargePeriod - **/ - @Schema(description = "Could be month, week...") - - public String getRecurringChargePeriod() { - return recurringChargePeriod; - } - - public void setRecurringChargePeriod(String recurringChargePeriod) { - this.recurringChargePeriod = recurringChargePeriod; - } - - public ProductPrice unitOfMeasure(String unitOfMeasure) { - this.unitOfMeasure = unitOfMeasure; - return this; - } - - /** - * Could be minutes, GB... - * @return unitOfMeasure - **/ - @Schema(description = "Could be minutes, GB...") - - public String getUnitOfMeasure() { - return unitOfMeasure; - } - - public void setUnitOfMeasure(String unitOfMeasure) { - this.unitOfMeasure = unitOfMeasure; - } - - public ProductPrice billingAccount(BillingAccountRef billingAccount) { - this.billingAccount = billingAccount; - return this; - } - - /** - * Get billingAccount - * @return billingAccount - **/ - @Schema(description = "") - - @Valid - public BillingAccountRef getBillingAccount() { - return billingAccount; - } - - public void setBillingAccount(BillingAccountRef billingAccount) { - this.billingAccount = billingAccount; - } - - public ProductPrice price(Price price) { - this.price = price; - return this; - } - - /** - * Get price - * @return price - **/ - @Schema(description = "") - @NotNull - - @Valid - public Price getPrice() { - return price; - } - - public void setPrice(Price price) { - this.price = price; - } - - public ProductPrice productOfferingPrice(ProductOfferingPriceRef productOfferingPrice) { - this.productOfferingPrice = productOfferingPrice; - return this; - } - - /** - * Get productOfferingPrice - * @return productOfferingPrice - **/ - @Schema(description = "") - - @Valid - public ProductOfferingPriceRef getProductOfferingPrice() { - return productOfferingPrice; - } - - public void setProductOfferingPrice(ProductOfferingPriceRef productOfferingPrice) { - this.productOfferingPrice = productOfferingPrice; - } - - public ProductPrice productPriceAlteration(List productPriceAlteration) { - this.productPriceAlteration = productPriceAlteration; - return this; - } - - public ProductPrice addProductPriceAlterationItem(PriceAlteration productPriceAlterationItem) { - if (this.productPriceAlteration == null) { - this.productPriceAlteration = new ArrayList<>(); - } - this.productPriceAlteration.add(productPriceAlterationItem); - return this; - } - - /** - * Get productPriceAlteration - * @return productPriceAlteration - **/ - @Schema(description = "") - @Valid - public List getProductPriceAlteration() { - return productPriceAlteration; - } - - public void setProductPriceAlteration(List 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 - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProductPrice productPrice = (ProductPrice) o; - return Objects.equals(this.description, productPrice.description) && - Objects.equals(this.name, productPrice.name) && - Objects.equals(this.priceType, productPrice.priceType) && - Objects.equals(this.recurringChargePeriod, productPrice.recurringChargePeriod) && - Objects.equals(this.unitOfMeasure, productPrice.unitOfMeasure) && - Objects.equals(this.billingAccount, productPrice.billingAccount) && - Objects.equals(this.price, productPrice.price) && - Objects.equals(this.productOfferingPrice, productPrice.productOfferingPrice) && - Objects.equals(this.productPriceAlteration, productPrice.productPriceAlteration) && - Objects.equals(this.baseType, productPrice.baseType) && - Objects.equals(this.schemaLocation, productPrice.schemaLocation) && - Objects.equals(this.type, productPrice.type); - } - - @Override - public int hashCode() { - return Objects.hash(description, name, priceType, recurringChargePeriod, unitOfMeasure, billingAccount, price, productOfferingPrice, productPriceAlteration, baseType, schemaLocation, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProductPrice {\n"); - - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" priceType: ").append(toIndentedString(priceType)).append("\n"); - sb.append(" recurringChargePeriod: ").append(toIndentedString(recurringChargePeriod)).append("\n"); - sb.append(" unitOfMeasure: ").append(toIndentedString(unitOfMeasure)).append("\n"); - sb.append(" billingAccount: ").append(toIndentedString(billingAccount)).append("\n"); - 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("}"); - 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/ProductRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductRef.java deleted file mode 100644 index 92d6d9c..0000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductRef.java +++ /dev/null @@ -1,242 +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; - -/** - * 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 { - @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 ProductRef 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 ProductRef 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 ProductRef 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 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; - 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; - } - ProductRef productRef = (ProductRef) o; - return Objects.equals(this.id, productRef.id) && - Objects.equals(this.href, productRef.href) && - Objects.equals(this.name, productRef.name) && - Objects.equals(this.baseType, productRef.baseType) && - Objects.equals(this.schemaLocation, productRef.schemaLocation) && - Objects.equals(this.type, productRef.type) && - Objects.equals(this._atReferredType, productRef._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 ProductRef {\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/ProductRefOrValue.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductRefOrValue.java deleted file mode 100644 index d419500..0000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductRefOrValue.java +++ /dev/null @@ -1,881 +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.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.Characteristic; -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.springframework.validation.annotation.Validated; -import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.Valid; - -/** - * 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 = "2020-10-30T10:29:21.184964400+02:00[Europe/Athens]") -public class ProductRefOrValue { - @JsonProperty("id") - private String id = null; - - @JsonProperty("href") - private String href = null; - - @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 OffsetDateTime orderDate = null; - - @JsonProperty("productSerialNumber") - private String productSerialNumber = null; - - @JsonProperty("startDate") - private OffsetDateTime startDate = null; - - @JsonProperty("terminationDate") - private OffsetDateTime terminationDate = null; - - @JsonProperty("agreement") - @Valid - private List agreement = null; - - @JsonProperty("billingAccount") - private BillingAccountRef billingAccount = null; - - @JsonProperty("place") - @Valid - private List place = null; - - @JsonProperty("product") - @Valid - private List product = null; - - @JsonProperty("productCharacteristic") - @Valid - private List productCharacteristic = null; - - @JsonProperty("productOffering") - private ProductOfferingRef productOffering = null; - - @JsonProperty("productOrderItem") - @Valid - private List productOrderItem = null; - - @JsonProperty("productPrice") - @Valid - private List productPrice = null; - - @JsonProperty("productRelationship") - @Valid - private List productRelationship = null; - - @JsonProperty("productSpecification") - private ProductSpecificationRef productSpecification = null; - - @JsonProperty("productTerm") - @Valid - private List productTerm = null; - - @JsonProperty("realizingResource") - @Valid - private List realizingResource = null; - - @JsonProperty("realizingService") - @Valid - private List realizingService = null; - - @JsonProperty("relatedParty") - @Valid - private List relatedParty = null; - - @JsonProperty("status") - private ProductStatusType status = 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 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; - } - - /** - * 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) { - 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.") - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public ProductRefOrValue 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.") - - public Boolean isIsBundle() { - return isBundle; - } - - public void setIsBundle(Boolean isBundle) { - this.isBundle = isBundle; - } - - public ProductRefOrValue 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.") - - public Boolean isIsCustomerVisible() { - return isCustomerVisible; - } - - public void setIsCustomerVisible(Boolean isCustomerVisible) { - this.isCustomerVisible = isCustomerVisible; - } - - public ProductRefOrValue 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") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ProductRefOrValue orderDate(OffsetDateTime 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") - - @Valid - public OffsetDateTime getOrderDate() { - return orderDate; - } - - public void setOrderDate(OffsetDateTime orderDate) { - this.orderDate = orderDate; - } - - public ProductRefOrValue 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.") - - public String getProductSerialNumber() { - return productSerialNumber; - } - - public void setProductSerialNumber(String productSerialNumber) { - this.productSerialNumber = productSerialNumber; - } - - public ProductRefOrValue startDate(OffsetDateTime 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") - - @Valid - public OffsetDateTime getStartDate() { - return startDate; - } - - public void setStartDate(OffsetDateTime startDate) { - this.startDate = startDate; - } - - public ProductRefOrValue terminationDate(OffsetDateTime 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") - - @Valid - public OffsetDateTime getTerminationDate() { - return terminationDate; - } - - public void setTerminationDate(OffsetDateTime terminationDate) { - this.terminationDate = terminationDate; - } - - public ProductRefOrValue agreement(List agreement) { - this.agreement = agreement; - return this; - } - - public ProductRefOrValue addAgreementItem(AgreementItemRef agreementItem) { - if (this.agreement == null) { - this.agreement = new ArrayList<>(); - } - this.agreement.add(agreementItem); - return this; - } - - /** - * Get agreement - * @return agreement - **/ - @Schema(description = "") - @Valid - public List getAgreement() { - return agreement; - } - - public void setAgreement(List agreement) { - this.agreement = agreement; - } - - public ProductRefOrValue billingAccount(BillingAccountRef billingAccount) { - this.billingAccount = billingAccount; - return this; - } - - /** - * Get billingAccount - * @return billingAccount - **/ - @Schema(description = "") - - @Valid - public BillingAccountRef getBillingAccount() { - return billingAccount; - } - - public void setBillingAccount(BillingAccountRef billingAccount) { - this.billingAccount = billingAccount; - } - - public ProductRefOrValue place(List place) { - this.place = place; - return this; - } - - public ProductRefOrValue addPlaceItem(RelatedPlaceRefOrValue placeItem) { - if (this.place == null) { - this.place = new ArrayList<>(); - } - this.place.add(placeItem); - return this; - } - - /** - * Get place - * @return place - **/ - @Schema(description = "") - @Valid - public List getPlace() { - return place; - } - - public void setPlace(List place) { - this.place = place; - } - - public ProductRefOrValue product(List product) { - this.product = product; - return this; - } - - public ProductRefOrValue addProductItem(ProductRefOrValue productItem) { - if (this.product == null) { - this.product = new ArrayList<>(); - } - this.product.add(productItem); - return this; - } - - /** - * Get product - * @return product - **/ - @Schema(description = "") - @Valid - public List getProduct() { - return product; - } - - public void setProduct(List product) { - this.product = product; - } - - public ProductRefOrValue productCharacteristic(List productCharacteristic) { - this.productCharacteristic = productCharacteristic; - return this; - } - - public ProductRefOrValue addProductCharacteristicItem(Characteristic productCharacteristicItem) { - if (this.productCharacteristic == null) { - this.productCharacteristic = new ArrayList<>(); - } - this.productCharacteristic.add(productCharacteristicItem); - return this; - } - - /** - * Get productCharacteristic - * @return productCharacteristic - **/ - @Schema(description = "") - @Valid - public List getProductCharacteristic() { - return productCharacteristic; - } - - public void setProductCharacteristic(List productCharacteristic) { - this.productCharacteristic = productCharacteristic; - } - - public ProductRefOrValue productOffering(ProductOfferingRef productOffering) { - this.productOffering = productOffering; - return this; - } - - /** - * Get productOffering - * @return productOffering - **/ - @Schema(description = "") - - @Valid - public ProductOfferingRef getProductOffering() { - return productOffering; - } - - public void setProductOffering(ProductOfferingRef productOffering) { - this.productOffering = productOffering; - } - - public ProductRefOrValue productOrderItem(List productOrderItem) { - this.productOrderItem = productOrderItem; - return this; - } - - public ProductRefOrValue addProductOrderItemItem(RelatedProductOrderItem productOrderItemItem) { - if (this.productOrderItem == null) { - this.productOrderItem = new ArrayList<>(); - } - this.productOrderItem.add(productOrderItemItem); - return this; - } - - /** - * Get productOrderItem - * @return productOrderItem - **/ - @Schema(description = "") - @Valid - public List getProductOrderItem() { - return productOrderItem; - } - - public void setProductOrderItem(List productOrderItem) { - this.productOrderItem = productOrderItem; - } - - public ProductRefOrValue productPrice(List productPrice) { - this.productPrice = productPrice; - return this; - } - - public ProductRefOrValue addProductPriceItem(ProductPrice productPriceItem) { - if (this.productPrice == null) { - this.productPrice = new ArrayList<>(); - } - this.productPrice.add(productPriceItem); - return this; - } - - /** - * Get productPrice - * @return productPrice - **/ - @Schema(description = "") - @Valid - public List getProductPrice() { - return productPrice; - } - - public void setProductPrice(List productPrice) { - this.productPrice = productPrice; - } - - public ProductRefOrValue productRelationship(List productRelationship) { - this.productRelationship = productRelationship; - return this; - } - - public ProductRefOrValue addProductRelationshipItem(ProductRelationship productRelationshipItem) { - if (this.productRelationship == null) { - this.productRelationship = new ArrayList<>(); - } - this.productRelationship.add(productRelationshipItem); - return this; - } - - /** - * Get productRelationship - * @return productRelationship - **/ - @Schema(description = "") - @Valid - public List getProductRelationship() { - return productRelationship; - } - - public void setProductRelationship(List productRelationship) { - this.productRelationship = productRelationship; - } - - public ProductRefOrValue productSpecification(ProductSpecificationRef productSpecification) { - this.productSpecification = productSpecification; - return this; - } - - /** - * Get productSpecification - * @return productSpecification - **/ - @Schema(description = "") - - @Valid - public ProductSpecificationRef getProductSpecification() { - return productSpecification; - } - - public void setProductSpecification(ProductSpecificationRef productSpecification) { - this.productSpecification = productSpecification; - } - - public ProductRefOrValue productTerm(List productTerm) { - this.productTerm = productTerm; - return this; - } - - public ProductRefOrValue addProductTermItem(ProductTerm productTermItem) { - if (this.productTerm == null) { - this.productTerm = new ArrayList<>(); - } - this.productTerm.add(productTermItem); - return this; - } - - /** - * Get productTerm - * @return productTerm - **/ - @Schema(description = "") - @Valid - public List getProductTerm() { - return productTerm; - } - - public void setProductTerm(List productTerm) { - this.productTerm = productTerm; - } - - public ProductRefOrValue realizingResource(List realizingResource) { - this.realizingResource = realizingResource; - return this; - } - - public ProductRefOrValue addRealizingResourceItem(ResourceRef realizingResourceItem) { - if (this.realizingResource == null) { - this.realizingResource = new ArrayList<>(); - } - this.realizingResource.add(realizingResourceItem); - return this; - } - - /** - * Get realizingResource - * @return realizingResource - **/ - @Schema(description = "") - @Valid - public List getRealizingResource() { - return realizingResource; - } - - public void setRealizingResource(List realizingResource) { - this.realizingResource = realizingResource; - } - - public ProductRefOrValue realizingService(List realizingService) { - this.realizingService = realizingService; - return this; - } - - public ProductRefOrValue addRealizingServiceItem(ServiceRef realizingServiceItem) { - if (this.realizingService == null) { - this.realizingService = new ArrayList<>(); - } - this.realizingService.add(realizingServiceItem); - return this; - } - - /** - * Get realizingService - * @return realizingService - **/ - @Schema(description = "") - @Valid - public List getRealizingService() { - return realizingService; - } - - public void setRealizingService(List realizingService) { - this.realizingService = realizingService; - } - - public ProductRefOrValue relatedParty(List relatedParty) { - this.relatedParty = relatedParty; - return this; - } - - public ProductRefOrValue addRelatedPartyItem(RelatedParty relatedPartyItem) { - if (this.relatedParty == null) { - this.relatedParty = new ArrayList<>(); - } - this.relatedParty.add(relatedPartyItem); - return this; - } - - /** - * Get relatedParty - * @return relatedParty - **/ - @Schema(description = "") - @Valid - public List getRelatedParty() { - return relatedParty; - } - - public void setRelatedParty(List relatedParty) { - this.relatedParty = relatedParty; - } - - public ProductRefOrValue status(ProductStatusType status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @Schema(description = "") - - @Valid - public ProductStatusType getStatus() { - return status; - } - - public void setStatus(ProductStatusType status) { - this.status = status; - } - - public ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue 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 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 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; - } - 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); - } - - @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); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProductRefOrValue {\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"); - 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(" 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/ProductRelationship.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductRelationship.java deleted file mode 100644 index 309c363..0000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductRelationship.java +++ /dev/null @@ -1,198 +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; - -/** - * 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 - */ -@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 { - @JsonProperty("relationshipType") - private String relationshipType = null; - - @JsonProperty("product") - 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; - return this; - } - - /** - * 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") - @NotNull - - public String getRelationshipType() { - return relationshipType; - } - - public void setRelationshipType(String relationshipType) { - this.relationshipType = relationshipType; - } - - public ProductRelationship product(ProductRefOrValue product) { - this.product = product; - return this; - } - - /** - * Get product - * @return product - **/ - @Schema(description = "") - @NotNull - - @Valid - public ProductRefOrValue getProduct() { - return product; - } - - public void setProduct(ProductRefOrValue product) { - 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 - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProductRelationship productRelationship = (ProductRelationship) o; - return Objects.equals(this.relationshipType, productRelationship.relationshipType) && - Objects.equals(this.product, productRelationship.product) && - Objects.equals(this.baseType, productRelationship.baseType) && - Objects.equals(this.schemaLocation, productRelationship.schemaLocation) && - Objects.equals(this.type, productRelationship.type); - } - - @Override - public int hashCode() { - return Objects.hash(relationshipType, product, baseType, schemaLocation, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProductRelationship {\n"); - - 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("}"); - 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/ProductSpecificationRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductSpecificationRef.java deleted file mode 100644 index 02b30f6..0000000 --- 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 a5717e0..0000000 --- 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/ProductTerm.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductTerm.java deleted file mode 100644 index b43c089..0000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductTerm.java +++ /dev/null @@ -1,244 +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.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.validation.Valid; - -/** - * 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 { - @JsonProperty("description") - private String description = null; - - @JsonProperty("name") - private String name = null; - - @JsonProperty("duration") - private Quantity duration = null; - - @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; - } - - /** - * Description of the productTerm - * @return description - **/ - @Schema(description = "Description of the productTerm") - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public ProductTerm name(String name) { - this.name = name; - return this; - } - - /** - * Name of the productTerm - * @return name - **/ - @Schema(description = "Name of the productTerm") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ProductTerm duration(Quantity duration) { - this.duration = duration; - return this; - } - - /** - * Get duration - * @return duration - **/ - @Schema(description = "") - - @Valid - public Quantity getDuration() { - return duration; - } - - public void setDuration(Quantity duration) { - this.duration = duration; - } - - public ProductTerm validFor(TimePeriod validFor) { - this.validFor = validFor; - return this; - } - - /** - * Get validFor - * @return validFor - **/ - @Schema(description = "") - - @Valid - public TimePeriod getValidFor() { - return validFor; - } - - public void setValidFor(TimePeriod validFor) { - 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 - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ProductTerm productTerm = (ProductTerm) o; - return Objects.equals(this.description, productTerm.description) && - Objects.equals(this.name, productTerm.name) && - Objects.equals(this.duration, productTerm.duration) && - Objects.equals(this.validFor, productTerm.validFor) && - Objects.equals(this.baseType, productTerm.baseType) && - Objects.equals(this.schemaLocation, productTerm.schemaLocation) && - Objects.equals(this.type, productTerm.type); - } - - @Override - public int hashCode() { - return Objects.hash(description, name, duration, validFor, baseType, schemaLocation, type); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProductTerm {\n"); - - sb.append(" description: ").append(toIndentedString(description)).append("\n"); - 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("}"); - 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/QuoteItemRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/QuoteItemRef.java index 9ce513c..7b9a91f 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 39278ba..563306e 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 6b82431..e56f907 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/RelatedPlaceRefOrValue.java b/src/main/java/org/etsi/osl/tmf/po622/model/RelatedPlaceRefOrValue.java deleted file mode 100644 index 36ef614..0000000 --- a/src/main/java/org/etsi/osl/tmf/po622/model/RelatedPlaceRefOrValue.java +++ /dev/null @@ -1,267 +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; - -/** - * 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 - */ -@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 { - @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; - - public RelatedPlaceRefOrValue id(String id) { - this.id = id; - return this; - } - - /** - * Unique identifier of the place - * @return id - **/ - @Schema(description = "Unique identifier of the place") - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public RelatedPlaceRefOrValue href(String href) { - this.href = href; - return this; - } - - /** - * Unique reference of the place - * @return href - **/ - @Schema(description = "Unique reference of the place") - - public String getHref() { - return href; - } - - public void setHref(String href) { - this.href = href; - } - - public RelatedPlaceRefOrValue name(String name) { - this.name = name; - return this; - } - - /** - * 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]") - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public RelatedPlaceRefOrValue role(String role) { - this.role = role; - return this; - } - - /** - * Get role - * @return role - **/ - @Schema(description = "") - @NotNull - - public String getRole() { - return role; - } - - public void setRole(String role) { - 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.") - - 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; - } - RelatedPlaceRefOrValue relatedPlaceRefOrValue = (RelatedPlaceRefOrValue) o; - return Objects.equals(this.id, relatedPlaceRefOrValue.id) && - Objects.equals(this.href, relatedPlaceRefOrValue.href) && - Objects.equals(this.name, relatedPlaceRefOrValue.name) && - Objects.equals(this.role, relatedPlaceRefOrValue.role) && - Objects.equals(this.baseType, relatedPlaceRefOrValue.baseType) && - Objects.equals(this.schemaLocation, relatedPlaceRefOrValue.schemaLocation) && - Objects.equals(this.type, relatedPlaceRefOrValue.type) && - Objects.equals(this._atReferredType, relatedPlaceRefOrValue._atReferredType); - } - - @Override - public int hashCode() { - return Objects.hash(id, href, name, role, baseType, schemaLocation, type, _atReferredType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RelatedPlaceRefOrValue {\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(" 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(" _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/RelatedProductOrderItem.java b/src/main/java/org/etsi/osl/tmf/po622/model/RelatedProductOrderItem.java index f9e567e..a265d9c 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,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/TargetProductSchema.java b/src/main/java/org/etsi/osl/tmf/po622/model/TargetProductSchema.java deleted file mode 100644 index 34205af..0000000 --- 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/rpm685/model/ProductOfferingRef.java b/src/main/java/org/etsi/osl/tmf/rpm685/model/ProductOfferingRef.java deleted file mode 100644 index a0a6750..0000000 --- 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 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 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 getBundledProductOffering() { -// return bundledProductOffering; -// } -// -// public void setBundledProductOffering(List 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 "); - } -} -- GitLab From 17eaa96608d674c31a946982d6878fada2dbf756 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Wed, 7 Aug 2024 20:07:48 +0300 Subject: [PATCH 3/9] tests --- pom.xml | 4 + .../etsi/osl/tmf/pim637/model/Product.java | 1 + .../osl/tmf/pim637/model/ProductCreate.java | 1 + .../tmf/pim637/model/ProductRefOrValue.java | 1 + .../pim637/model/ProductSpecificationRef.java | 281 ------------- .../osl/tmf/pim637/model/ProductUpdate.java | 1 + .../osl/tmf/po622/model/ProductOrder.java | 172 ++++---- .../tmf/po622/model/ProductOrderCreate.java | 324 ++++++++------ .../osl/tmf/po622/model/ProductOrderItem.java | 5 +- .../tmf/po622/model/ProductOrderMapper.java | 90 ++++ .../tmf/po622/model/ProductOrderUpdate.java | 394 ++++++++++++------ 11 files changed, 643 insertions(+), 631 deletions(-) delete mode 100644 src/main/java/org/etsi/osl/tmf/pim637/model/ProductSpecificationRef.java create mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderMapper.java diff --git a/pom.xml b/pom.xml index e38a41b..55294c1 100644 --- a/pom.xml +++ b/pom.xml @@ -7,6 +7,7 @@ ../org.etsi.osl.main + org.etsi.osl.model.tmf @@ -17,6 +18,9 @@ ${springdoc-version} 1.5.3.Final + + ${org.etsi.osl.model.tmf.version} + diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java index d8e5aa9..3760745 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java @@ -9,6 +9,7 @@ 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; 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 index 1fcf509..a9e2e36 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductCreate.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductCreate.java @@ -9,6 +9,7 @@ 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; 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 index 47c37dd..932f571 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRefOrValue.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRefOrValue.java @@ -9,6 +9,7 @@ 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; diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductSpecificationRef.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductSpecificationRef.java deleted file mode 100644 index 6139e53..0000000 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductSpecificationRef.java +++ /dev/null @@ -1,281 +0,0 @@ -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; - -/** - * 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 = "2024-08-04T00:27:07.324017400+03: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 _atBaseType = null; - - @JsonProperty("@schemaLocation") - private String _atSchemaLocation = null; - - @JsonProperty("@type") - private String _atType = 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(required = true, 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.") - @NotNull - - 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.") - @NotNull - - 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") - @NotNull - - 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 = "") - @NotNull - - @Valid - public TargetProductSchema getTargetProductSchema() { - return targetProductSchema; - } - - public void setTargetProductSchema(TargetProductSchema targetProductSchema) { - this.targetProductSchema = targetProductSchema; - } - - public ProductSpecificationRef _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 ProductSpecificationRef _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 ProductSpecificationRef _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; - } - - 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.") - @NotNull - - 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._atBaseType, productSpecificationRef._atBaseType) && - Objects.equals(this._atSchemaLocation, productSpecificationRef._atSchemaLocation) && - Objects.equals(this._atType, productSpecificationRef._atType) && - Objects.equals(this._atReferredType, productSpecificationRef._atReferredType); - } - - @Override - public int hashCode() { - return Objects.hash(id, href, name, version, targetProductSchema, _atBaseType, _atSchemaLocation, _atType, _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(" _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(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/ProductUpdate.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductUpdate.java index 49ee4c0..aff9c7c 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductUpdate.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductUpdate.java @@ -9,6 +9,7 @@ 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; 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 b8c4afc..3598dd4 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,14 +20,13 @@ package org.etsi.osl.tmf.po622.model; import java.time.OffsetDateTime; -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.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; @@ -69,7 +68,7 @@ public class ProductOrder extends BaseRootEntity { @JsonProperty("category") private String category = null; - + private OffsetDateTime completionDate = null; @Lob @@ -77,7 +76,7 @@ public class ProductOrder extends BaseRootEntity { @JsonProperty("description") private String description = null;; - + private OffsetDateTime expectedCompletionDate = null; @JsonProperty("externalId") @@ -91,14 +90,14 @@ public class ProductOrder extends BaseRootEntity { @JsonProperty("priority") private String priority = null; - + private OffsetDateTime requestedCompletionDate = null; - + private OffsetDateTime requestedStartDate = null; @JsonProperty("agreement") @Valid - @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) private Set agreement = new HashSet<>(); @JsonProperty("billingAccount") @@ -108,53 +107,48 @@ public class ProductOrder extends BaseRootEntity { @JsonProperty("channel") @Valid - @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) private Set channel = new HashSet<>(); @JsonProperty("note") @Valid - @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) - private Set note = new HashSet<>(); + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + private Set note = new HashSet<>(); @JsonProperty("orderTotalPrice") @Valid - @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) - private Set orderTotalPrice = new HashSet<>(); + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + private Set orderTotalPrice = new HashSet<>(); @JsonProperty("payment") @Valid - @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) private Set payment = new HashSet<>(); @JsonProperty("productOfferingQualification") @Valid - @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) private Set productOfferingQualification = new HashSet<>(); @JsonProperty("productOrderItem") @Valid - @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) private Set productOrderItem = new HashSet<>(); @JsonProperty("quote") @Valid - @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) private Set quote = new HashSet<>(); @JsonProperty("relatedParty") @Valid - @OneToMany(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }) - private Set relatedParty = new HashSet<>(); + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + private Set relatedParty = new HashSet<>(); @JsonProperty("state") - private ProductOrderStateType state = ProductOrderStateType.INITIAL ; + private ProductOrderStateType state = ProductOrderStateType.INITIAL; - - public ProductOrder id(String id) { - this.id = id; - return this; - } /** * ID created on repository side (OM system) @@ -164,12 +158,13 @@ public class ProductOrder extends BaseRootEntity { @Schema(description = "ID created on repository side (OM system)") public String getId() { - return id; + if ((id != null) && (uuid == null)) { // this check is good for external partners when no uuid + // exists + return id; + } + return uuid; } - public void setId(String id) { - this.id = id; - } public ProductOrder href(String href) { this.href = href; @@ -269,12 +264,12 @@ public class ProductOrder extends BaseRootEntity { @Valid @JsonProperty("completionDate") public String getCompletionDateString() { - if ( this.completionDate == null) { - return null; - } - return this.completionDate.toString(); + if (this.completionDate == null) { + return null; + } + return this.completionDate.toString(); } - + @Valid public OffsetDateTime getCompletionDate() { return completionDate; @@ -283,12 +278,12 @@ public class ProductOrder extends BaseRootEntity { public void setCompletionDate(OffsetDateTime completionDate) { this.completionDate = completionDate; } - + public void setCompletionDate(String completionDate) { - if (completionDate!=null) { - this.completionDate = OffsetDateTime.parse( completionDate ); + if (completionDate != null) { + this.completionDate = OffsetDateTime.parse(completionDate); } -} + } public ProductOrder description(String description) { @@ -326,12 +321,12 @@ public class ProductOrder extends BaseRootEntity { @JsonProperty("expectedCompletionDate") public String getExpectedCompletionDateString() { - if ( this.expectedCompletionDate == null) { - return null; - } - return this.expectedCompletionDate.toString(); + if (this.expectedCompletionDate == null) { + return null; + } + return this.expectedCompletionDate.toString(); } - + @Valid public OffsetDateTime getExpectedCompletionDate() { return expectedCompletionDate; @@ -340,13 +335,13 @@ public class ProductOrder extends BaseRootEntity { public void setExpectedCompletionDate(OffsetDateTime expectedCompletionDate) { this.expectedCompletionDate = expectedCompletionDate; } - + public void setExpectedCompletionDate(String expectedCompletionDate) { - if (expectedCompletionDate!=null) { - this.expectedCompletionDate = OffsetDateTime.parse( expectedCompletionDate ); - + if (expectedCompletionDate != null) { + this.expectedCompletionDate = OffsetDateTime.parse(expectedCompletionDate); + } -} + } public ProductOrder externalId(String externalId) { this.externalId = externalId; @@ -401,14 +396,14 @@ public class ProductOrder extends BaseRootEntity { * @return orderDate **/ @Schema(description = "Date when the order was created") - + @Valid @JsonProperty("orderDate") public String getOrderDateString() { - if ( this.orderDate == null) { - return null; - } - return this.orderDate.toString(); + if (this.orderDate == null) { + return null; + } + return this.orderDate.toString(); } @Valid @@ -419,14 +414,14 @@ public class ProductOrder extends BaseRootEntity { public void setOrderDate(OffsetDateTime orderDate) { this.orderDate = orderDate; } - + public void setOrderDate(String orderDate) { - if (orderDate!=null) { - this.orderDate = OffsetDateTime.parse( orderDate ); - + if (orderDate != null) { + this.orderDate = OffsetDateTime.parse(orderDate); + } -} + } public ProductOrder priority(String priority) { this.priority = priority; @@ -466,12 +461,12 @@ public class ProductOrder extends BaseRootEntity { @JsonProperty("requestedCompletionDate") public String getRequestedCompletionDateString() { - if ( this.requestedCompletionDate == null) { - return null; - } - return this.requestedCompletionDate.toString(); + if (this.requestedCompletionDate == null) { + return null; + } + return this.requestedCompletionDate.toString(); } - + @Valid public OffsetDateTime getRequestedCompletionDate() { return requestedCompletionDate; @@ -480,14 +475,14 @@ public class ProductOrder extends BaseRootEntity { public void setRequestedCompletionDate(OffsetDateTime requestedCompletionDate) { this.requestedCompletionDate = requestedCompletionDate; } - + public void setRequestedCompletionDate(String requestedCompletionDate) { - if (requestedCompletionDate!=null) { - this.requestedCompletionDate = OffsetDateTime.parse( requestedCompletionDate ); - + if (requestedCompletionDate != null) { + this.requestedCompletionDate = OffsetDateTime.parse(requestedCompletionDate); + } -} + } public ProductOrder requestedStartDate(OffsetDateTime requestedStartDate) { this.requestedStartDate = requestedStartDate; @@ -507,12 +502,12 @@ public class ProductOrder extends BaseRootEntity { @JsonProperty("requestedStartDate") public String getRequestedStartDateString() { - if ( this.requestedStartDate == null) { - return null; - } - return this.requestedStartDate.toString(); + if (this.requestedStartDate == null) { + return null; + } + return this.requestedStartDate.toString(); } - + @Valid public OffsetDateTime getRequestedStartDate() { return requestedStartDate; @@ -521,14 +516,14 @@ public class ProductOrder extends BaseRootEntity { public void setRequestedStartDate(OffsetDateTime requestedStartDate) { this.requestedStartDate = requestedStartDate; } - - + + public void setRequestedStartDate(String requestedStartDate) { - if (requestedStartDate!=null) { - this.requestedStartDate = OffsetDateTime.parse( requestedStartDate ); - - } + if (requestedStartDate != null) { + this.requestedStartDate = OffsetDateTime.parse(requestedStartDate); + + } } public ProductOrder agreement(Set agreement) { @@ -987,4 +982,25 @@ public class ProductOrder extends BaseRootEntity { } 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/ProductOrderCreate.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreate.java index 91b5fac..5098d22 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 @@ -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") @@ -121,13 +124,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 +145,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 +165,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 +188,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 +208,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 +229,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 +249,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,26 +272,37 @@ 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 ); - + if (requestedCompletionDate != null) { + this.requestedCompletionDate = OffsetDateTime.parse(requestedCompletionDate); + } -} + } public ProductOrderCreate requestedStartDate(OffsetDateTime requestedStartDate) { this.requestedStartDate = requestedStartDate; @@ -283,27 +310,40 @@ public class ProductOrderCreate { } /** - * 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; } - + public void setRequestedStartDate(String requestedStartDate) { - if (requestedStartDate!=null) { - this.requestedStartDate = OffsetDateTime.parse( 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 agreement) { this.agreement = agreement; @@ -320,11 +360,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 getAgreement() { + @Valid + public List getAgreement() { return agreement; } @@ -339,12 +380,13 @@ public class ProductOrderCreate { /** * Get billingAccount + * * @return billingAccount - **/ + **/ @Schema(description = "") - - @Valid - public BillingAccountRef getBillingAccount() { + + @Valid + public BillingAccountRef getBillingAccount() { return billingAccount; } @@ -367,11 +409,12 @@ public class ProductOrderCreate { /** * Get channel + * * @return channel - **/ + **/ @Schema(description = "") - @Valid - public List getChannel() { + @Valid + public List getChannel() { return channel; } @@ -394,11 +437,12 @@ public class ProductOrderCreate { /** * Get note + * * @return note - **/ + **/ @Schema(description = "") - @Valid - public List getNote() { + @Valid + public List getNote() { return note; } @@ -421,11 +465,12 @@ public class ProductOrderCreate { /** * Get orderTotalPrice + * * @return orderTotalPrice - **/ + **/ @Schema(description = "") - @Valid - public List getOrderTotalPrice() { + @Valid + public List getOrderTotalPrice() { return orderTotalPrice; } @@ -448,11 +493,12 @@ public class ProductOrderCreate { /** * Get payment + * * @return payment - **/ + **/ @Schema(description = "") - @Valid - public List getPayment() { + @Valid + public List getPayment() { return payment; } @@ -460,12 +506,14 @@ public class ProductOrderCreate { this.payment = payment; } - public ProductOrderCreate productOfferingQualification(List productOfferingQualification) { + public ProductOrderCreate productOfferingQualification( + List productOfferingQualification) { this.productOfferingQualification = productOfferingQualification; return this; } - public ProductOrderCreate addProductOfferingQualificationItem(ProductOfferingQualificationRef productOfferingQualificationItem) { + public ProductOrderCreate addProductOfferingQualificationItem( + ProductOfferingQualificationRef productOfferingQualificationItem) { if (this.productOfferingQualification == null) { this.productOfferingQualification = new ArrayList<>(); } @@ -475,15 +523,17 @@ public class ProductOrderCreate { /** * Get productOfferingQualification + * * @return productOfferingQualification - **/ + **/ @Schema(description = "") - @Valid - public List getProductOfferingQualification() { + @Valid + public List getProductOfferingQualification() { return productOfferingQualification; } - public void setProductOfferingQualification(List productOfferingQualification) { + public void setProductOfferingQualification( + List productOfferingQualification) { this.productOfferingQualification = productOfferingQualification; } @@ -499,12 +549,14 @@ public class ProductOrderCreate { /** * Get productOrderItem + * * @return productOrderItem - **/ + **/ @Schema(description = "") - @NotNull - @Valid - @Size(min=1) public List getProductOrderItem() { + @NotNull + @Valid + @Size(min = 1) + public List getProductOrderItem() { return productOrderItem; } @@ -527,11 +579,12 @@ public class ProductOrderCreate { /** * Get quote + * * @return quote - **/ + **/ @Schema(description = "") - @Valid - public List getQuote() { + @Valid + public List getQuote() { return quote; } @@ -554,11 +607,12 @@ public class ProductOrderCreate { /** * Get relatedParty + * * @return relatedParty - **/ + **/ @Schema(description = "") - @Valid - public List getRelatedParty() { + @Valid + public List getRelatedParty() { return relatedParty; } @@ -573,11 +627,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; } @@ -592,11 +647,13 @@ 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; } @@ -611,11 +668,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; } @@ -633,48 +691,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"); @@ -682,7 +746,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"); @@ -694,8 +759,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/ProductOrderItem.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderItem.java index 9675773..5278912 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 @@ -137,12 +137,9 @@ public class ProductOrderItem extends BaseRootEntity { @NotNull public String getId() { - return id; + return uuid; } - public void setId(String id) { - this.id = id; - } public ProductOrderItem quantity(Integer quantity) { this.quantity = quantity; 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 0000000..1271c87 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderMapper.java @@ -0,0 +1,90 @@ +package org.etsi.osl.tmf.po622.model; + +import java.util.List; +import java.util.Set; +import org.etsi.osl.tmf.common.model.service.Note; +import org.etsi.osl.tmf.prm669.model.RelatedParty; +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 updateProductOrderItem( ProductOrder so, ProductOrderUpdate updateEntity ){ + if ( updateEntity.getProductOrderItem() != null ) { + for (ProductOrderItem soiUpd : updateEntity.getProductOrderItem()) { + ProductOrderItem soiOrigin = so.findOrderItemById( soiUpd.getId() ); + if (soiOrigin!=null) { + //updateOrderItem(soiOrigin, soiUpd); + if ( soiUpd.getAction()!=null) { + soiOrigin.setAction( soiUpd.getAction() ); + } + /** + * 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 ); + + + } + + } + } + } + return so.getProductOrderItem(); + } + + + default Set 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 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/ProductOrderUpdate.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderUpdate.java index 2de1e00..e705a5a 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 @@ -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 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 getAgreement() { + @Valid + public List 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 getChannel() { + @Valid + public List getChannel() { return channel; } @@ -427,11 +521,12 @@ public class ProductOrderUpdate { /** * Get note + * * @return note - **/ + **/ @Schema(description = "") - @Valid - public List getNote() { + @Valid + public List getNote() { return note; } @@ -454,11 +549,12 @@ public class ProductOrderUpdate { /** * Get orderTotalPrice + * * @return orderTotalPrice - **/ + **/ @Schema(description = "") - @Valid - public List getOrderTotalPrice() { + @Valid + public List getOrderTotalPrice() { return orderTotalPrice; } @@ -481,11 +577,12 @@ public class ProductOrderUpdate { /** * Get payment + * * @return payment - **/ + **/ @Schema(description = "") - @Valid - public List getPayment() { + @Valid + public List getPayment() { return payment; } @@ -493,12 +590,14 @@ public class ProductOrderUpdate { this.payment = payment; } - public ProductOrderUpdate productOfferingQualification(List productOfferingQualification) { + public ProductOrderUpdate productOfferingQualification( + List 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 getProductOfferingQualification() { + @Valid + public List getProductOfferingQualification() { return productOfferingQualification; } - public void setProductOfferingQualification(List productOfferingQualification) { + public void setProductOfferingQualification( + List productOfferingQualification) { this.productOfferingQualification = productOfferingQualification; } @@ -532,12 +633,14 @@ public class ProductOrderUpdate { /** * Get productOrderItem + * * @return productOrderItem - **/ + **/ @Schema(description = "") - @NotNull - @Valid - @Size(min=1) public List getProductOrderItem() { + @NotNull + @Valid + @Size(min = 1) + public List getProductOrderItem() { return productOrderItem; } @@ -560,11 +663,12 @@ public class ProductOrderUpdate { /** * Get quote + * * @return quote - **/ + **/ @Schema(description = "") - @Valid - public List getQuote() { + @Valid + public List getQuote() { return quote; } @@ -587,11 +691,12 @@ public class ProductOrderUpdate { /** * Get relatedParty + * * @return relatedParty - **/ + **/ @Schema(description = "") - @Valid - public List getRelatedParty() { + @Valid + public List 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) { -- GitLab From f46c9d4eb423c7c432028a65199b0179bfef8707 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Fri, 9 Aug 2024 13:12:42 +0300 Subject: [PATCH 4/9] fixing model for jpa --- .../osl/tmf/pcm620/model/ProductOffering.java | 8 +- .../osl/tmf/pim637/model/PriceAlteration.java | 82 +- .../etsi/osl/tmf/pim637/model/Product.java | 257 +++-- .../osl/tmf/pim637/model/ProductPrice.java | 114 +-- .../tmf/pim637/model/ProductRefOrValue.java | 886 +----------------- .../tmf/pim637/model/ProductRelationship.java | 94 +- .../osl/tmf/pim637/model/ProductTerm.java | 91 +- .../pim637/model/RelatedPlaceRefOrValue.java | 99 +- .../osl/tmf/po622/model/AgreementItemRef.java | 131 +-- ...ProductOrderAttributeValueChangeEvent.java | 3 + ...OrderAttributeValueChangeNotification.java | 92 ++ .../po622/model/ProductOrderCreateEvent.java | 3 + .../model/ProductOrderCreateNotification.java | 91 ++ .../po622/model/ProductOrderDeleteEvent.java | 3 + .../model/ProductOrderDeleteNotification.java | 92 ++ .../osl/tmf/po622/model/ProductOrderItem.java | 16 +- .../tmf/po622/model/ProductOrderMapper.java | 193 ++-- .../model/ProductOrderStateChangeEvent.java | 3 + .../ProductOrderStateChangeNotification.java | 90 ++ .../po622/model/RelatedProductOrderItem.java | 14 +- 20 files changed, 745 insertions(+), 1617 deletions(-) create mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderAttributeValueChangeNotification.java create mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreateNotification.java create mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderDeleteNotification.java create mode 100644 src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateChangeNotification.java 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 1efa62f..c05bc86 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 = 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; diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/PriceAlteration.java b/src/main/java/org/etsi/osl/tmf/pim637/model/PriceAlteration.java index e42c15a..75c3805 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/PriceAlteration.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/PriceAlteration.java @@ -48,15 +48,6 @@ public class PriceAlteration extends BaseRootNamedEntity { @OneToOne(cascade = CascadeType.ALL) private ProductOfferingPriceRef productOfferingPrice = null; - @JsonProperty("@baseType") - private String _atBaseType = null; - - @JsonProperty("@schemaLocation") - private String _atSchemaLocation = null; - - @JsonProperty("@type") - private String _atType = null; - public PriceAlteration applicationDuration(Integer applicationDuration) { this.applicationDuration = applicationDuration; return this; @@ -239,65 +230,6 @@ public class PriceAlteration extends BaseRootNamedEntity { this.productOfferingPrice = productOfferingPrice; } - public PriceAlteration _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 PriceAlteration _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 PriceAlteration _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 @@ -318,14 +250,14 @@ public class PriceAlteration extends BaseRootNamedEntity { Objects.equals(this.unitOfMeasure, priceAlteration.unitOfMeasure) && Objects.equals(this.price, priceAlteration.price) && Objects.equals(this.productOfferingPrice, priceAlteration.productOfferingPrice) && - Objects.equals(this._atBaseType, priceAlteration._atBaseType) && - Objects.equals(this._atSchemaLocation, priceAlteration._atSchemaLocation) && - Objects.equals(this._atType, priceAlteration._atType); + Objects.equals(this.baseType, priceAlteration.baseType) && + Objects.equals(this.schemaLocation, priceAlteration.schemaLocation) && + Objects.equals(this.type, priceAlteration.type); } @Override public int hashCode() { - return Objects.hash(applicationDuration, description, name, priceType, priority, recurringChargePeriod, unitOfMeasure, price, productOfferingPrice, _atBaseType, _atSchemaLocation, _atType); + return Objects.hash(applicationDuration, description, name, priceType, priority, recurringChargePeriod, unitOfMeasure, price, productOfferingPrice, baseType, schemaLocation, type); } @Override @@ -342,9 +274,9 @@ public class PriceAlteration extends BaseRootNamedEntity { 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(" _atBaseType: ").append(toIndentedString(_atBaseType)).append("\n"); - sb.append(" _atSchemaLocation: ").append(toIndentedString(_atSchemaLocation)).append("\n"); - sb.append(" _atType: ").append(toIndentedString(_atType)).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/Product.java b/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java index 3760745..75b40a5 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/Product.java @@ -2,9 +2,12 @@ package org.etsi.osl.tmf.pim637.model; 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; @@ -15,6 +18,11 @@ 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; @@ -25,102 +33,106 @@ import jakarta.validation.constraints.NotNull; @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 Product { +@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 Date orderDate = null; + protected Date orderDate = null; @JsonProperty("productSerialNumber") - private String productSerialNumber = null; + protected String productSerialNumber = null; @JsonProperty("startDate") - private Date startDate = null; + protected Date startDate = null; @JsonProperty("terminationDate") - private Date terminationDate = null; + protected Date terminationDate = null; @JsonProperty("agreement") @Valid - private List agreement = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set 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 place = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set place = new HashSet<>(); @JsonProperty("product") @Valid - private List product = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set product = new HashSet<>(); @JsonProperty("productCharacteristic") @Valid - private List productCharacteristic = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set 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 productOrderItem = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set productOrderItem = new HashSet<>(); @JsonProperty("productPrice") @Valid - private List productPrice = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set productPrice = new HashSet<>(); @JsonProperty("productRelationship") @Valid - private List productRelationship = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set 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 = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set productTerm = new HashSet<>(); @JsonProperty("realizingResource") @Valid - private List realizingResource = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set realizingResource = new HashSet<>(); @JsonProperty("realizingService") @Valid - private List realizingService = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set realizingService = new HashSet<>(); @JsonProperty("relatedParty") @Valid - private List relatedParty = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + protected Set relatedParty = new HashSet<>(); @JsonProperty("status") - private ProductStatusType status = null; - - @JsonProperty("@baseType") - private String _atBaseType = null; + protected ProductStatusType status = null; - @JsonProperty("@schemaLocation") - private String _atSchemaLocation = null; - - @JsonProperty("@type") - private String _atType = null; public Product id(String id) { this.id = id; @@ -325,14 +337,14 @@ public class Product { this.terminationDate = terminationDate; } - public Product agreement(List agreement) { + public Product agreement(Set agreement) { this.agreement = agreement; return this; } public Product addAgreementItem(AgreementItemRef agreementItem) { if (this.agreement == null) { - this.agreement = new ArrayList(); + this.agreement = new HashSet(); } this.agreement.add(agreementItem); return this; @@ -345,11 +357,11 @@ public class Product { @Schema(description = "") @NotNull @Valid - public List getAgreement() { + public Set getAgreement() { return agreement; } - public void setAgreement(List agreement) { + public void setAgreement(Set agreement) { this.agreement = agreement; } @@ -374,14 +386,14 @@ public class Product { this.billingAccount = billingAccount; } - public Product place(List place) { + public Product place(Set place) { this.place = place; return this; } public Product addPlaceItem(RelatedPlaceRefOrValue placeItem) { if (this.place == null) { - this.place = new ArrayList(); + this.place = new HashSet(); } this.place.add(placeItem); return this; @@ -394,22 +406,22 @@ public class Product { @Schema(description = "") @NotNull @Valid - public List getPlace() { + public Set getPlace() { return place; } - public void setPlace(List place) { + public void setPlace(Set place) { this.place = place; } - public Product product(List product) { + public Product product(Set product) { this.product = product; return this; } public Product addProductItem(ProductRefOrValue productItem) { if (this.product == null) { - this.product = new ArrayList(); + this.product = new HashSet(); } this.product.add(productItem); return this; @@ -422,22 +434,22 @@ public class Product { @Schema(description = "") @NotNull @Valid - public List getProduct() { + public Set getProduct() { return product; } - public void setProduct(List product) { + public void setProduct(Set product) { this.product = product; } - public Product productCharacteristic(List productCharacteristic) { + public Product productCharacteristic(Set productCharacteristic) { this.productCharacteristic = productCharacteristic; return this; } public Product addProductCharacteristicItem(Characteristic productCharacteristicItem) { if (this.productCharacteristic == null) { - this.productCharacteristic = new ArrayList(); + this.productCharacteristic = new HashSet(); } this.productCharacteristic.add(productCharacteristicItem); return this; @@ -450,11 +462,11 @@ public class Product { @Schema(description = "") @NotNull @Valid - public List getProductCharacteristic() { + public Set getProductCharacteristic() { return productCharacteristic; } - public void setProductCharacteristic(List productCharacteristic) { + public void setProductCharacteristic(Set productCharacteristic) { this.productCharacteristic = productCharacteristic; } @@ -479,14 +491,14 @@ public class Product { this.productOffering = productOffering; } - public Product productOrderItem(List productOrderItem) { + public Product productOrderItem(Set productOrderItem) { this.productOrderItem = productOrderItem; return this; } public Product addProductOrderItemItem(RelatedProductOrderItem productOrderItemItem) { if (this.productOrderItem == null) { - this.productOrderItem = new ArrayList(); + this.productOrderItem = new HashSet(); } this.productOrderItem.add(productOrderItemItem); return this; @@ -499,22 +511,22 @@ public class Product { @Schema(description = "") @NotNull @Valid - public List getProductOrderItem() { + public Set getProductOrderItem() { return productOrderItem; } - public void setProductOrderItem(List productOrderItem) { + public void setProductOrderItem(Set productOrderItem) { this.productOrderItem = productOrderItem; } - public Product productPrice(List productPrice) { + public Product productPrice(Set productPrice) { this.productPrice = productPrice; return this; } public Product addProductPriceItem(ProductPrice productPriceItem) { if (this.productPrice == null) { - this.productPrice = new ArrayList(); + this.productPrice = new HashSet(); } this.productPrice.add(productPriceItem); return this; @@ -527,22 +539,22 @@ public class Product { @Schema(description = "") @NotNull @Valid - public List getProductPrice() { + public Set getProductPrice() { return productPrice; } - public void setProductPrice(List productPrice) { + public void setProductPrice(Set productPrice) { this.productPrice = productPrice; } - public Product productRelationship(List productRelationship) { + public Product productRelationship(Set productRelationship) { this.productRelationship = productRelationship; return this; } public Product addProductRelationshipItem(ProductRelationship productRelationshipItem) { if (this.productRelationship == null) { - this.productRelationship = new ArrayList(); + this.productRelationship = new HashSet(); } this.productRelationship.add(productRelationshipItem); return this; @@ -555,11 +567,11 @@ public class Product { @Schema(description = "") @NotNull @Valid - public List getProductRelationship() { + public Set getProductRelationship() { return productRelationship; } - public void setProductRelationship(List productRelationship) { + public void setProductRelationship(Set productRelationship) { this.productRelationship = productRelationship; } @@ -584,14 +596,14 @@ public class Product { this.productSpecification = productSpecification; } - public Product productTerm(List productTerm) { + public Product productTerm(Set productTerm) { this.productTerm = productTerm; return this; } public Product addProductTermItem(ProductTerm productTermItem) { if (this.productTerm == null) { - this.productTerm = new ArrayList(); + this.productTerm = new HashSet(); } this.productTerm.add(productTermItem); return this; @@ -604,22 +616,22 @@ public class Product { @Schema(description = "") @NotNull @Valid - public List getProductTerm() { + public Set getProductTerm() { return productTerm; } - public void setProductTerm(List productTerm) { + public void setProductTerm(Set productTerm) { this.productTerm = productTerm; } - public Product realizingResource(List realizingResource) { + public Product realizingResource(Set realizingResource) { this.realizingResource = realizingResource; return this; } public Product addRealizingResourceItem(ResourceRef realizingResourceItem) { if (this.realizingResource == null) { - this.realizingResource = new ArrayList(); + this.realizingResource = new HashSet(); } this.realizingResource.add(realizingResourceItem); return this; @@ -632,22 +644,22 @@ public class Product { @Schema(description = "") @NotNull @Valid - public List getRealizingResource() { + public Set getRealizingResource() { return realizingResource; } - public void setRealizingResource(List realizingResource) { + public void setRealizingResource(Set realizingResource) { this.realizingResource = realizingResource; } - public Product realizingService(List realizingService) { + public Product realizingService(Set realizingService) { this.realizingService = realizingService; return this; } public Product addRealizingServiceItem(ServiceRef realizingServiceItem) { if (this.realizingService == null) { - this.realizingService = new ArrayList(); + this.realizingService = new HashSet(); } this.realizingService.add(realizingServiceItem); return this; @@ -660,22 +672,22 @@ public class Product { @Schema(description = "") @NotNull @Valid - public List getRealizingService() { + public Set getRealizingService() { return realizingService; } - public void setRealizingService(List realizingService) { + public void setRealizingService(Set realizingService) { this.realizingService = realizingService; } - public Product relatedParty(List relatedParty) { + public Product relatedParty(Set relatedParty) { this.relatedParty = relatedParty; return this; } public Product addRelatedPartyItem(RelatedParty relatedPartyItem) { if (this.relatedParty == null) { - this.relatedParty = new ArrayList(); + this.relatedParty = new HashSet(); } this.relatedParty.add(relatedPartyItem); return this; @@ -688,11 +700,11 @@ public class Product { @Schema(description = "") @NotNull @Valid - public List getRelatedParty() { + public Set getRelatedParty() { return relatedParty; } - public void setRelatedParty(List relatedParty) { + public void setRelatedParty(Set relatedParty) { this.relatedParty = relatedParty; } @@ -717,65 +729,9 @@ public class Product { this.status = status; } - public Product _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 Product _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 Product _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 @@ -812,15 +768,16 @@ public class Product { Objects.equals(this.realizingService, product.realizingService) && Objects.equals(this.relatedParty, product.relatedParty) && Objects.equals(this.status, product.status) && - Objects.equals(this._atBaseType, product._atBaseType) && - Objects.equals(this._atSchemaLocation, product._atSchemaLocation) && - Objects.equals(this._atType, product._atType); + Objects.equals(this.baseType, product.baseType) && + Objects.equals(this.schemaLocation, product.schemaLocation) && + 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, _atBaseType, _atSchemaLocation, _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, _atSchemaLocation, _atType); +// } @Override public String toString() { @@ -852,9 +809,9 @@ public class Product { 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(" baseType: ").append(toIndentedString(baseType)).append("\n"); + sb.append(" schemaLocation: ").append(toIndentedString(schemaLocation)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductPrice.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductPrice.java index d60d5da..b871aa6 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductPrice.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductPrice.java @@ -1,12 +1,20 @@ 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; @@ -17,13 +25,11 @@ import jakarta.validation.constraints.NotNull; @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 ProductPrice { +@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; @@ -35,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 productPriceAlteration = null; - - @JsonProperty("@baseType") - private String _atBaseType = null; - - @JsonProperty("@schemaLocation") - private String _atSchemaLocation = null; - - @JsonProperty("@type") - private String _atType = null; + @OneToMany(cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) + private Set productPriceAlteration = new HashSet<>(); public ProductPrice description(String description) { this.description = description; @@ -219,14 +223,14 @@ public class ProductPrice { this.productOfferingPrice = productOfferingPrice; } - public ProductPrice productPriceAlteration(List productPriceAlteration) { + public ProductPrice productPriceAlteration(Set productPriceAlteration) { this.productPriceAlteration = productPriceAlteration; return this; } public ProductPrice addProductPriceAlterationItem(PriceAlteration productPriceAlterationItem) { if (this.productPriceAlteration == null) { - this.productPriceAlteration = new ArrayList(); + this.productPriceAlteration = new HashSet(); } this.productPriceAlteration.add(productPriceAlterationItem); return this; @@ -239,73 +243,15 @@ public class ProductPrice { @Schema(description = "") @NotNull @Valid - public List getProductPriceAlteration() { + public Set getProductPriceAlteration() { return productPriceAlteration; } - public void setProductPriceAlteration(List productPriceAlteration) { + public void setProductPriceAlteration(Set productPriceAlteration) { this.productPriceAlteration = productPriceAlteration; } - public ProductPrice _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 ProductPrice _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 ProductPrice _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 @@ -326,14 +272,14 @@ public class ProductPrice { Objects.equals(this.price, productPrice.price) && Objects.equals(this.productOfferingPrice, productPrice.productOfferingPrice) && Objects.equals(this.productPriceAlteration, productPrice.productPriceAlteration) && - Objects.equals(this._atBaseType, productPrice._atBaseType) && - Objects.equals(this._atSchemaLocation, productPrice._atSchemaLocation) && - Objects.equals(this._atType, productPrice._atType); + Objects.equals(this.baseType, productPrice.baseType) && + Objects.equals(this.schemaLocation, productPrice.schemaLocation) && + Objects.equals(this.baseType, productPrice.baseType); } @Override public int hashCode() { - return Objects.hash(description, name, priceType, recurringChargePeriod, unitOfMeasure, billingAccount, price, productOfferingPrice, productPriceAlteration, _atBaseType, _atSchemaLocation, _atType); + return Objects.hash(description, name, priceType, recurringChargePeriod, unitOfMeasure, billingAccount, price, productOfferingPrice, productPriceAlteration, baseType, schemaLocation, baseType); } @Override @@ -350,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(" _atBaseType: ").append(toIndentedString(_atBaseType)).append("\n"); - sb.append(" _atSchemaLocation: ").append(toIndentedString(_atSchemaLocation)).append("\n"); - sb.append(" _atType: ").append(toIndentedString(_atType)).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/pim637/model/ProductRefOrValue.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRefOrValue.java index 932f571..c95f059 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRefOrValue.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRefOrValue.java @@ -4,6 +4,7 @@ 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; @@ -15,883 +16,68 @@ 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 + * 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") +@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]") +@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 { -public class ProductRefOrValue { - @JsonProperty("id") - private String id = null; - @JsonProperty("href") - private String href = null; - - @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 agreement = null; - - @JsonProperty("billingAccount") - private BillingAccountRef billingAccount = null; - - @JsonProperty("place") - @Valid - private List place = null; - - @JsonProperty("product") - @Valid - private List product = null; - - @JsonProperty("productCharacteristic") - @Valid - private List productCharacteristic = null; - - @JsonProperty("productOffering") - private ProductOfferingRef productOffering = null; - - @JsonProperty("productOrderItem") - @Valid - private List productOrderItem = null; - - @JsonProperty("productPrice") - @Valid - private List productPrice = null; - - @JsonProperty("productRelationship") - @Valid - private List productRelationship = null; - - @JsonProperty("productSpecification") - private ProductSpecificationRef productSpecification = null; - - @JsonProperty("productTerm") - @Valid - private List productTerm = null; - - @JsonProperty("realizingResource") - @Valid - private List realizingResource = null; - - @JsonProperty("realizingService") - @Valid - private List realizingService = null; - - @JsonProperty("relatedParty") - @Valid - private List 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; - - @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") - @NotNull + @NotNull - public String getId() { - return id; + public String getId() { + if (id == null) { + return super.getId(); + } + return this.id; } public void setId(String id) { this.id = id; } - public ProductRefOrValue href(String href) { - this.href = href; - return this; - } - - /** - * Reference of the product - * @return href - **/ - @Schema(description = "Reference of the product") - @NotNull - - public String getHref() { - return href; - } - - public void setHref(String href) { - this.href = href; - } - - public ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue 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 ProductRefOrValue agreement(List agreement) { - this.agreement = agreement; - return this; - } - - public ProductRefOrValue addAgreementItem(AgreementItemRef agreementItem) { - if (this.agreement == null) { - this.agreement = new ArrayList(); + public Characteristic findCharacteristicByName(String aName) { + for (Characteristic c : productCharacteristic) { + if (c.getName().equals(aName)) { + return c; + } } - this.agreement.add(agreementItem); - return this; - } - - /** - * Get agreement - * @return agreement - **/ - @Schema(description = "") - @NotNull - @Valid - public List getAgreement() { - return agreement; - } - - public void setAgreement(List agreement) { - this.agreement = agreement; - } - public ProductRefOrValue billingAccount(BillingAccountRef billingAccount) { - this.billingAccount = billingAccount; - return this; + return null; } - /** - * Get billingAccount - * @return billingAccount - **/ - @Schema(description = "") - @NotNull - - @Valid - public BillingAccountRef getBillingAccount() { - return billingAccount; - } - - public void setBillingAccount(BillingAccountRef billingAccount) { - this.billingAccount = billingAccount; + public Object getRealizingServiceById(@NotNull String id) { + for (ServiceRef sr : realizingService) { + if ( sr.getId().equals(id)) { + return sr; + } } - - public ProductRefOrValue place(List place) { - this.place = place; - return this; + return null; } - public ProductRefOrValue addPlaceItem(RelatedPlaceRefOrValue placeItem) { - if (this.place == null) { - this.place = new ArrayList(); - } - this.place.add(placeItem); - return this; + public Object getRealizingResourceById(@NotNull String id) { + for (ResourceRef sr : realizingResource) { + if ( sr.getId().equals(id)) { + return sr; + } } - - /** - * Get place - * @return place - **/ - @Schema(description = "") - @NotNull - @Valid - public List getPlace() { - return place; + return null; } - public void setPlace(List place) { - this.place = place; - } - public ProductRefOrValue product(List product) { - this.product = product; - return this; - } - public ProductRefOrValue addProductItem(ProductRefOrValue productItem) { - if (this.product == null) { - this.product = new ArrayList(); - } - this.product.add(productItem); - return this; - } - - /** - * Get product - * @return product - **/ - @Schema(description = "") - @NotNull - @Valid - public List getProduct() { - return product; - } - - public void setProduct(List product) { - this.product = product; - } - - public ProductRefOrValue productCharacteristic(List productCharacteristic) { - this.productCharacteristic = productCharacteristic; - return this; - } - - public ProductRefOrValue addProductCharacteristicItem(Characteristic productCharacteristicItem) { - if (this.productCharacteristic == null) { - this.productCharacteristic = new ArrayList(); - } - this.productCharacteristic.add(productCharacteristicItem); - return this; - } - - /** - * Get productCharacteristic - * @return productCharacteristic - **/ - @Schema(description = "") - @NotNull - @Valid - public List getProductCharacteristic() { - return productCharacteristic; - } - - public void setProductCharacteristic(List productCharacteristic) { - this.productCharacteristic = productCharacteristic; - } - - public ProductRefOrValue 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 ProductRefOrValue productOrderItem(List productOrderItem) { - this.productOrderItem = productOrderItem; - return this; - } - - public ProductRefOrValue addProductOrderItemItem(RelatedProductOrderItem productOrderItemItem) { - if (this.productOrderItem == null) { - this.productOrderItem = new ArrayList(); - } - this.productOrderItem.add(productOrderItemItem); - return this; - } - - /** - * Get productOrderItem - * @return productOrderItem - **/ - @Schema(description = "") - @NotNull - @Valid - public List getProductOrderItem() { - return productOrderItem; - } - - public void setProductOrderItem(List productOrderItem) { - this.productOrderItem = productOrderItem; - } - - public ProductRefOrValue productPrice(List productPrice) { - this.productPrice = productPrice; - return this; - } - - public ProductRefOrValue addProductPriceItem(ProductPrice productPriceItem) { - if (this.productPrice == null) { - this.productPrice = new ArrayList(); - } - this.productPrice.add(productPriceItem); - return this; - } - - /** - * Get productPrice - * @return productPrice - **/ - @Schema(description = "") - @NotNull - @Valid - public List getProductPrice() { - return productPrice; - } - - public void setProductPrice(List productPrice) { - this.productPrice = productPrice; - } - - public ProductRefOrValue productRelationship(List productRelationship) { - this.productRelationship = productRelationship; - return this; - } - - public ProductRefOrValue addProductRelationshipItem(ProductRelationship productRelationshipItem) { - if (this.productRelationship == null) { - this.productRelationship = new ArrayList(); - } - this.productRelationship.add(productRelationshipItem); - return this; - } - - /** - * Get productRelationship - * @return productRelationship - **/ - @Schema(description = "") - @NotNull - @Valid - public List getProductRelationship() { - return productRelationship; - } - - public void setProductRelationship(List productRelationship) { - this.productRelationship = productRelationship; - } - - public ProductRefOrValue 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 ProductRefOrValue productTerm(List productTerm) { - this.productTerm = productTerm; - return this; - } - - public ProductRefOrValue addProductTermItem(ProductTerm productTermItem) { - if (this.productTerm == null) { - this.productTerm = new ArrayList(); - } - this.productTerm.add(productTermItem); - return this; - } - - /** - * Get productTerm - * @return productTerm - **/ - @Schema(description = "") - @NotNull - @Valid - public List getProductTerm() { - return productTerm; - } - - public void setProductTerm(List productTerm) { - this.productTerm = productTerm; - } - - public ProductRefOrValue realizingResource(List realizingResource) { - this.realizingResource = realizingResource; - return this; - } - - public ProductRefOrValue addRealizingResourceItem(ResourceRef realizingResourceItem) { - if (this.realizingResource == null) { - this.realizingResource = new ArrayList(); - } - this.realizingResource.add(realizingResourceItem); - return this; - } - - /** - * Get realizingResource - * @return realizingResource - **/ - @Schema(description = "") - @NotNull - @Valid - public List getRealizingResource() { - return realizingResource; - } - - public void setRealizingResource(List realizingResource) { - this.realizingResource = realizingResource; - } - - public ProductRefOrValue realizingService(List realizingService) { - this.realizingService = realizingService; - return this; - } - - public ProductRefOrValue addRealizingServiceItem(ServiceRef realizingServiceItem) { - if (this.realizingService == null) { - this.realizingService = new ArrayList(); - } - this.realizingService.add(realizingServiceItem); - return this; - } - - /** - * Get realizingService - * @return realizingService - **/ - @Schema(description = "") - @NotNull - @Valid - public List getRealizingService() { - return realizingService; - } - - public void setRealizingService(List realizingService) { - this.realizingService = realizingService; - } - - public ProductRefOrValue relatedParty(List relatedParty) { - this.relatedParty = relatedParty; - return this; - } - - public ProductRefOrValue addRelatedPartyItem(RelatedParty relatedPartyItem) { - if (this.relatedParty == null) { - this.relatedParty = new ArrayList(); - } - this.relatedParty.add(relatedPartyItem); - return this; - } - - /** - * Get relatedParty - * @return relatedParty - **/ - @Schema(description = "") - @NotNull - @Valid - public List getRelatedParty() { - return relatedParty; - } - - public void setRelatedParty(List relatedParty) { - this.relatedParty = relatedParty; - } - - public ProductRefOrValue status(ProductStatusType status) { - this.status = status; - return this; - } - - /** - * Get status - * @return status - **/ - @Schema(description = "") - @NotNull - - @Valid - public ProductStatusType getStatus() { - return status; - } - - public void setStatus(ProductStatusType status) { - this.status = status; - } - - public ProductRefOrValue _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 ProductRefOrValue _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 ProductRefOrValue _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; - } - - 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.") - @NotNull - - 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; - } - 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._atBaseType, productRefOrValue._atBaseType) && - Objects.equals(this._atSchemaLocation, productRefOrValue._atSchemaLocation) && - Objects.equals(this._atType, productRefOrValue._atType) && - Objects.equals(this._atReferredType, productRefOrValue._atReferredType); - } - - @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, _atBaseType, _atSchemaLocation, _atType, _atReferredType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ProductRefOrValue {\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"); - 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(" _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/pim637/model/ProductRelationship.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRelationship.java index e0da3df..331b8fb 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRelationship.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductRelationship.java @@ -2,8 +2,14 @@ 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; @@ -14,22 +20,16 @@ import jakarta.validation.constraints.NotNull; @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 ProductRelationship { +@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 _atBaseType = null; - - @JsonProperty("@schemaLocation") - private String _atSchemaLocation = null; - - @JsonProperty("@type") - private String _atType = null; public ProductRelationship relationshipType(String relationshipType) { this.relationshipType = relationshipType; @@ -72,65 +72,7 @@ public class ProductRelationship { this.product = product; } - public ProductRelationship _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 ProductRelationship _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 ProductRelationship _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 @@ -144,14 +86,14 @@ public class ProductRelationship { ProductRelationship productRelationship = (ProductRelationship) o; return Objects.equals(this.relationshipType, productRelationship.relationshipType) && Objects.equals(this.product, productRelationship.product) && - Objects.equals(this._atBaseType, productRelationship._atBaseType) && - Objects.equals(this._atSchemaLocation, productRelationship._atSchemaLocation) && - Objects.equals(this._atType, productRelationship._atType); + Objects.equals(this.baseType, productRelationship.baseType) && + Objects.equals(this.schemaLocation, productRelationship.schemaLocation) && + Objects.equals(this.type, productRelationship.type); } @Override public int hashCode() { - return Objects.hash(relationshipType, product, _atBaseType, _atSchemaLocation, _atType); + return Objects.hash(relationshipType, product, baseType, schemaLocation, type); } @Override @@ -161,9 +103,9 @@ public class ProductRelationship { sb.append(" relationshipType: ").append(toIndentedString(relationshipType)).append("\n"); sb.append(" product: ").append(toIndentedString(product)).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(" _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/ProductTerm.java b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductTerm.java index be680b1..4207102 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/ProductTerm.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/ProductTerm.java @@ -2,10 +2,12 @@ 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; /** @@ -15,13 +17,11 @@ import jakarta.validation.constraints.NotNull; @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 ProductTerm { +@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; @@ -29,15 +29,6 @@ public class ProductTerm { @JsonProperty("validFor") private TimePeriod validFor = null; - @JsonProperty("@baseType") - private String _atBaseType = null; - - @JsonProperty("@schemaLocation") - private String _atSchemaLocation = null; - - @JsonProperty("@type") - private String _atType = null; - public ProductTerm description(String description) { this.description = description; return this; @@ -120,65 +111,7 @@ public class ProductTerm { this.validFor = validFor; } - public ProductTerm _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 ProductTerm _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 ProductTerm _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 @@ -194,14 +127,14 @@ public class ProductTerm { Objects.equals(this.name, productTerm.name) && Objects.equals(this.duration, productTerm.duration) && Objects.equals(this.validFor, productTerm.validFor) && - Objects.equals(this._atBaseType, productTerm._atBaseType) && - Objects.equals(this._atSchemaLocation, productTerm._atSchemaLocation) && - Objects.equals(this._atType, productTerm._atType); + Objects.equals(this.baseType, productTerm.baseType) && + Objects.equals(this.schemaLocation, productTerm.schemaLocation) && + Objects.equals(this.type, productTerm.type); } @Override public int hashCode() { - return Objects.hash(description, name, duration, validFor, _atBaseType, _atSchemaLocation, _atType); + return Objects.hash(description, name, duration, validFor, baseType, schemaLocation, type); } @Override @@ -213,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(" _atBaseType: ").append(toIndentedString(_atBaseType)).append("\n"); - sb.append(" _atSchemaLocation: ").append(toIndentedString(_atSchemaLocation)).append("\n"); - sb.append(" _atType: ").append(toIndentedString(_atType)).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/RelatedPlaceRefOrValue.java b/src/main/java/org/etsi/osl/tmf/pim637/model/RelatedPlaceRefOrValue.java index 7aebfcb..ccdae25 100644 --- a/src/main/java/org/etsi/osl/tmf/pim637/model/RelatedPlaceRefOrValue.java +++ b/src/main/java/org/etsi/osl/tmf/pim637/model/RelatedPlaceRefOrValue.java @@ -2,8 +2,10 @@ 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; /** @@ -13,29 +15,15 @@ import jakarta.validation.constraints.NotNull; @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 RelatedPlaceRefOrValue { +@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 _atBaseType = null; - - @JsonProperty("@schemaLocation") - private String _atSchemaLocation = null; - - @JsonProperty("@type") - private String _atType = null; - @JsonProperty("@referredType") private String _atReferredType = null; @@ -119,70 +107,7 @@ public class RelatedPlaceRefOrValue { this.role = role; } - public RelatedPlaceRefOrValue _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 RelatedPlaceRefOrValue _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 RelatedPlaceRefOrValue _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; - } - - public RelatedPlaceRefOrValue _atReferredType(String _atReferredType) { - this._atReferredType = _atReferredType; - return this; - } + /** * The actual type of the target instance when needed for disambiguation. @@ -213,15 +138,15 @@ public class RelatedPlaceRefOrValue { Objects.equals(this.href, relatedPlaceRefOrValue.href) && Objects.equals(this.name, relatedPlaceRefOrValue.name) && Objects.equals(this.role, relatedPlaceRefOrValue.role) && - Objects.equals(this._atBaseType, relatedPlaceRefOrValue._atBaseType) && - Objects.equals(this._atSchemaLocation, relatedPlaceRefOrValue._atSchemaLocation) && - Objects.equals(this._atType, relatedPlaceRefOrValue._atType) && + Objects.equals(this.baseType, relatedPlaceRefOrValue.baseType) && + Objects.equals(this.schemaLocation, relatedPlaceRefOrValue.schemaLocation) && + Objects.equals(this.type, relatedPlaceRefOrValue.type) && Objects.equals(this._atReferredType, relatedPlaceRefOrValue._atReferredType); } @Override public int hashCode() { - return Objects.hash(id, href, name, role, _atBaseType, _atSchemaLocation, _atType, _atReferredType); + return Objects.hash(id, href, name, role, baseType, schemaLocation, type, _atReferredType); } @Override @@ -233,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(" _atBaseType: ").append(toIndentedString(_atBaseType)).append("\n"); - sb.append(" _atSchemaLocation: ").append(toIndentedString(_atSchemaLocation)).append("\n"); - sb.append(" _atType: ").append(toIndentedString(_atType)).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/po622/model/AgreementItemRef.java b/src/main/java/org/etsi/osl/tmf/po622/model/AgreementItemRef.java index 27a09bb..f4c8d6a 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 @@ -21,8 +21,10 @@ 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; /** @@ -31,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; @@ -76,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/ProductOrderAttributeValueChangeEvent.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderAttributeValueChangeEvent.java index b0c7a8e..f2fe095 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 @@ -271,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/ProductOrderAttributeValueChangeNotification.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderAttributeValueChangeNotification.java new file mode 100644 index 0000000..1f240a1 --- /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/ProductOrderCreateEvent.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreateEvent.java index 1e519b2..f49750d 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 @@ -293,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/ProductOrderCreateNotification.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderCreateNotification.java new file mode 100644 index 0000000..29d4522 --- /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 c434043..e4f4d29 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 @@ -293,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/ProductOrderDeleteNotification.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderDeleteNotification.java new file mode 100644 index 0000000..a88c4b5 --- /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/ProductOrderItem.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderItem.java index 5278912..a9042a2 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 @@ -88,7 +88,7 @@ public class ProductOrderItem extends BaseRootEntity { @JsonProperty("product") @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name = "prod_refuuid", referencedColumnName = "uuid") - private ProductRef product = null; + private ProductRefOrValue product = null; @JsonProperty("productOffering") @OneToOne(cascade = CascadeType.ALL) @@ -124,11 +124,6 @@ public class ProductOrderItem extends BaseRootEntity { private ProductOrderItemStateType state = ProductOrderItemStateType.INITIAL; - public ProductOrderItem id(String id) { - this.id = id; - return this; - } - /** * Identifier of the line item (generally it is a sequence number 01, 02, 03, ...) * @return id @@ -329,7 +324,7 @@ public class ProductOrderItem extends BaseRootEntity { this.payment = payment; } - public ProductOrderItem product(ProductRef product) { + public ProductOrderItem product(ProductRefOrValue product) { this.product = product; return this; } @@ -341,11 +336,11 @@ public class ProductOrderItem extends BaseRootEntity { @Schema(description = "") @Valid - public ProductRef getProduct() { + public ProductRefOrValue getProduct() { return product; } - public void setProduct(ProductRef product) { + public void setProduct(ProductRefOrValue product) { this.product = product; } @@ -395,9 +390,6 @@ public class ProductOrderItem extends BaseRootEntity { } public ProductOrderItem addProductOrderItemItem(ProductOrderItem productOrderItemItem) { - if (this.productOrderItem == null) { - this.productOrderItem = new HashSet<>(); - } this.productOrderItem.add(productOrderItemItem); return this; } 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 index 1271c87..f6c7a41 100644 --- a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderMapper.java +++ b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderMapper.java @@ -2,8 +2,13 @@ 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; @@ -12,79 +17,139 @@ import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.NullValueMappingStrategy; import org.mapstruct.NullValuePropertyMappingStrategy; -@Mapper( - nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT, - nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS ) +@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 updateProductOrderItem( ProductOrder so, ProductOrderUpdate updateEntity ){ - if ( updateEntity.getProductOrderItem() != null ) { - for (ProductOrderItem soiUpd : updateEntity.getProductOrderItem()) { - ProductOrderItem soiOrigin = so.findOrderItemById( soiUpd.getId() ); - if (soiOrigin!=null) { - //updateOrderItem(soiOrigin, soiUpd); - if ( soiUpd.getAction()!=null) { - soiOrigin.setAction( soiUpd.getAction() ); - } - /** - * 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 ); - - - } - - } + + @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 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 Set updateNote( ProductOrder so, ProductOrderUpdate updateEntity ){ - if (updateEntity.getNote() != null) { - for (Note n : updateEntity.getNote()) { - if (n.getUuid() == null) { - so.addNoteItem(n); + } + 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 so.getNote(); } - - default Set updateRelatedParty( ProductOrder so, ProductOrderUpdate updateEntity ){ - if (updateEntity.getRelatedParty() != null) { - for (RelatedParty n : updateEntity.getRelatedParty()) { - if (n.getUuid() == null) { - so.addRelatedPartyItem(n); - } + return soiOrigin; + } + + + + default Set updateNote(ProductOrder so, ProductOrderUpdate updateEntity) { + if (updateEntity.getNote() != null) { + for (Note n : updateEntity.getNote()) { + if (n.getUuid() == null) { + so.addNoteItem(n); } } - return so.getRelatedParty(); + } - + return so.getNote(); + } + + default Set 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/ProductOrderStateChangeEvent.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateChangeEvent.java index 68f304d..00b751a 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 @@ -293,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/ProductOrderStateChangeNotification.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderStateChangeNotification.java new file mode 100644 index 0000000..4fb2115 --- /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/RelatedProductOrderItem.java b/src/main/java/org/etsi/osl/tmf/po622/model/RelatedProductOrderItem.java index a265d9c..11efb01 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 @@ -21,8 +21,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.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; /** @@ -31,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; @@ -47,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; -- GitLab From 9119c71fe1a0ef26c1f23c57690ab14aa6fb103a Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Fri, 9 Aug 2024 17:26:44 +0300 Subject: [PATCH 5/9] adding metod to create prod offering from service spec --- .../org/etsi/osl/tmf/pcm620/model/ProductOffering.java | 9 +++++++++ .../osl/tmf/pcm620/model/ProductSpecification.java | 10 ++++++++++ 2 files changed, 19 insertions(+) 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 c05bc86..8abd617 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 @@ -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/ProductSpecification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecification.java index 3e09446..9260c44 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; + } } -- GitLab From 77eba44c621a36b7df761914694df636fc5cd804 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Sat, 17 Aug 2024 01:07:59 +0300 Subject: [PATCH 6/9] update model --- .../tmf/po622/model/ProductOrderCreate.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) 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 5098d22..fbd3f63 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 @@ -117,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; @@ -660,6 +664,27 @@ public class ProductOrderCreate { 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; -- GitLab From 6befe8536e9b70c558340ffa449e340f6e430742 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Thu, 26 Sep 2024 17:18:39 +0300 Subject: [PATCH 7/9] minor change --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index c899707..705e1fd 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. -- GitLab From 76f186c468d52810b7f4b2f4a7c7dcdce2599da0 Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Thu, 26 Sep 2024 17:19:21 +0300 Subject: [PATCH 8/9] minor --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 705e1fd..53bcdba 100644 --- a/README.md +++ b/README.md @@ -42,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. -- GitLab From 4dedc0fa32d24d21bba98e5abd081af88e3e576d Mon Sep 17 00:00:00 2001 From: Christos Tranoris Date: Wed, 27 Nov 2024 17:09:12 +0200 Subject: [PATCH 9/9] fix pom --- pom.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0345fa4..3f39a7a 100644 --- a/pom.xml +++ b/pom.xml @@ -20,8 +20,6 @@ 1.5.3.Final - ${org.etsi.osl.model.tmf.version} - -- GitLab