Containerization feature of SO
[so.git] / common / src / main / java / org / onap / so / client / aai / objects / AAIServiceInstance.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.so.client.aai.objects;
22
23 import org.onap.so.client.aai.AAIObjectType;
24 import org.onap.so.client.aai.entities.AAIEntityObject;
25 import org.onap.so.client.aai.entities.uri.AAIResourceUri;
26 import org.onap.so.client.aai.entities.uri.AAIUriFactory;
27
28 import com.fasterxml.jackson.annotation.JsonProperty;
29
30 public class AAIServiceInstance implements AAIEntityObject {
31         
32         @JsonProperty("service-instance-id")
33         private String serviceInstanceId;
34         @JsonProperty("service-instance-name")
35         private String serviceInstanceName;     
36         @JsonProperty("service-type")
37         private String serviceType;
38         @JsonProperty("service-role")
39         private String serviceRole;
40         @JsonProperty("orchestration-status")
41         private String oStatus;
42         @JsonProperty("model-invariant-id")
43         private String modelInvariantUuid;
44         @JsonProperty("model-version-id")
45         private String modelUuid;
46         @JsonProperty("environment-context")
47         private String environmentContext;
48         @JsonProperty("workload-context")
49         private String workloadContext;
50         
51         public String getServiceInstanceName() {
52                 return serviceInstanceName;
53         }
54
55         public void setServiceInstanceName(String serviceInstanceName) {
56                 this.serviceInstanceName = serviceInstanceName;
57         }
58
59         public String getServiceType() {
60                 return serviceType;
61         }
62
63         public void setServiceType(String serviceType) {
64                 this.serviceType = serviceType;
65         }
66
67         public String getServiceRole() {
68                 return serviceRole;
69         }
70
71         public void setServiceRole(String serviceRole) {
72                 this.serviceRole = serviceRole;
73         }
74
75         public String getoStatus() {
76                 return oStatus;
77         }
78
79         public void setoStatus(String oStatus) {
80                 this.oStatus = oStatus;
81         }
82
83         public String getModelInvariantUuid() {
84                 return modelInvariantUuid;
85         }
86
87         public void setModelInvariantUuid(String modelInvariantUuid) {
88                 this.modelInvariantUuid = modelInvariantUuid;
89         }
90
91         public String getModelUuid() {
92                 return modelUuid;
93         }
94
95         public void setModelUuid(String modelUuid) {
96                 this.modelUuid = modelUuid;
97         }
98
99         public String getEnvironmentContext() {
100                 return environmentContext;
101         }
102
103         public void setEnvironmentContext(String environmentContext) {
104                 this.environmentContext = environmentContext;
105         }
106
107         public String getWorkloadContext() {
108                 return workloadContext;
109         }
110
111         public void setWorkloadContext(String workloadContext) {
112                 this.workloadContext = workloadContext;
113         }
114
115         public String getServiceInstanceId() {
116                 return serviceInstanceId;
117         }
118
119         public void setServiceInstanceId(String serviceInstanceId) {
120                 this.serviceInstanceId = serviceInstanceId;
121         }
122         
123         public AAIServiceInstance withServiceInstance(String serviceInstanceId) {
124                 this.setServiceInstanceId(serviceInstanceId);
125                 return this;
126         }
127
128         @Override
129         public AAIResourceUri getUri() {
130                 AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, this.serviceInstanceId);
131                 return uri;
132         }
133         @Override
134         public String toString() {
135                 return "AAIServiceInstance [serviceInstanceId=" + serviceInstanceId + ", serviceInstanceName="
136                                 + serviceInstanceName + ", serviceType=" + serviceType + ", serviceRole=" + serviceRole + ", oStatus="
137                                 + oStatus + ", modelInvariantUuid=" + modelInvariantUuid + ", modelUuid=" + modelUuid
138                                 + ", environmentContext=" + environmentContext + ", workloadContext=" + workloadContext + "]";
139         }
140         
141 }