11package io .kubernetes .client .openapi .models ;
22
3+ import java .lang .StringBuilder ;
4+ import java .util .Optional ;
35import java .lang .SuppressWarnings ;
46import io .kubernetes .client .fluent .Nested ;
57import java .util .ArrayList ;
68import java .lang .String ;
79import java .lang .Byte ;
810import io .kubernetes .client .fluent .BaseFluent ;
11+ import java .util .Objects ;
912import java .util .Collection ;
1013import java .lang .Object ;
1114import java .util .List ;
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 }
0 commit comments