fixing warnings from checkstyle in common-app-api
[sdc.git] / common-app-api / src / main / java / org / openecomp / sdc / common / api / UploadArtifactInfo.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
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.openecomp.sdc.common.api;
22
23 public class UploadArtifactInfo {
24
25     public UploadArtifactInfo() {
26
27     }
28
29     public UploadArtifactInfo(String artifactName, String artifactPath, ArtifactTypeEnum artifactType, String artifactDescription) {
30         super();
31         this.artifactName = artifactName;
32         this.artifactPath = artifactPath;
33         this.artifactType = artifactType;
34         this.artifactDescription = artifactDescription;
35     }
36
37     public UploadArtifactInfo(String artifactName, String artifactPath, ArtifactTypeEnum artifactType, String artifactDescription, String artifactData) {
38         super();
39         this.artifactName = artifactName;
40         this.artifactPath = artifactPath;
41         this.artifactType = artifactType;
42         this.artifactDescription = artifactDescription;
43         this.artifactData = artifactData;
44     }
45
46     private String artifactName;
47     private String artifactPath;
48     private ArtifactTypeEnum artifactType;
49     private String artifactDescription;
50     private String artifactData;
51
52     public String getArtifactName() {
53         return artifactName;
54     }
55
56     public void setArtifactName(String artifactName) {
57         this.artifactName = artifactName;
58     }
59
60     public String getArtifactPath() {
61         return artifactPath;
62     }
63
64     public void setArtifactPath(String artifactPath) {
65         this.artifactPath = artifactPath;
66     }
67
68     public ArtifactTypeEnum getArtifactType() {
69         return artifactType;
70     }
71
72     public void setArtifactType(ArtifactTypeEnum artifactType) {
73         this.artifactType = artifactType;
74     }
75
76     public String getArtifactDescription() {
77         return artifactDescription;
78     }
79
80     public void setArtifactDescription(String artifactDescription) {
81         this.artifactDescription = artifactDescription;
82     }
83
84     public String getArtifactData() {
85         return artifactData;
86     }
87
88     public void setArtifactData(String artifactData) {
89         this.artifactData = artifactData;
90     }
91
92     @Override
93     public int hashCode() {
94         final int prime = 31;
95         int result = 1;
96         result = prime * result + ((artifactData == null) ? 0 : artifactData.hashCode());
97         result = prime * result + ((artifactDescription == null) ? 0 : artifactDescription.hashCode());
98         result = prime * result + ((artifactName == null) ? 0 : artifactName.hashCode());
99         result = prime * result + ((artifactPath == null) ? 0 : artifactPath.hashCode());
100         result = prime * result + ((artifactType == null) ? 0 : artifactType.hashCode());
101         return result;
102     }
103
104     @Override
105     public boolean equals(Object obj) {
106         if (this == obj) {
107             return true;
108         }
109         if (obj == null) {
110             return false;
111         }
112         if (getClass() != obj.getClass()) {
113             return false;
114         }
115         UploadArtifactInfo other = (UploadArtifactInfo) obj;
116         if (artifactData == null) {
117             if (other.artifactData != null) {
118                 return false;
119             }
120         } else if (!artifactData.equals(other.artifactData)) {
121             return false;
122         }
123         if (artifactDescription == null) {
124             if (other.artifactDescription != null) {
125                 return false;
126             }
127         } else if (!artifactDescription.equals(other.artifactDescription)) {
128             return false;
129         }
130         if (artifactName == null) {
131             if (other.artifactName != null) {
132                 return false;
133             }
134         } else if (!artifactName.equals(other.artifactName)) {
135             return false;
136         }
137         if (artifactPath == null) {
138             if (other.artifactPath != null) {
139                 return false;
140             }
141         } else if (!artifactPath.equals(other.artifactPath)) {
142             return false;
143         }
144         if (artifactType != other.artifactType) {
145             return false;
146         }
147         return true;
148     }
149
150     @Override
151     public String toString() {
152         return "UploadArtifactInfo [artifactName=" + artifactName + ", artifactPath=" + artifactPath + ", artifactType=" + artifactType + ", artifactDescription=" + artifactDescription + ", artifactData=" + artifactData + "]";
153     }
154
155 }