aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamesh Murugan Iyer <ramesh.murugan.iyer@est.tech>2022-08-04 14:02:45 +0000
committerGerrit Code Review <gerrit@onap.org>2022-08-04 14:02:45 +0000
commitf2e946da931b722c93cac5d2227ec73b8759259c (patch)
treeb03513fa4669a755742b121390abaa66cd11cff2
parent98c4d50287a5e37266dd68567e26b290083614c7 (diff)
parentcbc13a90060421059c0c2ae2f5d6f5ddcc406d8f (diff)
Merge "Create concepts models for the test microservice"
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/element/ElementMessage.java46
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/DmaapConfig.java37
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/ElementConfig.java36
-rw-r--r--models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/ElementType.java26
4 files changed, 145 insertions, 0 deletions
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/element/ElementMessage.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/element/ElementMessage.java
new file mode 100644
index 000000000..2e73b2bd7
--- /dev/null
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/dmaap/element/ElementMessage.java
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.clamp.models.acm.messages.dmaap.element;
+
+import java.time.Instant;
+import java.util.UUID;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class ElementMessage {
+
+ private ToscaConceptIdentifier elementId;
+
+ private String message;
+
+ private UUID messageId = UUID.randomUUID();
+
+ /**
+ * Time-stamp, in milliseconds, when the message was created. Defaults to the
+ * current time.
+ */
+ private Instant timestamp = Instant.now();
+}
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/DmaapConfig.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/DmaapConfig.java
new file mode 100644
index 000000000..0d13bcda5
--- /dev/null
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/DmaapConfig.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.clamp.models.acm.messages.rest.element;
+
+import lombok.Data;
+
+@Data
+public class DmaapConfig {
+ private String server;
+
+ private String topic;
+
+ private Integer fetchTimeout;
+
+ private String topicCommInfrastructure;
+
+ private boolean useHttps;
+
+}
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/ElementConfig.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/ElementConfig.java
new file mode 100644
index 000000000..d1f064823
--- /dev/null
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/ElementConfig.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.clamp.models.acm.messages.rest.element;
+
+import lombok.Data;
+import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
+
+@Data
+public class ElementConfig {
+
+ private ToscaConceptIdentifier elementId;
+
+ private ElementType elementType;
+
+ private Integer timerSec;
+
+ private DmaapConfig topicParameterGroup;
+}
diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/ElementType.java b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/ElementType.java
new file mode 100644
index 000000000..4bc08a36e
--- /dev/null
+++ b/models/src/main/java/org/onap/policy/clamp/models/acm/messages/rest/element/ElementType.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2022 Nordix Foundation.
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.clamp.models.acm.messages.rest.element;
+
+public enum ElementType {
+
+ STARTER, BRIDGE, SINK
+}