/
V1beta1CertificateStatus.java
308 lines (260 loc) · 11.2 KB
/
V1beta1CertificateStatus.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
/*
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.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/** Status of the Certificate. This is set and managed automatically. */
@ApiModel(description = "Status of the Certificate. This is set and managed automatically.")
@javax.annotation.Generated(
value = "org.openapitools.codegen.languages.JavaClientCodegen",
date = "2020-08-18T19:55:23.947Z[Etc/UTC]")
public class V1beta1CertificateStatus {
public static final String SERIALIZED_NAME_CONDITIONS = "conditions";
@SerializedName(SERIALIZED_NAME_CONDITIONS)
private List<V1beta1CertificateStatusConditions> conditions = null;
public static final String SERIALIZED_NAME_LAST_FAILURE_TIME = "lastFailureTime";
@SerializedName(SERIALIZED_NAME_LAST_FAILURE_TIME)
private OffsetDateTime lastFailureTime;
public static final String SERIALIZED_NAME_NEXT_PRIVATE_KEY_SECRET_NAME =
"nextPrivateKeySecretName";
@SerializedName(SERIALIZED_NAME_NEXT_PRIVATE_KEY_SECRET_NAME)
private String nextPrivateKeySecretName;
public static final String SERIALIZED_NAME_NOT_AFTER = "notAfter";
@SerializedName(SERIALIZED_NAME_NOT_AFTER)
private OffsetDateTime notAfter;
public static final String SERIALIZED_NAME_NOT_BEFORE = "notBefore";
@SerializedName(SERIALIZED_NAME_NOT_BEFORE)
private OffsetDateTime notBefore;
public static final String SERIALIZED_NAME_RENEWAL_TIME = "renewalTime";
@SerializedName(SERIALIZED_NAME_RENEWAL_TIME)
private OffsetDateTime renewalTime;
public static final String SERIALIZED_NAME_REVISION = "revision";
@SerializedName(SERIALIZED_NAME_REVISION)
private Integer revision;
public V1beta1CertificateStatus conditions(List<V1beta1CertificateStatusConditions> conditions) {
this.conditions = conditions;
return this;
}
public V1beta1CertificateStatus addConditionsItem(
V1beta1CertificateStatusConditions conditionsItem) {
if (this.conditions == null) {
this.conditions = new ArrayList<V1beta1CertificateStatusConditions>();
}
this.conditions.add(conditionsItem);
return this;
}
/**
* List of status conditions to indicate the status of certificates. Known condition types are
* `Ready` and `Issuing`.
*
* @return conditions
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"List of status conditions to indicate the status of certificates. Known condition types are `Ready` and `Issuing`.")
public List<V1beta1CertificateStatusConditions> getConditions() {
return conditions;
}
public void setConditions(List<V1beta1CertificateStatusConditions> conditions) {
this.conditions = conditions;
}
public V1beta1CertificateStatus lastFailureTime(OffsetDateTime lastFailureTime) {
this.lastFailureTime = lastFailureTime;
return this;
}
/**
* LastFailureTime is the time as recorded by the Certificate controller of the most recent
* failure to complete a CertificateRequest for this Certificate resource. If set, cert-manager
* will not re-request another Certificate until 1 hour has elapsed from this time.
*
* @return lastFailureTime
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"LastFailureTime is the time as recorded by the Certificate controller of the most recent failure to complete a CertificateRequest for this Certificate resource. If set, cert-manager will not re-request another Certificate until 1 hour has elapsed from this time.")
public OffsetDateTime getLastFailureTime() {
return lastFailureTime;
}
public void setLastFailureTime(OffsetDateTime lastFailureTime) {
this.lastFailureTime = lastFailureTime;
}
public V1beta1CertificateStatus nextPrivateKeySecretName(String nextPrivateKeySecretName) {
this.nextPrivateKeySecretName = nextPrivateKeySecretName;
return this;
}
/**
* The name of the Secret resource containing the private key to be used for the next certificate
* iteration. The keymanager controller will automatically set this field if the
* `Issuing` condition is set to `True`. It will automatically unset this
* field when the Issuing condition is not set or False.
*
* @return nextPrivateKeySecretName
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"The name of the Secret resource containing the private key to be used for the next certificate iteration. The keymanager controller will automatically set this field if the `Issuing` condition is set to `True`. It will automatically unset this field when the Issuing condition is not set or False.")
public String getNextPrivateKeySecretName() {
return nextPrivateKeySecretName;
}
public void setNextPrivateKeySecretName(String nextPrivateKeySecretName) {
this.nextPrivateKeySecretName = nextPrivateKeySecretName;
}
public V1beta1CertificateStatus notAfter(OffsetDateTime notAfter) {
this.notAfter = notAfter;
return this;
}
/**
* The expiration time of the certificate stored in the secret named by this resource in
* `spec.secretName`.
*
* @return notAfter
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"The expiration time of the certificate stored in the secret named by this resource in `spec.secretName`.")
public OffsetDateTime getNotAfter() {
return notAfter;
}
public void setNotAfter(OffsetDateTime notAfter) {
this.notAfter = notAfter;
}
public V1beta1CertificateStatus notBefore(OffsetDateTime notBefore) {
this.notBefore = notBefore;
return this;
}
/**
* The time after which the certificate stored in the secret named by this resource in
* spec.secretName is valid.
*
* @return notBefore
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"The time after which the certificate stored in the secret named by this resource in spec.secretName is valid.")
public OffsetDateTime getNotBefore() {
return notBefore;
}
public void setNotBefore(OffsetDateTime notBefore) {
this.notBefore = notBefore;
}
public V1beta1CertificateStatus renewalTime(OffsetDateTime renewalTime) {
this.renewalTime = renewalTime;
return this;
}
/**
* RenewalTime is the time at which the certificate will be next renewed. If not set, no upcoming
* renewal is scheduled.
*
* @return renewalTime
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"RenewalTime is the time at which the certificate will be next renewed. If not set, no upcoming renewal is scheduled.")
public OffsetDateTime getRenewalTime() {
return renewalTime;
}
public void setRenewalTime(OffsetDateTime renewalTime) {
this.renewalTime = renewalTime;
}
public V1beta1CertificateStatus revision(Integer revision) {
this.revision = revision;
return this;
}
/**
* The current 'revision' of the certificate as issued. When a CertificateRequest resource
* is created, it will have the `cert-manager.io/certificate-revision` set to one
* greater than the current value of this field. Upon issuance, this field will be set to the
* value of the annotation on the CertificateRequest resource used to issue the certificate.
* Persisting the value on the CertificateRequest resource allows the certificates controller to
* know whether a request is part of an old issuance or if it is part of the ongoing
* revision's issuance by checking if the revision value in the annotation is greater than
* this field.
*
* @return revision
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"The current 'revision' of the certificate as issued. When a CertificateRequest resource is created, it will have the `cert-manager.io/certificate-revision` set to one greater than the current value of this field. Upon issuance, this field will be set to the value of the annotation on the CertificateRequest resource used to issue the certificate. Persisting the value on the CertificateRequest resource allows the certificates controller to know whether a request is part of an old issuance or if it is part of the ongoing revision's issuance by checking if the revision value in the annotation is greater than this field.")
public Integer getRevision() {
return revision;
}
public void setRevision(Integer revision) {
this.revision = revision;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1beta1CertificateStatus v1beta1CertificateStatus = (V1beta1CertificateStatus) o;
return Objects.equals(this.conditions, v1beta1CertificateStatus.conditions)
&& Objects.equals(this.lastFailureTime, v1beta1CertificateStatus.lastFailureTime)
&& Objects.equals(
this.nextPrivateKeySecretName, v1beta1CertificateStatus.nextPrivateKeySecretName)
&& Objects.equals(this.notAfter, v1beta1CertificateStatus.notAfter)
&& Objects.equals(this.notBefore, v1beta1CertificateStatus.notBefore)
&& Objects.equals(this.renewalTime, v1beta1CertificateStatus.renewalTime)
&& Objects.equals(this.revision, v1beta1CertificateStatus.revision);
}
@Override
public int hashCode() {
return Objects.hash(
conditions,
lastFailureTime,
nextPrivateKeySecretName,
notAfter,
notBefore,
renewalTime,
revision);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1beta1CertificateStatus {\n");
sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n");
sb.append(" lastFailureTime: ").append(toIndentedString(lastFailureTime)).append("\n");
sb.append(" nextPrivateKeySecretName: ")
.append(toIndentedString(nextPrivateKeySecretName))
.append("\n");
sb.append(" notAfter: ").append(toIndentedString(notAfter)).append("\n");
sb.append(" notBefore: ").append(toIndentedString(notBefore)).append("\n");
sb.append(" renewalTime: ").append(toIndentedString(renewalTime)).append("\n");
sb.append(" revision: ").append(toIndentedString(revision)).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 ");
}
}