forked from apache/cloudstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathS3TO.java
More file actions
252 lines (197 loc) · 6.76 KB
/
Copy pathS3TO.java
File metadata and controls
252 lines (197 loc) · 6.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.agent.api.to;
import java.util.Date;
import com.cloud.utils.S3Utils;
public final class S3TO implements S3Utils.ClientOptions {
private Long id;
private String uuid;
private String accessKey;
private String secretKey;
private String endPoint;
private String bucketName;
private Boolean httpsFlag;
private Integer connectionTimeout;
private Integer maxErrorRetry;
private Integer socketTimeout;
private Date created;
public S3TO() {
super();
}
public S3TO(final Long id, final String uuid, final String accessKey,
final String secretKey, final String endPoint,
final String bucketName, final Boolean httpsFlag,
final Integer connectionTimeout, final Integer maxErrorRetry,
final Integer socketTimeout, final Date created) {
super();
this.id = id;
this.uuid = uuid;
this.accessKey = accessKey;
this.secretKey = secretKey;
this.endPoint = endPoint;
this.bucketName = bucketName;
this.httpsFlag = httpsFlag;
this.connectionTimeout = connectionTimeout;
this.maxErrorRetry = maxErrorRetry;
this.socketTimeout = socketTimeout;
this.created = created;
}
@Override
public boolean equals(final Object thatObject) {
if (this == thatObject)
return true;
if (thatObject == null || getClass() != thatObject.getClass())
return false;
final S3TO thatS3TO = (S3TO) thatObject;
if (httpsFlag != null ? !httpsFlag.equals(thatS3TO.httpsFlag)
: thatS3TO.httpsFlag != null) {
return false;
}
if (accessKey != null ? !accessKey.equals(thatS3TO.accessKey)
: thatS3TO.accessKey != null) {
return false;
}
if (connectionTimeout != null ? !connectionTimeout
.equals(thatS3TO.connectionTimeout)
: thatS3TO.connectionTimeout != null) {
return false;
}
if (endPoint != null ? !endPoint.equals(thatS3TO.endPoint)
: thatS3TO.endPoint != null) {
return false;
}
if (id != null ? !id.equals(thatS3TO.id) : thatS3TO.id != null) {
return false;
}
if (uuid != null ? !uuid.equals(thatS3TO.uuid) : thatS3TO.uuid != null) {
return false;
}
if (maxErrorRetry != null ? !maxErrorRetry
.equals(thatS3TO.maxErrorRetry)
: thatS3TO.maxErrorRetry != null) {
return false;
}
if (secretKey != null ? !secretKey.equals(thatS3TO.secretKey)
: thatS3TO.secretKey != null) {
return false;
}
if (socketTimeout != null ? !socketTimeout
.equals(thatS3TO.socketTimeout)
: thatS3TO.socketTimeout != null) {
return false;
}
if (bucketName != null ? !bucketName.equals(thatS3TO.bucketName)
: thatS3TO.bucketName != null) {
return false;
}
if (created != null ? !created.equals(thatS3TO.created)
: thatS3TO.created != null) {
return false;
}
return true;
}
@Override
public int hashCode() {
int result = id != null ? id.hashCode() : 0;
result = 31 * result + (accessKey != null ? accessKey.hashCode() : 0);
result = 31 * result + (secretKey != null ? secretKey.hashCode() : 0);
result = 31 * result + (endPoint != null ? endPoint.hashCode() : 0);
result = 31 * result + (bucketName != null ? bucketName.hashCode() : 0);
result = 31 * result + (httpsFlag ? 1 : 0);
result = 31
* result
+ (connectionTimeout != null ? connectionTimeout.hashCode() : 0);
result = 31 * result
+ (maxErrorRetry != null ? maxErrorRetry.hashCode() : 0);
result = 31 * result
+ (socketTimeout != null ? socketTimeout.hashCode() : 0);
return result;
}
public Long getId() {
return this.id;
}
public void setId(final Long id) {
this.id = id;
}
public String getUuid() {
return this.uuid;
}
public void setUuid(final String uuid) {
this.uuid = uuid;
}
@Override
public String getAccessKey() {
return this.accessKey;
}
public void setAccessKey(final String accessKey) {
this.accessKey = accessKey;
}
@Override
public String getSecretKey() {
return this.secretKey;
}
public void setSecretKey(final String secretKey) {
this.secretKey = secretKey;
}
@Override
public String getEndPoint() {
return this.endPoint;
}
public void setEndPoint(final String endPoint) {
this.endPoint = endPoint;
}
public String getBucketName() {
return this.bucketName;
}
public void setBucketName(final String bucketName) {
this.bucketName = bucketName;
}
@Override
public Boolean isHttps() {
return this.httpsFlag;
}
public void setHttps(final Boolean httpsFlag) {
this.httpsFlag = httpsFlag;
}
@Override
public Integer getConnectionTimeout() {
return connectionTimeout;
}
public void setConnectionTimeout(final Integer connectionTimeout) {
this.connectionTimeout = connectionTimeout;
}
@Override
public Integer getMaxErrorRetry() {
return maxErrorRetry;
}
public void setMaxErrorRetry(final Integer maxErrorRetry) {
this.maxErrorRetry = maxErrorRetry;
}
@Override
public Integer getSocketTimeout() {
return socketTimeout;
}
public void setSocketTimeout(final Integer socketTimeout) {
this.socketTimeout = socketTimeout;
}
public Date getCreated() {
return this.created;
}
public void setCreated(final Date created) {
this.created = created;
}
}