Replaced all tabs with spaces in java and pom.xml
[so.git] / bpmn / MSOCommonBPMN / src / main / java / org / onap / so / bpmn / servicedecomposition / bbobjects / AllottedResource.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.bpmn.servicedecomposition.bbobjects;
22
23 import java.io.Serializable;
24 import javax.persistence.Id;
25 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
26 import org.onap.so.bpmn.servicedecomposition.homingobjects.SolutionCandidates;
27 import org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoAllottedResource;
28 import org.onap.so.db.catalog.beans.OrchestrationStatus;
29 import com.fasterxml.jackson.annotation.JsonProperty;
30 import com.fasterxml.jackson.annotation.JsonRootName;
31 import org.apache.commons.lang3.builder.HashCodeBuilder;
32 import org.apache.commons.lang3.builder.EqualsBuilder;
33
34 @JsonRootName("allotted-resource")
35 public class AllottedResource extends SolutionCandidates implements Serializable, ShallowCopy<AllottedResource> {
36
37     private static final long serialVersionUID = 8674239064804424306L;
38
39     @Id
40     @JsonProperty("id")
41     private String id;
42     @JsonProperty("target-network-role")
43     private String targetNetworkRole;
44     @JsonProperty("self-link")
45     private String selflink;
46     @JsonProperty("orchestration-status")
47     private OrchestrationStatus orchestrationStatus;
48     @JsonProperty("operational-status")
49     private String operationalStatus;
50     @JsonProperty("type")
51     private String type;
52     @JsonProperty("role")
53     private String role;
54     @JsonProperty("model-info-allotted-resource")
55     private ModelInfoAllottedResource modelInfoAllottedResource;
56     @JsonProperty("service-instance")
57     private ServiceInstance parentServiceInstance;
58
59     public ModelInfoAllottedResource getModelInfoAllottedResource() {
60         return modelInfoAllottedResource;
61     }
62
63     public void setModelInfoAllottedResource(ModelInfoAllottedResource modelInfoAllottedResource) {
64         this.modelInfoAllottedResource = modelInfoAllottedResource;
65     }
66
67     public String getId() {
68         return id;
69     }
70
71     public void setId(String id) {
72         this.id = id;
73     }
74
75     public String getTargetNetworkRole() {
76         return targetNetworkRole;
77     }
78
79     public void setTargetNetworkRole(String targetNetworkRole) {
80         this.targetNetworkRole = targetNetworkRole;
81     }
82
83     public String getSelflink() {
84         return selflink;
85     }
86
87     public void setSelflink(String selflink) {
88         this.selflink = selflink;
89     }
90
91     public String getOperationalStatus() {
92         return operationalStatus;
93     }
94
95     public void setOperationalStatus(String operationalStatus) {
96         this.operationalStatus = operationalStatus;
97     }
98
99     public OrchestrationStatus getOrchestrationStatus() {
100         return orchestrationStatus;
101     }
102
103     public void setOrchestrationStatus(OrchestrationStatus orchestrationStatus) {
104         this.orchestrationStatus = orchestrationStatus;
105     }
106
107     public String getType() {
108         return type;
109     }
110
111     public void setType(String type) {
112         this.type = type;
113     }
114
115     public String getRole() {
116         return role;
117     }
118
119     public void setRole(String role) {
120         this.role = role;
121     }
122
123     public ServiceInstance getParentServiceInstance() {
124         return parentServiceInstance;
125     }
126
127     public void setParentServiceInstance(ServiceInstance parentServiceInstance) {
128         this.parentServiceInstance = parentServiceInstance;
129     }
130
131     @Override
132     public boolean equals(final Object other) {
133         if (!(other instanceof AllottedResource)) {
134             return false;
135         }
136         AllottedResource castOther = (AllottedResource) other;
137         return new EqualsBuilder().append(id, castOther.id).isEquals();
138     }
139
140     @Override
141     public int hashCode() {
142         return new HashCodeBuilder().append(id).toHashCode();
143     }
144
145 }