/
V1beta1OrderStatus.java
353 lines (291 loc) · 10.5 KB
/
V1beta1OrderStatus.java
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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
/*
Copyright 2020 The Kubernetes Authors.
Licensed 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 io.cert.manager.models;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.time.OffsetDateTime;
/** V1beta1OrderStatus */
@javax.annotation.Generated(
value = "org.openapitools.codegen.languages.JavaClientCodegen",
date = "2020-08-18T19:55:23.947Z[Etc/UTC]")
public class V1beta1OrderStatus {
public static final String SERIALIZED_NAME_AUTHORIZATIONS = "authorizations";
@SerializedName(SERIALIZED_NAME_AUTHORIZATIONS)
private List<V1beta1OrderStatusAuthorizations> authorizations = null;
public static final String SERIALIZED_NAME_CERTIFICATE = "certificate";
@SerializedName(SERIALIZED_NAME_CERTIFICATE)
private byte[] certificate;
public static final String SERIALIZED_NAME_FAILURE_TIME = "failureTime";
@SerializedName(SERIALIZED_NAME_FAILURE_TIME)
private OffsetDateTime failureTime;
public static final String SERIALIZED_NAME_FINALIZE_U_R_L = "finalizeURL";
@SerializedName(SERIALIZED_NAME_FINALIZE_U_R_L)
private String finalizeURL;
public static final String SERIALIZED_NAME_REASON = "reason";
@SerializedName(SERIALIZED_NAME_REASON)
private String reason;
/**
* State contains the current state of this Order resource. States 'success' and
* 'expired' are 'final'
*/
@JsonAdapter(StateEnum.Adapter.class)
public enum StateEnum {
VALID("valid"),
READY("ready"),
PENDING("pending"),
PROCESSING("processing"),
INVALID("invalid"),
EXPIRED("expired"),
ERRORED("errored");
private String value;
StateEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StateEnum fromValue(String value) {
for (StateEnum b : StateEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter<StateEnum> {
@Override
public void write(final JsonWriter jsonWriter, final StateEnum enumeration)
throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public StateEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return StateEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_STATE = "state";
@SerializedName(SERIALIZED_NAME_STATE)
private StateEnum state;
public static final String SERIALIZED_NAME_URL = "url";
@SerializedName(SERIALIZED_NAME_URL)
private String url;
public V1beta1OrderStatus authorizations(List<V1beta1OrderStatusAuthorizations> authorizations) {
this.authorizations = authorizations;
return this;
}
public V1beta1OrderStatus addAuthorizationsItem(
V1beta1OrderStatusAuthorizations authorizationsItem) {
if (this.authorizations == null) {
this.authorizations = new ArrayList<V1beta1OrderStatusAuthorizations>();
}
this.authorizations.add(authorizationsItem);
return this;
}
/**
* Authorizations contains data returned from the ACME server on what authorizations must be
* completed in order to validate the DNS names specified on the Order.
*
* @return authorizations
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"Authorizations contains data returned from the ACME server on what authorizations must be completed in order to validate the DNS names specified on the Order.")
public List<V1beta1OrderStatusAuthorizations> getAuthorizations() {
return authorizations;
}
public void setAuthorizations(List<V1beta1OrderStatusAuthorizations> authorizations) {
this.authorizations = authorizations;
}
public V1beta1OrderStatus certificate(byte[] certificate) {
this.certificate = certificate;
return this;
}
/**
* Certificate is a copy of the PEM encoded certificate for this Order. This field will be
* populated after the order has been successfully finalized with the ACME server, and the order
* has transitioned to the 'valid' state.
*
* @return certificate
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"Certificate is a copy of the PEM encoded certificate for this Order. This field will be populated after the order has been successfully finalized with the ACME server, and the order has transitioned to the 'valid' state.")
public byte[] getCertificate() {
return certificate;
}
public void setCertificate(byte[] certificate) {
this.certificate = certificate;
}
public V1beta1OrderStatus failureTime(OffsetDateTime failureTime) {
this.failureTime = failureTime;
return this;
}
/**
* FailureTime stores the time that this order failed. This is used to influence garbage
* collection and back-off.
*
* @return failureTime
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"FailureTime stores the time that this order failed. This is used to influence garbage collection and back-off.")
public OffsetDateTime getFailureTime() {
return failureTime;
}
public void setFailureTime(OffsetDateTime failureTime) {
this.failureTime = failureTime;
}
public V1beta1OrderStatus finalizeURL(String finalizeURL) {
this.finalizeURL = finalizeURL;
return this;
}
/**
* FinalizeURL of the Order. This is used to obtain certificates for this order once it has been
* completed.
*
* @return finalizeURL
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"FinalizeURL of the Order. This is used to obtain certificates for this order once it has been completed.")
public String getFinalizeURL() {
return finalizeURL;
}
public void setFinalizeURL(String finalizeURL) {
this.finalizeURL = finalizeURL;
}
public V1beta1OrderStatus reason(String reason) {
this.reason = reason;
return this;
}
/**
* Reason optionally provides more information about a why the order is in the current state.
*
* @return reason
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"Reason optionally provides more information about a why the order is in the current state.")
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public V1beta1OrderStatus state(StateEnum state) {
this.state = state;
return this;
}
/**
* State contains the current state of this Order resource. States 'success' and
* 'expired' are 'final'
*
* @return state
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"State contains the current state of this Order resource. States 'success' and 'expired' are 'final'")
public StateEnum getState() {
return state;
}
public void setState(StateEnum state) {
this.state = state;
}
public V1beta1OrderStatus url(String url) {
this.url = url;
return this;
}
/**
* URL of the Order. This will initially be empty when the resource is first created. The Order
* controller will populate this field when the Order is first processed. This field will be
* immutable after it is initially set.
*
* @return url
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"URL of the Order. This will initially be empty when the resource is first created. The Order controller will populate this field when the Order is first processed. This field will be immutable after it is initially set.")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1beta1OrderStatus v1beta1OrderStatus = (V1beta1OrderStatus) o;
return Objects.equals(this.authorizations, v1beta1OrderStatus.authorizations)
&& Arrays.equals(this.certificate, v1beta1OrderStatus.certificate)
&& Objects.equals(this.failureTime, v1beta1OrderStatus.failureTime)
&& Objects.equals(this.finalizeURL, v1beta1OrderStatus.finalizeURL)
&& Objects.equals(this.reason, v1beta1OrderStatus.reason)
&& Objects.equals(this.state, v1beta1OrderStatus.state)
&& Objects.equals(this.url, v1beta1OrderStatus.url);
}
@Override
public int hashCode() {
return Objects.hash(
authorizations, Arrays.hashCode(certificate), failureTime, finalizeURL, reason, state, url);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1beta1OrderStatus {\n");
sb.append(" authorizations: ").append(toIndentedString(authorizations)).append("\n");
sb.append(" certificate: ").append(toIndentedString(certificate)).append("\n");
sb.append(" failureTime: ").append(toIndentedString(failureTime)).append("\n");
sb.append(" finalizeURL: ").append(toIndentedString(finalizeURL)).append("\n");
sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}