2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2021 Nordix Foundation.
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 package org.onap.policy.clamp.controlloop.models.messages.dmaap.participant;
23 import java.util.UUID;
26 import lombok.ToString;
27 import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier;
30 * Class to represent participant Ack message.
35 public class ParticipantAckMessage {
37 // The responseTo field should match the original request id in the request.
38 private UUID responseTo;
40 // Result: Success/Fail.
41 private Boolean result;
43 // Message indicating reason for failure
44 private String message;
46 private ParticipantMessageType messageType;
49 * Participant Type, or {@code null} for messages from participants.
51 private ToscaConceptIdentifier participantType;
54 * Participant ID, or {@code null} for messages from participants.
56 private ToscaConceptIdentifier participantId;
59 * Constructor for instantiating a participant ack message class.
61 * @param messageType the message type
63 public ParticipantAckMessage(final ParticipantMessageType messageType) {
64 this.messageType = messageType;
68 * Constructs the object, making a deep copy.
70 * @param source source from which to copy
72 public ParticipantAckMessage(ParticipantAckMessage source) {
73 this.responseTo = source.responseTo;
74 this.result = source.result;
75 this.message = source.message;
76 this.messageType = source.messageType;
77 this.participantType = source.participantType;
78 this.participantId = source.participantId;