Skip to content

Commit 267a313

Browse files
authored
Merge pull request #4252 from yue9944882/automated-generate-73da359d
Legacy: Automated Generate from openapi release-1.34
2 parents de44191 + 5c87759 commit 267a313

File tree

2,403 files changed

+157458
-82781
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,403 files changed

+157458
-82781
lines changed

fluent/src/main/java/io/kubernetes/client/fluent/Visitable.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ public void visit(V element) {
3131
});
3232
}
3333

34-
default T accept(io.kubernetes.client.fluent.Visitor... visitors) {
34+
default T accept(Visitor... visitors) {
3535
return accept(Collections.emptyList(), visitors);
3636
}
3737

38-
default T accept(List<Entry<String,Object>> path,io.kubernetes.client.fluent.Visitor... visitors) {
38+
default T accept(List<Entry<String,Object>> path,Visitor... visitors) {
3939
return accept(path, "", visitors);
4040
}
4141

42-
default T accept(List<Entry<String,Object>> path,String currentKey,io.kubernetes.client.fluent.Visitor... visitors) {
42+
default T accept(List<Entry<String,Object>> path,String currentKey,Visitor... visitors) {
4343
List<Visitor> sortedVisitor = new ArrayList<>();
4444
for (Visitor visitor : visitors) {
4545
visitor = VisitorListener.wrap(visitor);

fluent/src/main/java/io/kubernetes/client/fluent/Visitors.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private static Class<?> getClass(Type type) {
101101
}
102102
}
103103

104-
private static <T>Optional<Type> getMatchingInterface(Class<?> targetInterface,java.lang.reflect.Type... candidates) {
104+
private static <T>Optional<Type> getMatchingInterface(Class<?> targetInterface,Type... candidates) {
105105
if (candidates == null || candidates.length == 0) {
106106
return Optional.empty();
107107
}

fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReferenceBuilder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.kubernetes.client.openapi.models;
22

33
import io.kubernetes.client.fluent.VisitableBuilder;
4+
import java.lang.Object;
45
public class AdmissionregistrationV1ServiceReferenceBuilder extends AdmissionregistrationV1ServiceReferenceFluent<AdmissionregistrationV1ServiceReferenceBuilder> implements VisitableBuilder<AdmissionregistrationV1ServiceReference,AdmissionregistrationV1ServiceReferenceBuilder>{
56
public AdmissionregistrationV1ServiceReferenceBuilder() {
67
this(new AdmissionregistrationV1ServiceReference());

fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1ServiceReferenceFluent.java

Lines changed: 50 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
package io.kubernetes.client.openapi.models;
22

33
import java.lang.Integer;
4+
import java.lang.StringBuilder;
45
import java.lang.SuppressWarnings;
56
import io.kubernetes.client.fluent.BaseFluent;
7+
import java.util.Objects;
68
import java.lang.Object;
79
import java.lang.String;
810

911
/**
1012
* Generated
1113
*/
1214
@SuppressWarnings("unchecked")
13-
public class AdmissionregistrationV1ServiceReferenceFluent<A extends AdmissionregistrationV1ServiceReferenceFluent<A>> extends BaseFluent<A>{
15+
public class AdmissionregistrationV1ServiceReferenceFluent<A extends io.kubernetes.client.openapi.models.AdmissionregistrationV1ServiceReferenceFluent<A>> extends BaseFluent<A>{
1416
public AdmissionregistrationV1ServiceReferenceFluent() {
1517
}
1618

@@ -23,13 +25,13 @@ public AdmissionregistrationV1ServiceReferenceFluent(AdmissionregistrationV1Serv
2325
private Integer port;
2426

2527
protected void copyInstance(AdmissionregistrationV1ServiceReference instance) {
26-
instance = (instance != null ? instance : new AdmissionregistrationV1ServiceReference());
28+
instance = instance != null ? instance : new AdmissionregistrationV1ServiceReference();
2729
if (instance != null) {
28-
this.withName(instance.getName());
29-
this.withNamespace(instance.getNamespace());
30-
this.withPath(instance.getPath());
31-
this.withPort(instance.getPort());
32-
}
30+
this.withName(instance.getName());
31+
this.withNamespace(instance.getNamespace());
32+
this.withPath(instance.getPath());
33+
this.withPort(instance.getPort());
34+
}
3335
}
3436

3537
public String getName() {
@@ -85,28 +87,57 @@ public boolean hasPort() {
8587
}
8688

8789
public boolean equals(Object o) {
88-
if (this == o) return true;
89-
if (o == null || getClass() != o.getClass()) return false;
90-
if (!super.equals(o)) return false;
90+
if (this == o) {
91+
return true;
92+
}
93+
if (o == null || this.getClass() != o.getClass()) {
94+
return false;
95+
}
96+
if (!(super.equals(o))) {
97+
return false;
98+
}
9199
AdmissionregistrationV1ServiceReferenceFluent that = (AdmissionregistrationV1ServiceReferenceFluent) o;
92-
if (!java.util.Objects.equals(name, that.name)) return false;
93-
if (!java.util.Objects.equals(namespace, that.namespace)) return false;
94-
if (!java.util.Objects.equals(path, that.path)) return false;
95-
if (!java.util.Objects.equals(port, that.port)) return false;
100+
if (!(Objects.equals(name, that.name))) {
101+
return false;
102+
}
103+
if (!(Objects.equals(namespace, that.namespace))) {
104+
return false;
105+
}
106+
if (!(Objects.equals(path, that.path))) {
107+
return false;
108+
}
109+
if (!(Objects.equals(port, that.port))) {
110+
return false;
111+
}
96112
return true;
97113
}
98114

99115
public int hashCode() {
100-
return java.util.Objects.hash(name, namespace, path, port, super.hashCode());
116+
return Objects.hash(name, namespace, path, port);
101117
}
102118

103119
public String toString() {
104120
StringBuilder sb = new StringBuilder();
105121
sb.append("{");
106-
if (name != null) { sb.append("name:"); sb.append(name + ","); }
107-
if (namespace != null) { sb.append("namespace:"); sb.append(namespace + ","); }
108-
if (path != null) { sb.append("path:"); sb.append(path + ","); }
109-
if (port != null) { sb.append("port:"); sb.append(port); }
122+
if (!(name == null)) {
123+
sb.append("name:");
124+
sb.append(name);
125+
sb.append(",");
126+
}
127+
if (!(namespace == null)) {
128+
sb.append("namespace:");
129+
sb.append(namespace);
130+
sb.append(",");
131+
}
132+
if (!(path == null)) {
133+
sb.append("path:");
134+
sb.append(path);
135+
sb.append(",");
136+
}
137+
if (!(port == null)) {
138+
sb.append("port:");
139+
sb.append(port);
140+
}
110141
sb.append("}");
111142
return sb.toString();
112143
}

fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfigBuilder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.kubernetes.client.openapi.models;
22

33
import io.kubernetes.client.fluent.VisitableBuilder;
4+
import java.lang.Object;
45
public class AdmissionregistrationV1WebhookClientConfigBuilder extends AdmissionregistrationV1WebhookClientConfigFluent<AdmissionregistrationV1WebhookClientConfigBuilder> implements VisitableBuilder<AdmissionregistrationV1WebhookClientConfig,AdmissionregistrationV1WebhookClientConfigBuilder>{
56
public AdmissionregistrationV1WebhookClientConfigBuilder() {
67
this(new AdmissionregistrationV1WebhookClientConfig());

fluent/src/main/java/io/kubernetes/client/openapi/models/AdmissionregistrationV1WebhookClientConfigFluent.java

Lines changed: 88 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
package io.kubernetes.client.openapi.models;
22

3+
import java.lang.StringBuilder;
4+
import java.util.Optional;
35
import java.lang.SuppressWarnings;
46
import io.kubernetes.client.fluent.Nested;
57
import java.util.ArrayList;
68
import java.lang.String;
79
import java.lang.Byte;
810
import io.kubernetes.client.fluent.BaseFluent;
11+
import java.util.Objects;
912
import java.util.Collection;
1013
import java.lang.Object;
1114
import java.util.List;
@@ -14,7 +17,7 @@
1417
* Generated
1518
*/
1619
@SuppressWarnings("unchecked")
17-
public class AdmissionregistrationV1WebhookClientConfigFluent<A extends AdmissionregistrationV1WebhookClientConfigFluent<A>> extends BaseFluent<A>{
20+
public class AdmissionregistrationV1WebhookClientConfigFluent<A extends io.kubernetes.client.openapi.models.AdmissionregistrationV1WebhookClientConfigFluent<A>> extends BaseFluent<A>{
1821
public AdmissionregistrationV1WebhookClientConfigFluent() {
1922
}
2023

@@ -26,12 +29,12 @@ public AdmissionregistrationV1WebhookClientConfigFluent(AdmissionregistrationV1W
2629
private String url;
2730

2831
protected void copyInstance(AdmissionregistrationV1WebhookClientConfig instance) {
29-
instance = (instance != null ? instance : new AdmissionregistrationV1WebhookClientConfig());
32+
instance = instance != null ? instance : new AdmissionregistrationV1WebhookClientConfig();
3033
if (instance != null) {
31-
this.withCaBundle(instance.getCaBundle());
32-
this.withService(instance.getService());
33-
this.withUrl(instance.getUrl());
34-
}
34+
this.withCaBundle(instance.getCaBundle());
35+
this.withService(instance.getService());
36+
this.withUrl(instance.getUrl());
37+
}
3538
}
3639

3740
public A withCaBundle(byte... caBundle) {
@@ -48,51 +51,76 @@ public A withCaBundle(byte... caBundle) {
4851
}
4952

5053
public byte[] getCaBundle() {
51-
int size = caBundle != null ? caBundle.size() : 0;;
52-
byte[] result = new byte[size];;
54+
int size = caBundle != null ? caBundle.size() : 0;
55+
byte[] result = new byte[size];
5356
if (size == 0) {
5457
return result;
5558
}
56-
int index = 0;;
59+
int index = 0;
5760
for (byte item : caBundle) {
5861
result[index++] = item;
5962
}
6063
return result;
6164
}
6265

6366
public A addToCaBundle(int index,Byte item) {
64-
if (this.caBundle == null) {this.caBundle = new ArrayList<Byte>();}
67+
if (this.caBundle == null) {
68+
this.caBundle = new ArrayList();
69+
}
6570
this.caBundle.add(index, item);
66-
return (A)this;
71+
return (A) this;
6772
}
6873

6974
public A setToCaBundle(int index,Byte item) {
70-
if (this.caBundle == null) {this.caBundle = new ArrayList<Byte>();}
71-
this.caBundle.set(index, item); return (A)this;
75+
if (this.caBundle == null) {
76+
this.caBundle = new ArrayList();
77+
}
78+
this.caBundle.set(index, item);
79+
return (A) this;
7280
}
7381

74-
public A addToCaBundle(java.lang.Byte... items) {
75-
if (this.caBundle == null) {this.caBundle = new ArrayList<Byte>();}
76-
for (Byte item : items) {this.caBundle.add(item);} return (A)this;
82+
public A addToCaBundle(Byte... items) {
83+
if (this.caBundle == null) {
84+
this.caBundle = new ArrayList();
85+
}
86+
for (Byte item : items) {
87+
this.caBundle.add(item);
88+
}
89+
return (A) this;
7790
}
7891

7992
public A addAllToCaBundle(Collection<Byte> items) {
80-
if (this.caBundle == null) {this.caBundle = new ArrayList<Byte>();}
81-
for (Byte item : items) {this.caBundle.add(item);} return (A)this;
93+
if (this.caBundle == null) {
94+
this.caBundle = new ArrayList();
95+
}
96+
for (Byte item : items) {
97+
this.caBundle.add(item);
98+
}
99+
return (A) this;
82100
}
83101

84-
public A removeFromCaBundle(java.lang.Byte... items) {
85-
if (this.caBundle == null) return (A)this;
86-
for (Byte item : items) { this.caBundle.remove(item);} return (A)this;
102+
public A removeFromCaBundle(Byte... items) {
103+
if (this.caBundle == null) {
104+
return (A) this;
105+
}
106+
for (Byte item : items) {
107+
this.caBundle.remove(item);
108+
}
109+
return (A) this;
87110
}
88111

89112
public A removeAllFromCaBundle(Collection<Byte> items) {
90-
if (this.caBundle == null) return (A)this;
91-
for (Byte item : items) { this.caBundle.remove(item);} return (A)this;
113+
if (this.caBundle == null) {
114+
return (A) this;
115+
}
116+
for (Byte item : items) {
117+
this.caBundle.remove(item);
118+
}
119+
return (A) this;
92120
}
93121

94122
public boolean hasCaBundle() {
95-
return this.caBundle != null && !this.caBundle.isEmpty();
123+
return this.caBundle != null && !(this.caBundle.isEmpty());
96124
}
97125

98126
public AdmissionregistrationV1ServiceReference buildService() {
@@ -124,15 +152,15 @@ public ServiceNested<A> withNewServiceLike(AdmissionregistrationV1ServiceReferen
124152
}
125153

126154
public ServiceNested<A> editService() {
127-
return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(null));
155+
return this.withNewServiceLike(Optional.ofNullable(this.buildService()).orElse(null));
128156
}
129157

130158
public ServiceNested<A> editOrNewService() {
131-
return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(new AdmissionregistrationV1ServiceReferenceBuilder().build()));
159+
return this.withNewServiceLike(Optional.ofNullable(this.buildService()).orElse(new AdmissionregistrationV1ServiceReferenceBuilder().build()));
132160
}
133161

134162
public ServiceNested<A> editOrNewServiceLike(AdmissionregistrationV1ServiceReference item) {
135-
return withNewServiceLike(java.util.Optional.ofNullable(buildService()).orElse(item));
163+
return this.withNewServiceLike(Optional.ofNullable(this.buildService()).orElse(item));
136164
}
137165

138166
public String getUrl() {
@@ -149,26 +177,49 @@ public boolean hasUrl() {
149177
}
150178

151179
public boolean equals(Object o) {
152-
if (this == o) return true;
153-
if (o == null || getClass() != o.getClass()) return false;
154-
if (!super.equals(o)) return false;
180+
if (this == o) {
181+
return true;
182+
}
183+
if (o == null || this.getClass() != o.getClass()) {
184+
return false;
185+
}
186+
if (!(super.equals(o))) {
187+
return false;
188+
}
155189
AdmissionregistrationV1WebhookClientConfigFluent that = (AdmissionregistrationV1WebhookClientConfigFluent) o;
156-
if (!java.util.Objects.equals(caBundle, that.caBundle)) return false;
157-
if (!java.util.Objects.equals(service, that.service)) return false;
158-
if (!java.util.Objects.equals(url, that.url)) return false;
190+
if (!(Objects.equals(caBundle, that.caBundle))) {
191+
return false;
192+
}
193+
if (!(Objects.equals(service, that.service))) {
194+
return false;
195+
}
196+
if (!(Objects.equals(url, that.url))) {
197+
return false;
198+
}
159199
return true;
160200
}
161201

162202
public int hashCode() {
163-
return java.util.Objects.hash(caBundle, service, url, super.hashCode());
203+
return Objects.hash(caBundle, service, url);
164204
}
165205

166206
public String toString() {
167207
StringBuilder sb = new StringBuilder();
168208
sb.append("{");
169-
if (caBundle != null && !caBundle.isEmpty()) { sb.append("caBundle:"); sb.append(caBundle + ","); }
170-
if (service != null) { sb.append("service:"); sb.append(service + ","); }
171-
if (url != null) { sb.append("url:"); sb.append(url); }
209+
if (!(caBundle == null) && !(caBundle.isEmpty())) {
210+
sb.append("caBundle:");
211+
sb.append(caBundle);
212+
sb.append(",");
213+
}
214+
if (!(service == null)) {
215+
sb.append("service:");
216+
sb.append(service);
217+
sb.append(",");
218+
}
219+
if (!(url == null)) {
220+
sb.append("url:");
221+
sb.append(url);
222+
}
172223
sb.append("}");
173224
return sb.toString();
174225
}

fluent/src/main/java/io/kubernetes/client/openapi/models/ApiextensionsV1ServiceReferenceBuilder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.kubernetes.client.openapi.models;
22

33
import io.kubernetes.client.fluent.VisitableBuilder;
4+
import java.lang.Object;
45
public class ApiextensionsV1ServiceReferenceBuilder extends ApiextensionsV1ServiceReferenceFluent<ApiextensionsV1ServiceReferenceBuilder> implements VisitableBuilder<ApiextensionsV1ServiceReference,ApiextensionsV1ServiceReferenceBuilder>{
56
public ApiextensionsV1ServiceReferenceBuilder() {
67
this(new ApiextensionsV1ServiceReference());

0 commit comments

Comments
 (0)