Catalog alignment
[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                 if (obj == null)
109                         return false;
110                 if (getClass() != obj.getClass())
111                         return false;
112                 UploadArtifactInfo other = (UploadArtifactInfo) obj;
113                 if (artifactData == null) {
114                         if (other.artifactData != null)
115                                 return false;
116                 } else if (!artifactData.equals(other.artifactData))
117                         return false;
118                 if (artifactDescription == null) {
119                         if (other.artifactDescription != null)
120                                 return false;
121                 } else if (!artifactDescription.equals(other.artifactDescription))
122                         return false;
123                 if (artifactName == null) {
124                         if (other.artifactName != null)
125                                 return false;
126                 } else if (!artifactName.equals(other.artifactName))
127                         return false;
128                 if (artifactPath == null) {
129                         if (other.artifactPath != null)
130                                 return false;
131                 } else if (!artifactPath.equals(other.artifactPath))
132                         return false;
133                 if (artifactType != other.artifactType)
134                         return false;
135                 return true;
136         }
137
138         @Override
139         public String toString() {
140                 return "UploadArtifactInfo [artifactName=" + artifactName + ", artifactPath=" + artifactPath + ", artifactType=" + artifactType + ", artifactDescription=" + artifactDescription + ", artifactData=" + artifactData + "]";
141         }
142
143 }