diff options
Diffstat (limited to 'models')
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 +} |