/
V1beta1CertificateRequestStatus.java
200 lines (170 loc) · 6.76 KB
/
V1beta1CertificateRequestStatus.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
/*
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.Arrays;
import java.util.List;
import java.util.Objects;
/** Status of the CertificateRequest. This is set and managed automatically. */
@ApiModel(description = "Status of the CertificateRequest. 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 V1beta1CertificateRequestStatus {
public static final String SERIALIZED_NAME_CA = "ca";
@SerializedName(SERIALIZED_NAME_CA)
private byte[] ca;
public static final String SERIALIZED_NAME_CERTIFICATE = "certificate";
@SerializedName(SERIALIZED_NAME_CERTIFICATE)
private byte[] certificate;
public static final String SERIALIZED_NAME_CONDITIONS = "conditions";
@SerializedName(SERIALIZED_NAME_CONDITIONS)
private List<V1beta1CertificateRequestStatusConditions> conditions = null;
public static final String SERIALIZED_NAME_FAILURE_TIME = "failureTime";
@SerializedName(SERIALIZED_NAME_FAILURE_TIME)
private OffsetDateTime failureTime;
public V1beta1CertificateRequestStatus ca(byte[] ca) {
this.ca = ca;
return this;
}
/**
* The PEM encoded x509 certificate of the signer, also known as the CA (Certificate Authority).
* This is set on a best-effort basis by different issuers. If not set, the CA is assumed to be
* unknown/not available.
*
* @return ca
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"The PEM encoded x509 certificate of the signer, also known as the CA (Certificate Authority). This is set on a best-effort basis by different issuers. If not set, the CA is assumed to be unknown/not available.")
public byte[] getCa() {
return ca;
}
public void setCa(byte[] ca) {
this.ca = ca;
}
public V1beta1CertificateRequestStatus certificate(byte[] certificate) {
this.certificate = certificate;
return this;
}
/**
* The PEM encoded x509 certificate resulting from the certificate signing request. If not set,
* the CertificateRequest has either not been completed or has failed. More information on failure
* can be found by checking the `conditions` field.
*
* @return certificate
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"The PEM encoded x509 certificate resulting from the certificate signing request. If not set, the CertificateRequest has either not been completed or has failed. More information on failure can be found by checking the `conditions` field.")
public byte[] getCertificate() {
return certificate;
}
public void setCertificate(byte[] certificate) {
this.certificate = certificate;
}
public V1beta1CertificateRequestStatus conditions(
List<V1beta1CertificateRequestStatusConditions> conditions) {
this.conditions = conditions;
return this;
}
public V1beta1CertificateRequestStatus addConditionsItem(
V1beta1CertificateRequestStatusConditions conditionsItem) {
if (this.conditions == null) {
this.conditions = new ArrayList<V1beta1CertificateRequestStatusConditions>();
}
this.conditions.add(conditionsItem);
return this;
}
/**
* List of status conditions to indicate the status of a CertificateRequest. Known condition types
* are `Ready` and `InvalidRequest`.
*
* @return conditions
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"List of status conditions to indicate the status of a CertificateRequest. Known condition types are `Ready` and `InvalidRequest`.")
public List<V1beta1CertificateRequestStatusConditions> getConditions() {
return conditions;
}
public void setConditions(List<V1beta1CertificateRequestStatusConditions> conditions) {
this.conditions = conditions;
}
public V1beta1CertificateRequestStatus failureTime(OffsetDateTime failureTime) {
this.failureTime = failureTime;
return this;
}
/**
* FailureTime stores the time that this CertificateRequest failed. This is used to influence
* garbage collection and back-off.
*
* @return failureTime
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"FailureTime stores the time that this CertificateRequest failed. This is used to influence garbage collection and back-off.")
public OffsetDateTime getFailureTime() {
return failureTime;
}
public void setFailureTime(OffsetDateTime failureTime) {
this.failureTime = failureTime;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1beta1CertificateRequestStatus v1beta1CertificateRequestStatus =
(V1beta1CertificateRequestStatus) o;
return Arrays.equals(this.ca, v1beta1CertificateRequestStatus.ca)
&& Arrays.equals(this.certificate, v1beta1CertificateRequestStatus.certificate)
&& Objects.equals(this.conditions, v1beta1CertificateRequestStatus.conditions)
&& Objects.equals(this.failureTime, v1beta1CertificateRequestStatus.failureTime);
}
@Override
public int hashCode() {
return Objects.hash(Arrays.hashCode(ca), Arrays.hashCode(certificate), conditions, failureTime);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1beta1CertificateRequestStatus {\n");
sb.append(" ca: ").append(toIndentedString(ca)).append("\n");
sb.append(" certificate: ").append(toIndentedString(certificate)).append("\n");
sb.append(" conditions: ").append(toIndentedString(conditions)).append("\n");
sb.append(" failureTime: ").append(toIndentedString(failureTime)).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 ");
}
}