add SDC client and reception handle
[multicloud/framework.git] / artifactbroker / plugins / reception-plugins / src / main / java / org / onap / policy / distribution / reception / handling / sdc / DistributionStatusMessageBuilder.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 DistributionStatusMessage} class.
27  *
28  * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com)
29  */
30 public class DistributionStatusMessageBuilder {
31
32     private String artifactUrl;
33     private String consumerId;
34     private String distributionId;
35     private DistributionStatusEnum distributionStatus;
36     private long timestamp;
37
38     /**
39      * Returns artifact url of this {@link DistributionStatusMessageBuilder} instance.
40      *
41      * @return the artifactUrl
42      */
43     public String getArtifactUrl() {
44         return artifactUrl;
45     }
46
47     /**
48      * Returns consumer id of this {@link DistributionStatusMessageBuilder} instance.
49      *
50      * @return the consumerId
51      */
52     public String getConsumerId() {
53         return consumerId;
54     }
55
56     /**
57      * Returns distribution id of this {@link DistributionStatusMessageBuilder} instance.
58      *
59      * @return the distributionId
60      */
61     public String getDistributionId() {
62         return distributionId;
63     }
64
65     /**
66      * Returns distribution status of this {@link DistributionStatusMessageBuilder} instance.
67      *
68      * @return the distributionStatus
69      */
70     public DistributionStatusEnum getDistributionStatus() {
71         return distributionStatus;
72     }
73
74     /**
75      * Returns time of this {@link DistributionStatusMessageBuilder} instance.
76      *
77      * @return the timestamp
78      */
79     public long getTimestamp() {
80         return timestamp;
81     }
82
83     /**
84      * Set artifact url to this {@link DistributionStatusMessageBuilder} instance.
85      *
86      * @param artifactUrl the artifactUrl to set
87      */
88     public DistributionStatusMessageBuilder setArtifactUrl(final String artifactUrl) {
89         this.artifactUrl = artifactUrl;
90         return this;
91     }
92
93     /**
94      * Set consumer id url to this {@link DistributionStatusMessageBuilder} instance.
95      *
96      * @param consumerId the consumerId to set
97      */
98     public DistributionStatusMessageBuilder setConsumerId(final String consumerId) {
99         this.consumerId = consumerId;
100         return this;
101     }
102
103     /**
104      * Set distribution id to this {@link DistributionStatusMessageBuilder} instance.
105      *
106      * @param distributionId the distributionId to set
107      */
108     public DistributionStatusMessageBuilder setDistributionId(final String distributionId) {
109         this.distributionId = distributionId;
110         return this;
111     }
112
113     /**
114      * Set distribution status to this {@link DistributionStatusMessageBuilder} instance.
115      *
116      * @param distributionStatus the distributionStatus to set
117      */
118     public DistributionStatusMessageBuilder setDistributionStatus(final DistributionStatusEnum distributionStatus) {
119         this.distributionStatus = distributionStatus;
120         return this;
121     }
122
123     /**
124      * Set time to this {@link DistributionStatusMessageBuilder} instance.
125      *
126      * @param timestamp the timestamp to set
127      */
128     public DistributionStatusMessageBuilder setTimestamp(final long timestamp) {
129         this.timestamp = timestamp;
130         return this;
131     }
132 }