add SDC client and reception handle
[multicloud/framework.git] / artifactbroker / plugins / reception-plugins / src / main / java / org / onap / policy / distribution / reception / handling / sdc / ComponentDoneStatusMessageBuilder.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2018 Ericsson. All rights reserved.
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
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  *
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.distribution.reception.handling.sdc;
22
23 import org.onap.sdc.utils.DistributionStatusEnum;
24
25 /**
26  * This class builds an instance of {@link ComponentDoneStatusMessage} class.
27  *
28  * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
29  */
30 public class ComponentDoneStatusMessageBuilder {
31
32     private String consumerId;
33     private String distributionId;
34     private DistributionStatusEnum distributionStatus;
35     private long timestamp;
36
37     /**
38      * Returns consumer id of this {@link ComponentDoneStatusMessageBuilder} instance.
39      *
40      * @return the consumerId
41      */
42     public String getConsumerId() {
43         return consumerId;
44     }
45
46     /**
47      * Returns distribution id of this {@link ComponentDoneStatusMessageBuilder} instance.
48      *
49      * @return the distributionId
50      */
51     public String getDistributionId() {
52         return distributionId;
53     }
54
55     /**
56      * Returns distribution status of this {@link ComponentDoneStatusMessageBuilder} instance.
57      *
58      * @return the distributionStatus
59      */
60     public DistributionStatusEnum getDistributionStatus() {
61         return distributionStatus;
62     }
63
64     /**
65      * Returns time of this {@link ComponentDoneStatusMessageBuilder} instance.
66      *
67      * @return the timestamp
68      */
69     public long getTimestamp() {
70         return timestamp;
71     }
72
73     /**
74      * Set consumer id url to this {@link ComponentDoneStatusMessageBuilder} instance.
75      *
76      * @param consumerId the consumerId to set
77      */
78     public ComponentDoneStatusMessageBuilder setConsumerId(final String consumerId) {
79         this.consumerId = consumerId;
80         return this;
81     }
82
83     /**
84      * Set distribution id to this {@link ComponentDoneStatusMessageBuilder} instance.
85      *
86      * @param distributionId the distributionId to set
87      */
88     public ComponentDoneStatusMessageBuilder setDistributionId(final String distributionId) {
89         this.distributionId = distributionId;
90         return this;
91     }
92
93     /**
94      * Set distribution status to this {@link ComponentDoneStatusMessageBuilder} instance.
95      *
96      * @param distributionStatus the distributionStatus to set
97      */
98     public ComponentDoneStatusMessageBuilder setDistributionStatus(final DistributionStatusEnum distributionStatus) {
99         this.distributionStatus = distributionStatus;
100         return this;
101     }
102
103     /**
104      * Set time to this {@link ComponentDoneStatusMessageBuilder} instance.
105      *
106      * @param timestamp the timestamp to set
107      */
108     public ComponentDoneStatusMessageBuilder setTimestamp(final long timestamp) {
109         this.timestamp = timestamp;
110         return this;
111     }
112 }