diff --git a/pom.xml b/pom.xml index 411f2cd7eaeab35fd74117c83a0cec1e812fd333..38a0b20c6b08d53a50dd7e70dc526c583ac60d2c 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.etsi.osl org.etsi.osl.main - 2025Q2 + 2025Q4 ../org.etsi.osl.main diff --git a/src/main/java/org/etsi/osl/tmf/common/model/ERangeInterval.java b/src/main/java/org/etsi/osl/tmf/common/model/ERangeInterval.java new file mode 100644 index 0000000000000000000000000000000000000000..f4c224c842ba62e447db201d60b29b54decbb17b --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/common/model/ERangeInterval.java @@ -0,0 +1,27 @@ +package org.etsi.osl.tmf.common.model; + +public enum ERangeInterval { + OPEN("open"), + CLOSED("closed"), + CLOSED_BOTTOM("closedBottom"), + CLOSED_TOP("closedTop"); + + private String value; + + ERangeInterval(String value) {this.value = value;} + + public String getValue() { + return value; + } + + @Override + public String toString() { + return this.getValue(); + } + + public static ERangeInterval getEnum(String value) { + for(ERangeInterval v : values()) + if(v.getValue().equalsIgnoreCase(value)) return v; + throw new IllegalArgumentException(); + } +} diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/CatalogCreateNotification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/CatalogCreateNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..a8f449a42e21799bab873784a1da4483292b7880 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/CatalogCreateNotification.java @@ -0,0 +1,97 @@ +/*- + * ========================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.pcm620.model; + +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * The notification data structure for catalog create events + */ +@Schema(description = "The notification data structure for catalog create events") +@Validated +public class CatalogCreateNotification extends Notification { + + @JsonProperty("event") + private CatalogCreateEvent event = null; + + public CatalogCreateNotification event(CatalogCreateEvent event) { + this.event = event; + return this; + } + + /** + * The event data structure + * @return event + **/ + @Schema(description = "The event data structure") + @Valid + public CatalogCreateEvent getEvent() { + return event; + } + + public void setEvent(CatalogCreateEvent 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; + } + CatalogCreateNotification catalogCreateNotification = (CatalogCreateNotification) o; + return Objects.equals(this.event, catalogCreateNotification.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatalogCreateNotification {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/CatalogDeleteNotification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/CatalogDeleteNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..9236021bc66cae3d5a1e592efe0cf75507f54d93 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/CatalogDeleteNotification.java @@ -0,0 +1,97 @@ +/*- + * ========================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.pcm620.model; + +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * The notification data structure for catalog delete events + */ +@Schema(description = "The notification data structure for catalog delete events") +@Validated +public class CatalogDeleteNotification extends Notification { + + @JsonProperty("event") + private CatalogDeleteEvent event = null; + + public CatalogDeleteNotification event(CatalogDeleteEvent event) { + this.event = event; + return this; + } + + /** + * The event data structure + * @return event + **/ + @Schema(description = "The event data structure") + @Valid + public CatalogDeleteEvent getEvent() { + return event; + } + + public void setEvent(CatalogDeleteEvent 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; + } + CatalogDeleteNotification catalogDeleteNotification = (CatalogDeleteNotification) o; + return Objects.equals(this.event, catalogDeleteNotification.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatalogDeleteNotification {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/CategoryCreateNotification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/CategoryCreateNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..52a9b4278867c7a122aed470867adc1c3323f041 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/CategoryCreateNotification.java @@ -0,0 +1,97 @@ +/*- + * ========================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.pcm620.model; + +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * The notification data structure for category create events + */ +@Schema(description = "The notification data structure for category create events") +@Validated +public class CategoryCreateNotification extends Notification { + + @JsonProperty("event") + private CategoryCreateEvent event = null; + + public CategoryCreateNotification event(CategoryCreateEvent event) { + this.event = event; + return this; + } + + /** + * The event data structure + * @return event + **/ + @Schema(description = "The event data structure") + @Valid + public CategoryCreateEvent getEvent() { + return event; + } + + public void setEvent(CategoryCreateEvent 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; + } + CategoryCreateNotification categoryCreateNotification = (CategoryCreateNotification) o; + return Objects.equals(this.event, categoryCreateNotification.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CategoryCreateNotification {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/CategoryDeleteNotification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/CategoryDeleteNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..49bbde32f90cc0ea5035486f6269b9acc88949c0 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/CategoryDeleteNotification.java @@ -0,0 +1,97 @@ +/*- + * ========================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.pcm620.model; + +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * The notification data structure for category delete events + */ +@Schema(description = "The notification data structure for category delete events") +@Validated +public class CategoryDeleteNotification extends Notification { + + @JsonProperty("event") + private CategoryDeleteEvent event = null; + + public CategoryDeleteNotification event(CategoryDeleteEvent event) { + this.event = event; + return this; + } + + /** + * The event data structure + * @return event + **/ + @Schema(description = "The event data structure") + @Valid + public CategoryDeleteEvent getEvent() { + return event; + } + + public void setEvent(CategoryDeleteEvent 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; + } + CategoryDeleteNotification categoryDeleteNotification = (CategoryDeleteNotification) o; + return Objects.equals(this.event, categoryDeleteNotification.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CategoryDeleteNotification {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/EventSubscription.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/EventSubscription.java index aa61f7bc446d9b3ba90763ee9113300b215fdd02..6896d411c87f465f7ca0697eb7441ff1c881edf8 100644 --- a/src/main/java/org/etsi/osl/tmf/pcm620/model/EventSubscription.java +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/EventSubscription.java @@ -26,6 +26,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import jakarta.validation.constraints.NotNull; /** @@ -35,7 +40,12 @@ import jakarta.validation.constraints.NotNull; @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-10-19T00:15:57.249+03:00") +@Entity(name = "ProductEventSubscription") +@Table(name = "ProductEventSubscription") public class EventSubscription { + + @Id + @GeneratedValue(strategy = GenerationType.UUID) @JsonProperty("id") private String id = null; diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingAttributeValueChangeNotification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingAttributeValueChangeNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..2fc65858ab35a66f7cb794a4b19675534e15166f --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingAttributeValueChangeNotification.java @@ -0,0 +1,97 @@ +/*- + * ========================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.pcm620.model; + +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * The notification data structure for product offering attribute value change events + */ +@Schema(description = "The notification data structure for product offering attribute value change events") +@Validated +public class ProductOfferingAttributeValueChangeNotification extends Notification { + + @JsonProperty("event") + private ProductOfferingAttributeValueChangeEvent event = null; + + public ProductOfferingAttributeValueChangeNotification event(ProductOfferingAttributeValueChangeEvent event) { + this.event = event; + return this; + } + + /** + * The event data structure + * @return event + **/ + @Schema(description = "The event data structure") + @Valid + public ProductOfferingAttributeValueChangeEvent getEvent() { + return event; + } + + public void setEvent(ProductOfferingAttributeValueChangeEvent 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; + } + ProductOfferingAttributeValueChangeNotification productOfferingAttributeValueChangeNotification = (ProductOfferingAttributeValueChangeNotification) o; + return Objects.equals(this.event, productOfferingAttributeValueChangeNotification.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductOfferingAttributeValueChangeNotification {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingCreateNotification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingCreateNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..e3b2572dd88887bb213c27da3d7d3121f2f0b34a --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingCreateNotification.java @@ -0,0 +1,97 @@ +/*- + * ========================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.pcm620.model; + +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * The notification data structure for product offering create events + */ +@Schema(description = "The notification data structure for product offering create events") +@Validated +public class ProductOfferingCreateNotification extends Notification { + + @JsonProperty("event") + private ProductOfferingCreateEvent event = null; + + public ProductOfferingCreateNotification event(ProductOfferingCreateEvent event) { + this.event = event; + return this; + } + + /** + * The event data structure + * @return event + **/ + @Schema(description = "The event data structure") + @Valid + public ProductOfferingCreateEvent getEvent() { + return event; + } + + public void setEvent(ProductOfferingCreateEvent 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; + } + ProductOfferingCreateNotification productOfferingCreateNotification = (ProductOfferingCreateNotification) o; + return Objects.equals(this.event, productOfferingCreateNotification.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductOfferingCreateNotification {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingDeleteNotification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingDeleteNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..2c94885c838eddff9ea95c5718cca2dc00360c36 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingDeleteNotification.java @@ -0,0 +1,97 @@ +/*- + * ========================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.pcm620.model; + +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * The notification data structure for product offering delete events + */ +@Schema(description = "The notification data structure for product offering delete events") +@Validated +public class ProductOfferingDeleteNotification extends Notification { + + @JsonProperty("event") + private ProductOfferingDeleteEvent event = null; + + public ProductOfferingDeleteNotification event(ProductOfferingDeleteEvent event) { + this.event = event; + return this; + } + + /** + * The event data structure + * @return event + **/ + @Schema(description = "The event data structure") + @Valid + public ProductOfferingDeleteEvent getEvent() { + return event; + } + + public void setEvent(ProductOfferingDeleteEvent 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; + } + ProductOfferingDeleteNotification productOfferingDeleteNotification = (ProductOfferingDeleteNotification) o; + return Objects.equals(this.event, productOfferingDeleteNotification.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductOfferingDeleteNotification {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingPriceAttributeValueChangeNotification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingPriceAttributeValueChangeNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..541356da885d79c66771e2b21b0d931bc250513b --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingPriceAttributeValueChangeNotification.java @@ -0,0 +1,97 @@ +/*- + * ========================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.pcm620.model; + +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * The notification data structure for product offering price attribute value change events + */ +@Schema(description = "The notification data structure for product offering price attribute value change events") +@Validated +public class ProductOfferingPriceAttributeValueChangeNotification extends Notification { + + @JsonProperty("event") + private ProductOfferingPriceAttributeValueChangeEvent event = null; + + public ProductOfferingPriceAttributeValueChangeNotification event(ProductOfferingPriceAttributeValueChangeEvent event) { + this.event = event; + return this; + } + + /** + * The event data structure + * @return event + **/ + @Schema(description = "The event data structure") + @Valid + public ProductOfferingPriceAttributeValueChangeEvent getEvent() { + return event; + } + + public void setEvent(ProductOfferingPriceAttributeValueChangeEvent 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; + } + ProductOfferingPriceAttributeValueChangeNotification productOfferingPriceAttributeValueChangeNotification = (ProductOfferingPriceAttributeValueChangeNotification) o; + return Objects.equals(this.event, productOfferingPriceAttributeValueChangeNotification.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductOfferingPriceAttributeValueChangeNotification {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingPriceCreateNotification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingPriceCreateNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..38d652590b50644ec0359fab977d2b29a9a604e7 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingPriceCreateNotification.java @@ -0,0 +1,97 @@ +/*- + * ========================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.pcm620.model; + +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * The notification data structure for product offering price create events + */ +@Schema(description = "The notification data structure for product offering price create events") +@Validated +public class ProductOfferingPriceCreateNotification extends Notification { + + @JsonProperty("event") + private ProductOfferingPriceCreateEvent event = null; + + public ProductOfferingPriceCreateNotification event(ProductOfferingPriceCreateEvent event) { + this.event = event; + return this; + } + + /** + * The event data structure + * @return event + **/ + @Schema(description = "The event data structure") + @Valid + public ProductOfferingPriceCreateEvent getEvent() { + return event; + } + + public void setEvent(ProductOfferingPriceCreateEvent 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; + } + ProductOfferingPriceCreateNotification productOfferingPriceCreateNotification = (ProductOfferingPriceCreateNotification) o; + return Objects.equals(this.event, productOfferingPriceCreateNotification.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductOfferingPriceCreateNotification {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingPriceDeleteNotification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingPriceDeleteNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..5ca808a4269161596fb840f0541c32a49cde783c --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingPriceDeleteNotification.java @@ -0,0 +1,97 @@ +/*- + * ========================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.pcm620.model; + +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * The notification data structure for product offering price delete events + */ +@Schema(description = "The notification data structure for product offering price delete events") +@Validated +public class ProductOfferingPriceDeleteNotification extends Notification { + + @JsonProperty("event") + private ProductOfferingPriceDeleteEvent event = null; + + public ProductOfferingPriceDeleteNotification event(ProductOfferingPriceDeleteEvent event) { + this.event = event; + return this; + } + + /** + * The event data structure + * @return event + **/ + @Schema(description = "The event data structure") + @Valid + public ProductOfferingPriceDeleteEvent getEvent() { + return event; + } + + public void setEvent(ProductOfferingPriceDeleteEvent 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; + } + ProductOfferingPriceDeleteNotification productOfferingPriceDeleteNotification = (ProductOfferingPriceDeleteNotification) o; + return Objects.equals(this.event, productOfferingPriceDeleteNotification.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductOfferingPriceDeleteNotification {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingPriceStateChangeNotification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingPriceStateChangeNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..1945cb61d7656493a53aa038a06ac7aa203a2f0b --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingPriceStateChangeNotification.java @@ -0,0 +1,97 @@ +/*- + * ========================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.pcm620.model; + +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * The notification data structure for product offering price state change events + */ +@Schema(description = "The notification data structure for product offering price state change events") +@Validated +public class ProductOfferingPriceStateChangeNotification extends Notification { + + @JsonProperty("event") + private ProductOfferingPriceStateChangeEvent event = null; + + public ProductOfferingPriceStateChangeNotification event(ProductOfferingPriceStateChangeEvent event) { + this.event = event; + return this; + } + + /** + * The event data structure + * @return event + **/ + @Schema(description = "The event data structure") + @Valid + public ProductOfferingPriceStateChangeEvent getEvent() { + return event; + } + + public void setEvent(ProductOfferingPriceStateChangeEvent 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; + } + ProductOfferingPriceStateChangeNotification productOfferingPriceStateChangeNotification = (ProductOfferingPriceStateChangeNotification) o; + return Objects.equals(this.event, productOfferingPriceStateChangeNotification.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductOfferingPriceStateChangeNotification {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingStateChangeNotification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingStateChangeNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..7044acb646ab7e70eca1a6cff5662671919a07a8 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductOfferingStateChangeNotification.java @@ -0,0 +1,97 @@ +/*- + * ========================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.pcm620.model; + +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * The notification data structure for product offering state change events + */ +@Schema(description = "The notification data structure for product offering state change events") +@Validated +public class ProductOfferingStateChangeNotification extends Notification { + + @JsonProperty("event") + private ProductOfferingStateChangeEvent event = null; + + public ProductOfferingStateChangeNotification event(ProductOfferingStateChangeEvent event) { + this.event = event; + return this; + } + + /** + * The event data structure + * @return event + **/ + @Schema(description = "The event data structure") + @Valid + public ProductOfferingStateChangeEvent getEvent() { + return event; + } + + public void setEvent(ProductOfferingStateChangeEvent 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; + } + ProductOfferingStateChangeNotification productOfferingStateChangeNotification = (ProductOfferingStateChangeNotification) o; + return Objects.equals(this.event, productOfferingStateChangeNotification.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductOfferingStateChangeNotification {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecificationCharacteristic.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecificationCharacteristic.java index 9f5f3bd18d8f31ff88b90f92bf26e4aa937df72b..0d8fdf6e1ce4704f3b97d98fc3c8d36ef48336cb 100644 --- a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecificationCharacteristic.java +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecificationCharacteristic.java @@ -19,12 +19,18 @@ */ package org.etsi.osl.tmf.pcm620.model; +import java.util.ArrayList; +import java.util.HashMap; import java.util.HashSet; +import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Set; import com.fasterxml.jackson.annotation.JsonProperty; import org.etsi.osl.tmf.common.model.BaseEntity; +import org.etsi.osl.tmf.scm633.model.ServiceSpecCharRelationship; +import org.etsi.osl.tmf.scm633.model.ServiceSpecCharacteristicValue; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.persistence.CascadeType; @@ -379,4 +385,113 @@ public class ProductSpecificationCharacteristic extends BaseEntity { } return o.toString().replace("\n", "\n "); } + + public void updateWith(ProductSpecificationCharacteristic src) { + this.name = src.getName(); + this.description = src.getDescription(); + this.maxCardinality = src.getMaxCardinality(); + this.minCardinality = src.getMinCardinality(); + this.regex = src.getRegex(); + this.isUnique =src.isUnique; + this.configurable =src.isConfigurable(); + this.extensible =src.isExtensible(); + this.valueType =src.valueType; + + this.updateProductSpecCharacteristicValues(src.getProductSpecCharacteristicValue()); + this.updateProductSpecCharRelationships(src.getProductSpecCharRelationship()); + + } + + + private void updateProductSpecCharacteristicValues( + @Valid Set srcSet) { + if ( srcSet == null ) { + return; + } + + Map idAddedUpdated = new HashMap<>(); + /** + * update, add the incomings + */ + for (ProductSpecificationCharacteristicValue r : srcSet) { + + boolean valueExists = false; + for (ProductSpecificationCharacteristicValue thisCharVal : this.productSpecCharacteristicValue) { + if ( thisCharVal.hashCode() == r.hashCode() ) { + valueExists = true; + idAddedUpdated.put(thisCharVal.hashCode(), true); + break; + } + } + + if (!valueExists) { + ProductSpecificationCharacteristicValue nr = new ProductSpecificationCharacteristicValue( r ); + this.addProductSpecCharacteristicValueItem( nr ); + idAddedUpdated.put( nr.hashCode(), true); + } + + } + + /** + * remove those that don't exist anymore + */ + + List toRemove = new ArrayList<>(); + for (ProductSpecificationCharacteristicValue ss : this.productSpecCharacteristicValue) { + if ( idAddedUpdated.get( ss.hashCode() ) == null ) { + toRemove.add(ss); + } + } + + for (ProductSpecificationCharacteristicValue r : toRemove) { + this.productSpecCharacteristicValue.remove(r); + } + + + } + + + private void updateProductSpecCharRelationships( + @Valid Set productSpecCharRelationship2) { + + + Map< String, Boolean> idAddedUpdated = new HashMap<>(); + /** + * update, add the incomings + */ + for (ProductSpecificationCharacteristicRelationship r : productSpecCharRelationship2) { + + boolean valueExists = false; + for (ProductSpecificationCharacteristicRelationship thisCharVal : this.productSpecCharRelationship) { + if ( (thisCharVal.getId()!=null) && (thisCharVal.getId().equals(r.getId() ) )) { + valueExists = true; + idAddedUpdated.put( thisCharVal.getId() , true); + break; + } + } + + if (!valueExists) { + this.productSpecCharRelationship.add( r.getNewProductSpecificationCharacteristicRelationship( r )); + idAddedUpdated.put( r.getId(), true); + } + + } + + /** + * remove those that don't exist anymore + */ + + List toRemove = new ArrayList<>(); + for (ProductSpecificationCharacteristicRelationship ss : this.productSpecCharRelationship) { + if ( idAddedUpdated.get( ss.getId() ) == null ) { + toRemove.add(ss); + } + } + + for (ProductSpecificationCharacteristicRelationship r : toRemove) { + this.productSpecCharRelationship.remove(r); + } + + } + } diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecificationCharacteristicRelationship.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecificationCharacteristicRelationship.java index a3408039d45aee5f1ce84e12b44944b84e94875b..eb76610d2412c342d52b4cfb7d3b7e9c0f73c646 100644 --- a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecificationCharacteristicRelationship.java +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecificationCharacteristicRelationship.java @@ -23,6 +23,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import org.etsi.osl.tmf.common.model.BaseEntity; +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; @@ -50,6 +51,18 @@ public class ProductSpecificationCharacteristicRelationship extends BaseEntity private String relationshipType = null; + + public ProductSpecificationCharacteristicRelationship getNewProductSpecificationCharacteristicRelationship( + ProductSpecificationCharacteristicRelationship src) { + ProductSpecificationCharacteristicRelationship newp = new ProductSpecificationCharacteristicRelationship(); + newp.name = src.name; + newp.relationshipType = src.relationshipType; + newp.validFor = new TimePeriod( src.validFor ); + newp.id = src.id; + + return newp; + } + public ProductSpecificationCharacteristicRelationship id(String id) { this.id = id; return this; diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecificationCreateNotification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecificationCreateNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..6da1a026465aab279ca62482d9db52218ca15572 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecificationCreateNotification.java @@ -0,0 +1,97 @@ +/*- + * ========================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.pcm620.model; + +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * The notification data structure for product specification create events + */ +@Schema(description = "The notification data structure for product specification create events") +@Validated +public class ProductSpecificationCreateNotification extends Notification { + + @JsonProperty("event") + private ProductSpecificationCreateEvent event = null; + + public ProductSpecificationCreateNotification event(ProductSpecificationCreateEvent event) { + this.event = event; + return this; + } + + /** + * The event data structure + * @return event + **/ + @Schema(description = "The event data structure") + @Valid + public ProductSpecificationCreateEvent getEvent() { + return event; + } + + public void setEvent(ProductSpecificationCreateEvent 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; + } + ProductSpecificationCreateNotification productSpecificationCreateNotification = (ProductSpecificationCreateNotification) o; + return Objects.equals(this.event, productSpecificationCreateNotification.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductSpecificationCreateNotification {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecificationDeleteNotification.java b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecificationDeleteNotification.java new file mode 100644 index 0000000000000000000000000000000000000000..ba9e0c4f3d0ac468a0b167a8bc6b180ce1b76df9 --- /dev/null +++ b/src/main/java/org/etsi/osl/tmf/pcm620/model/ProductSpecificationDeleteNotification.java @@ -0,0 +1,97 @@ +/*- + * ========================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.pcm620.model; + +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.etsi.osl.tmf.common.model.Notification; +import org.springframework.validation.annotation.Validated; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.Valid; + +/** + * The notification data structure for product specification delete events + */ +@Schema(description = "The notification data structure for product specification delete events") +@Validated +public class ProductSpecificationDeleteNotification extends Notification { + + @JsonProperty("event") + private ProductSpecificationDeleteEvent event = null; + + public ProductSpecificationDeleteNotification event(ProductSpecificationDeleteEvent event) { + this.event = event; + return this; + } + + /** + * The event data structure + * @return event + **/ + @Schema(description = "The event data structure") + @Valid + public ProductSpecificationDeleteEvent getEvent() { + return event; + } + + public void setEvent(ProductSpecificationDeleteEvent 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; + } + ProductSpecificationDeleteNotification productSpecificationDeleteNotification = (ProductSpecificationDeleteNotification) o; + return Objects.equals(this.event, productSpecificationDeleteNotification.event) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(event, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductSpecificationDeleteNotification {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" event: ").append(toIndentedString(event)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} \ No newline at end of file diff --git a/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderMapper.java b/src/main/java/org/etsi/osl/tmf/po622/model/ProductOrderMapper.java index f6c7a411c40d62fd3839d68c0405e3d9cce1f989..1a302000252354da7c5956bca6bc472cddb7b8ad 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 @@ -21,6 +21,7 @@ import org.mapstruct.NullValuePropertyMappingStrategy; nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) public interface ProductOrderMapper { + @Mapping(target = "orderDate", ignore = true) @Mapping(target = "uuid", ignore = true) @Mapping(target = "baseType", ignore = true) @Mapping(target = "href", ignore = true) diff --git a/src/main/java/org/etsi/osl/tmf/rcm634/model/ResourceCategory.java b/src/main/java/org/etsi/osl/tmf/rcm634/model/ResourceCategory.java index 1e345b46bb503d7540c0fd3c3a58cb5adf08d3b4..da92416ac32a59df1769e6d0c8dd6aa00397d306 100644 --- a/src/main/java/org/etsi/osl/tmf/rcm634/model/ResourceCategory.java +++ b/src/main/java/org/etsi/osl/tmf/rcm634/model/ResourceCategory.java @@ -257,9 +257,7 @@ public class ResourceCategory extends BaseEntity { && Objects.equals(this.lifecycleStatus, resourceCategory.lifecycleStatus) && Objects.equals(this.lastUpdate, resourceCategory.lastUpdate) && Objects.equals(this.parentId, resourceCategory.parentId) - && Objects.equals(this.isRoot, resourceCategory.isRoot) - && Objects.equals(this.getCategoryRefs(), resourceCategory.getCategoryRefs()) - && Objects.equals(this.getResourceCandidateRefs(), resourceCategory.getResourceCandidateRefs()); + && Objects.equals(this.isRoot, resourceCategory.isRoot); } // @Override diff --git a/src/main/java/org/etsi/osl/tmf/scm633/model/EventSubscription.java b/src/main/java/org/etsi/osl/tmf/scm633/model/EventSubscription.java index 80807b87e1b66eb1573a9076d840ee4e8c727545..216bb1d74e55238d90ad048a4b67ac7684ce78a3 100644 --- a/src/main/java/org/etsi/osl/tmf/scm633/model/EventSubscription.java +++ b/src/main/java/org/etsi/osl/tmf/scm633/model/EventSubscription.java @@ -26,6 +26,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import org.springframework.validation.annotation.Validated; import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import jakarta.validation.constraints.NotNull; /** @@ -35,7 +40,12 @@ import jakarta.validation.constraints.NotNull; @Validated @jakarta.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2019-04-29T19:18:54.771Z") +@Entity(name = "ServiceEventSubscription") +@Table(name = "ServiceEventSubscription") public class EventSubscription { + + @Id + @GeneratedValue(strategy = GenerationType.UUID) @JsonProperty("id") private String id = null;