d2b3334c8c9953648a69a8f8eb744cf5e6ac414b
[so.git] / adapters / mso-adapter-utils / src / main / java / org / onap / so / cloudify / beans / DeploymentInfo.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Copyright (C) 2018 Nokia.
8  * ================================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  * ============LICENSE_END=========================================================
21  */
22
23 package org.onap.so.cloudify.beans;
24
25 import java.util.Map;
26
27 /*
28  * This Java bean class relays Heat stack status information to ActiveVOS processes.
29  *
30  * This bean is returned by all Heat-specific adapter operations (create, query, delete)
31  */
32
33 public final class DeploymentInfo {
34
35     private final String id;
36     private final DeploymentStatus status;
37     private final Map<String, Object> outputs;
38     private final Map<String, Object> inputs;
39     private final String lastAction;
40     private final String actionStatus;
41     private final String errorMessage;
42
43     DeploymentInfo(String id, DeploymentStatus deploymentStatus,
44         Map<String, Object> deploymentOutputs,
45         Map<String, Object> deploymentInputs,
46         String lastAction,
47         String actionStatus,
48         String errorMessage) {
49
50         this.id = id;
51         this.status = deploymentStatus;
52         this.outputs = deploymentOutputs;
53         this.inputs = deploymentInputs;
54         this.lastAction = lastAction;
55         this.actionStatus = actionStatus;
56         this.errorMessage = errorMessage;
57     }
58
59     public String getId() {
60         return id;
61     }
62
63     public DeploymentStatus getStatus() {
64         return status;
65     }
66
67     public Map<String, Object> getOutputs() {
68         return outputs;
69     }
70
71     public Map<String, Object> getInputs() {
72         return inputs;
73     }
74
75     public String getLastAction() {
76         return lastAction;
77     }
78
79     public String getActionStatus() {
80         return actionStatus;
81     }
82
83     public String getErrorMessage() {
84         return errorMessage;
85     }
86
87     @Override
88     public String toString() {
89         return "DeploymentInfo {" +
90             "id='" + id + '\'' +
91             ", inputs='" + inputs + '\'' +
92             ", outputs='" + outputs + '\'' +
93             ", lastAction='" + lastAction + '\'' +
94             ", status='" + status + '\'' +
95             ", errorMessage='" + errorMessage + '\'' +
96             '}';
97     }
98
99 }
100