• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 // Generated by the protocol buffer compiler.  DO NOT EDIT!
17 // source: google/container/v1/cluster_service.proto
18 
19 package com.google.container.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * The authentication information for accessing the master endpoint.
26  * Authentication can be done using HTTP basic auth or using client
27  * certificates.
28  * </pre>
29  *
30  * Protobuf type {@code google.container.v1.MasterAuth}
31  */
32 public final class MasterAuth extends com.google.protobuf.GeneratedMessageV3
33     implements
34     // @@protoc_insertion_point(message_implements:google.container.v1.MasterAuth)
35     MasterAuthOrBuilder {
36   private static final long serialVersionUID = 0L;
37   // Use MasterAuth.newBuilder() to construct.
MasterAuth(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)38   private MasterAuth(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
39     super(builder);
40   }
41 
MasterAuth()42   private MasterAuth() {
43     username_ = "";
44     password_ = "";
45     clusterCaCertificate_ = "";
46     clientCertificate_ = "";
47     clientKey_ = "";
48   }
49 
50   @java.lang.Override
51   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)52   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
53     return new MasterAuth();
54   }
55 
56   @java.lang.Override
getUnknownFields()57   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
58     return this.unknownFields;
59   }
60 
getDescriptor()61   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
62     return com.google.container.v1.ClusterServiceProto
63         .internal_static_google_container_v1_MasterAuth_descriptor;
64   }
65 
66   @java.lang.Override
67   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()68       internalGetFieldAccessorTable() {
69     return com.google.container.v1.ClusterServiceProto
70         .internal_static_google_container_v1_MasterAuth_fieldAccessorTable
71         .ensureFieldAccessorsInitialized(
72             com.google.container.v1.MasterAuth.class,
73             com.google.container.v1.MasterAuth.Builder.class);
74   }
75 
76   public static final int USERNAME_FIELD_NUMBER = 1;
77 
78   @SuppressWarnings("serial")
79   private volatile java.lang.Object username_ = "";
80   /**
81    *
82    *
83    * <pre>
84    * The username to use for HTTP basic authentication to the master endpoint.
85    * For clusters v1.6.0 and later, basic authentication can be disabled by
86    * leaving username unspecified (or setting it to the empty string).
87    * Warning: basic authentication is deprecated, and will be removed in GKE
88    * control plane versions 1.19 and newer. For a list of recommended
89    * authentication methods, see:
90    * https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication
91    * </pre>
92    *
93    * <code>string username = 1 [deprecated = true];</code>
94    *
95    * @deprecated google.container.v1.MasterAuth.username is deprecated. See
96    *     google/container/v1/cluster_service.proto;l=1054
97    * @return The username.
98    */
99   @java.lang.Override
100   @java.lang.Deprecated
getUsername()101   public java.lang.String getUsername() {
102     java.lang.Object ref = username_;
103     if (ref instanceof java.lang.String) {
104       return (java.lang.String) ref;
105     } else {
106       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
107       java.lang.String s = bs.toStringUtf8();
108       username_ = s;
109       return s;
110     }
111   }
112   /**
113    *
114    *
115    * <pre>
116    * The username to use for HTTP basic authentication to the master endpoint.
117    * For clusters v1.6.0 and later, basic authentication can be disabled by
118    * leaving username unspecified (or setting it to the empty string).
119    * Warning: basic authentication is deprecated, and will be removed in GKE
120    * control plane versions 1.19 and newer. For a list of recommended
121    * authentication methods, see:
122    * https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication
123    * </pre>
124    *
125    * <code>string username = 1 [deprecated = true];</code>
126    *
127    * @deprecated google.container.v1.MasterAuth.username is deprecated. See
128    *     google/container/v1/cluster_service.proto;l=1054
129    * @return The bytes for username.
130    */
131   @java.lang.Override
132   @java.lang.Deprecated
getUsernameBytes()133   public com.google.protobuf.ByteString getUsernameBytes() {
134     java.lang.Object ref = username_;
135     if (ref instanceof java.lang.String) {
136       com.google.protobuf.ByteString b =
137           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
138       username_ = b;
139       return b;
140     } else {
141       return (com.google.protobuf.ByteString) ref;
142     }
143   }
144 
145   public static final int PASSWORD_FIELD_NUMBER = 2;
146 
147   @SuppressWarnings("serial")
148   private volatile java.lang.Object password_ = "";
149   /**
150    *
151    *
152    * <pre>
153    * The password to use for HTTP basic authentication to the master endpoint.
154    * Because the master endpoint is open to the Internet, you should create a
155    * strong password.  If a password is provided for cluster creation, username
156    * must be non-empty.
157    * Warning: basic authentication is deprecated, and will be removed in GKE
158    * control plane versions 1.19 and newer. For a list of recommended
159    * authentication methods, see:
160    * https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication
161    * </pre>
162    *
163    * <code>string password = 2 [deprecated = true];</code>
164    *
165    * @deprecated google.container.v1.MasterAuth.password is deprecated. See
166    *     google/container/v1/cluster_service.proto;l=1065
167    * @return The password.
168    */
169   @java.lang.Override
170   @java.lang.Deprecated
getPassword()171   public java.lang.String getPassword() {
172     java.lang.Object ref = password_;
173     if (ref instanceof java.lang.String) {
174       return (java.lang.String) ref;
175     } else {
176       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
177       java.lang.String s = bs.toStringUtf8();
178       password_ = s;
179       return s;
180     }
181   }
182   /**
183    *
184    *
185    * <pre>
186    * The password to use for HTTP basic authentication to the master endpoint.
187    * Because the master endpoint is open to the Internet, you should create a
188    * strong password.  If a password is provided for cluster creation, username
189    * must be non-empty.
190    * Warning: basic authentication is deprecated, and will be removed in GKE
191    * control plane versions 1.19 and newer. For a list of recommended
192    * authentication methods, see:
193    * https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication
194    * </pre>
195    *
196    * <code>string password = 2 [deprecated = true];</code>
197    *
198    * @deprecated google.container.v1.MasterAuth.password is deprecated. See
199    *     google/container/v1/cluster_service.proto;l=1065
200    * @return The bytes for password.
201    */
202   @java.lang.Override
203   @java.lang.Deprecated
getPasswordBytes()204   public com.google.protobuf.ByteString getPasswordBytes() {
205     java.lang.Object ref = password_;
206     if (ref instanceof java.lang.String) {
207       com.google.protobuf.ByteString b =
208           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
209       password_ = b;
210       return b;
211     } else {
212       return (com.google.protobuf.ByteString) ref;
213     }
214   }
215 
216   public static final int CLIENT_CERTIFICATE_CONFIG_FIELD_NUMBER = 3;
217   private com.google.container.v1.ClientCertificateConfig clientCertificateConfig_;
218   /**
219    *
220    *
221    * <pre>
222    * Configuration for client certificate authentication on the cluster. For
223    * clusters before v1.12, if no configuration is specified, a client
224    * certificate is issued.
225    * </pre>
226    *
227    * <code>.google.container.v1.ClientCertificateConfig client_certificate_config = 3;</code>
228    *
229    * @return Whether the clientCertificateConfig field is set.
230    */
231   @java.lang.Override
hasClientCertificateConfig()232   public boolean hasClientCertificateConfig() {
233     return clientCertificateConfig_ != null;
234   }
235   /**
236    *
237    *
238    * <pre>
239    * Configuration for client certificate authentication on the cluster. For
240    * clusters before v1.12, if no configuration is specified, a client
241    * certificate is issued.
242    * </pre>
243    *
244    * <code>.google.container.v1.ClientCertificateConfig client_certificate_config = 3;</code>
245    *
246    * @return The clientCertificateConfig.
247    */
248   @java.lang.Override
getClientCertificateConfig()249   public com.google.container.v1.ClientCertificateConfig getClientCertificateConfig() {
250     return clientCertificateConfig_ == null
251         ? com.google.container.v1.ClientCertificateConfig.getDefaultInstance()
252         : clientCertificateConfig_;
253   }
254   /**
255    *
256    *
257    * <pre>
258    * Configuration for client certificate authentication on the cluster. For
259    * clusters before v1.12, if no configuration is specified, a client
260    * certificate is issued.
261    * </pre>
262    *
263    * <code>.google.container.v1.ClientCertificateConfig client_certificate_config = 3;</code>
264    */
265   @java.lang.Override
266   public com.google.container.v1.ClientCertificateConfigOrBuilder
getClientCertificateConfigOrBuilder()267       getClientCertificateConfigOrBuilder() {
268     return clientCertificateConfig_ == null
269         ? com.google.container.v1.ClientCertificateConfig.getDefaultInstance()
270         : clientCertificateConfig_;
271   }
272 
273   public static final int CLUSTER_CA_CERTIFICATE_FIELD_NUMBER = 100;
274 
275   @SuppressWarnings("serial")
276   private volatile java.lang.Object clusterCaCertificate_ = "";
277   /**
278    *
279    *
280    * <pre>
281    * [Output only] Base64-encoded public certificate that is the root of
282    * trust for the cluster.
283    * </pre>
284    *
285    * <code>string cluster_ca_certificate = 100;</code>
286    *
287    * @return The clusterCaCertificate.
288    */
289   @java.lang.Override
getClusterCaCertificate()290   public java.lang.String getClusterCaCertificate() {
291     java.lang.Object ref = clusterCaCertificate_;
292     if (ref instanceof java.lang.String) {
293       return (java.lang.String) ref;
294     } else {
295       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
296       java.lang.String s = bs.toStringUtf8();
297       clusterCaCertificate_ = s;
298       return s;
299     }
300   }
301   /**
302    *
303    *
304    * <pre>
305    * [Output only] Base64-encoded public certificate that is the root of
306    * trust for the cluster.
307    * </pre>
308    *
309    * <code>string cluster_ca_certificate = 100;</code>
310    *
311    * @return The bytes for clusterCaCertificate.
312    */
313   @java.lang.Override
getClusterCaCertificateBytes()314   public com.google.protobuf.ByteString getClusterCaCertificateBytes() {
315     java.lang.Object ref = clusterCaCertificate_;
316     if (ref instanceof java.lang.String) {
317       com.google.protobuf.ByteString b =
318           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
319       clusterCaCertificate_ = b;
320       return b;
321     } else {
322       return (com.google.protobuf.ByteString) ref;
323     }
324   }
325 
326   public static final int CLIENT_CERTIFICATE_FIELD_NUMBER = 101;
327 
328   @SuppressWarnings("serial")
329   private volatile java.lang.Object clientCertificate_ = "";
330   /**
331    *
332    *
333    * <pre>
334    * [Output only] Base64-encoded public certificate used by clients to
335    * authenticate to the cluster endpoint.
336    * </pre>
337    *
338    * <code>string client_certificate = 101;</code>
339    *
340    * @return The clientCertificate.
341    */
342   @java.lang.Override
getClientCertificate()343   public java.lang.String getClientCertificate() {
344     java.lang.Object ref = clientCertificate_;
345     if (ref instanceof java.lang.String) {
346       return (java.lang.String) ref;
347     } else {
348       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
349       java.lang.String s = bs.toStringUtf8();
350       clientCertificate_ = s;
351       return s;
352     }
353   }
354   /**
355    *
356    *
357    * <pre>
358    * [Output only] Base64-encoded public certificate used by clients to
359    * authenticate to the cluster endpoint.
360    * </pre>
361    *
362    * <code>string client_certificate = 101;</code>
363    *
364    * @return The bytes for clientCertificate.
365    */
366   @java.lang.Override
getClientCertificateBytes()367   public com.google.protobuf.ByteString getClientCertificateBytes() {
368     java.lang.Object ref = clientCertificate_;
369     if (ref instanceof java.lang.String) {
370       com.google.protobuf.ByteString b =
371           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
372       clientCertificate_ = b;
373       return b;
374     } else {
375       return (com.google.protobuf.ByteString) ref;
376     }
377   }
378 
379   public static final int CLIENT_KEY_FIELD_NUMBER = 102;
380 
381   @SuppressWarnings("serial")
382   private volatile java.lang.Object clientKey_ = "";
383   /**
384    *
385    *
386    * <pre>
387    * [Output only] Base64-encoded private key used by clients to authenticate
388    * to the cluster endpoint.
389    * </pre>
390    *
391    * <code>string client_key = 102;</code>
392    *
393    * @return The clientKey.
394    */
395   @java.lang.Override
getClientKey()396   public java.lang.String getClientKey() {
397     java.lang.Object ref = clientKey_;
398     if (ref instanceof java.lang.String) {
399       return (java.lang.String) ref;
400     } else {
401       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
402       java.lang.String s = bs.toStringUtf8();
403       clientKey_ = s;
404       return s;
405     }
406   }
407   /**
408    *
409    *
410    * <pre>
411    * [Output only] Base64-encoded private key used by clients to authenticate
412    * to the cluster endpoint.
413    * </pre>
414    *
415    * <code>string client_key = 102;</code>
416    *
417    * @return The bytes for clientKey.
418    */
419   @java.lang.Override
getClientKeyBytes()420   public com.google.protobuf.ByteString getClientKeyBytes() {
421     java.lang.Object ref = clientKey_;
422     if (ref instanceof java.lang.String) {
423       com.google.protobuf.ByteString b =
424           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
425       clientKey_ = b;
426       return b;
427     } else {
428       return (com.google.protobuf.ByteString) ref;
429     }
430   }
431 
432   private byte memoizedIsInitialized = -1;
433 
434   @java.lang.Override
isInitialized()435   public final boolean isInitialized() {
436     byte isInitialized = memoizedIsInitialized;
437     if (isInitialized == 1) return true;
438     if (isInitialized == 0) return false;
439 
440     memoizedIsInitialized = 1;
441     return true;
442   }
443 
444   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)445   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
446     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(username_)) {
447       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_);
448     }
449     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) {
450       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, password_);
451     }
452     if (clientCertificateConfig_ != null) {
453       output.writeMessage(3, getClientCertificateConfig());
454     }
455     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterCaCertificate_)) {
456       com.google.protobuf.GeneratedMessageV3.writeString(output, 100, clusterCaCertificate_);
457     }
458     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientCertificate_)) {
459       com.google.protobuf.GeneratedMessageV3.writeString(output, 101, clientCertificate_);
460     }
461     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientKey_)) {
462       com.google.protobuf.GeneratedMessageV3.writeString(output, 102, clientKey_);
463     }
464     getUnknownFields().writeTo(output);
465   }
466 
467   @java.lang.Override
getSerializedSize()468   public int getSerializedSize() {
469     int size = memoizedSize;
470     if (size != -1) return size;
471 
472     size = 0;
473     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(username_)) {
474       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_);
475     }
476     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) {
477       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, password_);
478     }
479     if (clientCertificateConfig_ != null) {
480       size +=
481           com.google.protobuf.CodedOutputStream.computeMessageSize(3, getClientCertificateConfig());
482     }
483     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterCaCertificate_)) {
484       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(100, clusterCaCertificate_);
485     }
486     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientCertificate_)) {
487       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(101, clientCertificate_);
488     }
489     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientKey_)) {
490       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(102, clientKey_);
491     }
492     size += getUnknownFields().getSerializedSize();
493     memoizedSize = size;
494     return size;
495   }
496 
497   @java.lang.Override
equals(final java.lang.Object obj)498   public boolean equals(final java.lang.Object obj) {
499     if (obj == this) {
500       return true;
501     }
502     if (!(obj instanceof com.google.container.v1.MasterAuth)) {
503       return super.equals(obj);
504     }
505     com.google.container.v1.MasterAuth other = (com.google.container.v1.MasterAuth) obj;
506 
507     if (!getUsername().equals(other.getUsername())) return false;
508     if (!getPassword().equals(other.getPassword())) return false;
509     if (hasClientCertificateConfig() != other.hasClientCertificateConfig()) return false;
510     if (hasClientCertificateConfig()) {
511       if (!getClientCertificateConfig().equals(other.getClientCertificateConfig())) return false;
512     }
513     if (!getClusterCaCertificate().equals(other.getClusterCaCertificate())) return false;
514     if (!getClientCertificate().equals(other.getClientCertificate())) return false;
515     if (!getClientKey().equals(other.getClientKey())) return false;
516     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
517     return true;
518   }
519 
520   @java.lang.Override
hashCode()521   public int hashCode() {
522     if (memoizedHashCode != 0) {
523       return memoizedHashCode;
524     }
525     int hash = 41;
526     hash = (19 * hash) + getDescriptor().hashCode();
527     hash = (37 * hash) + USERNAME_FIELD_NUMBER;
528     hash = (53 * hash) + getUsername().hashCode();
529     hash = (37 * hash) + PASSWORD_FIELD_NUMBER;
530     hash = (53 * hash) + getPassword().hashCode();
531     if (hasClientCertificateConfig()) {
532       hash = (37 * hash) + CLIENT_CERTIFICATE_CONFIG_FIELD_NUMBER;
533       hash = (53 * hash) + getClientCertificateConfig().hashCode();
534     }
535     hash = (37 * hash) + CLUSTER_CA_CERTIFICATE_FIELD_NUMBER;
536     hash = (53 * hash) + getClusterCaCertificate().hashCode();
537     hash = (37 * hash) + CLIENT_CERTIFICATE_FIELD_NUMBER;
538     hash = (53 * hash) + getClientCertificate().hashCode();
539     hash = (37 * hash) + CLIENT_KEY_FIELD_NUMBER;
540     hash = (53 * hash) + getClientKey().hashCode();
541     hash = (29 * hash) + getUnknownFields().hashCode();
542     memoizedHashCode = hash;
543     return hash;
544   }
545 
parseFrom(java.nio.ByteBuffer data)546   public static com.google.container.v1.MasterAuth parseFrom(java.nio.ByteBuffer data)
547       throws com.google.protobuf.InvalidProtocolBufferException {
548     return PARSER.parseFrom(data);
549   }
550 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)551   public static com.google.container.v1.MasterAuth parseFrom(
552       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
553       throws com.google.protobuf.InvalidProtocolBufferException {
554     return PARSER.parseFrom(data, extensionRegistry);
555   }
556 
parseFrom(com.google.protobuf.ByteString data)557   public static com.google.container.v1.MasterAuth parseFrom(com.google.protobuf.ByteString data)
558       throws com.google.protobuf.InvalidProtocolBufferException {
559     return PARSER.parseFrom(data);
560   }
561 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)562   public static com.google.container.v1.MasterAuth parseFrom(
563       com.google.protobuf.ByteString data,
564       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
565       throws com.google.protobuf.InvalidProtocolBufferException {
566     return PARSER.parseFrom(data, extensionRegistry);
567   }
568 
parseFrom(byte[] data)569   public static com.google.container.v1.MasterAuth parseFrom(byte[] data)
570       throws com.google.protobuf.InvalidProtocolBufferException {
571     return PARSER.parseFrom(data);
572   }
573 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)574   public static com.google.container.v1.MasterAuth parseFrom(
575       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
576       throws com.google.protobuf.InvalidProtocolBufferException {
577     return PARSER.parseFrom(data, extensionRegistry);
578   }
579 
parseFrom(java.io.InputStream input)580   public static com.google.container.v1.MasterAuth parseFrom(java.io.InputStream input)
581       throws java.io.IOException {
582     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
583   }
584 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)585   public static com.google.container.v1.MasterAuth parseFrom(
586       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
587       throws java.io.IOException {
588     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
589         PARSER, input, extensionRegistry);
590   }
591 
parseDelimitedFrom(java.io.InputStream input)592   public static com.google.container.v1.MasterAuth parseDelimitedFrom(java.io.InputStream input)
593       throws java.io.IOException {
594     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
595   }
596 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)597   public static com.google.container.v1.MasterAuth parseDelimitedFrom(
598       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
599       throws java.io.IOException {
600     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
601         PARSER, input, extensionRegistry);
602   }
603 
parseFrom( com.google.protobuf.CodedInputStream input)604   public static com.google.container.v1.MasterAuth parseFrom(
605       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
606     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
607   }
608 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)609   public static com.google.container.v1.MasterAuth parseFrom(
610       com.google.protobuf.CodedInputStream input,
611       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
612       throws java.io.IOException {
613     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
614         PARSER, input, extensionRegistry);
615   }
616 
617   @java.lang.Override
newBuilderForType()618   public Builder newBuilderForType() {
619     return newBuilder();
620   }
621 
newBuilder()622   public static Builder newBuilder() {
623     return DEFAULT_INSTANCE.toBuilder();
624   }
625 
newBuilder(com.google.container.v1.MasterAuth prototype)626   public static Builder newBuilder(com.google.container.v1.MasterAuth prototype) {
627     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
628   }
629 
630   @java.lang.Override
toBuilder()631   public Builder toBuilder() {
632     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
633   }
634 
635   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)636   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
637     Builder builder = new Builder(parent);
638     return builder;
639   }
640   /**
641    *
642    *
643    * <pre>
644    * The authentication information for accessing the master endpoint.
645    * Authentication can be done using HTTP basic auth or using client
646    * certificates.
647    * </pre>
648    *
649    * Protobuf type {@code google.container.v1.MasterAuth}
650    */
651   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
652       implements
653       // @@protoc_insertion_point(builder_implements:google.container.v1.MasterAuth)
654       com.google.container.v1.MasterAuthOrBuilder {
getDescriptor()655     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
656       return com.google.container.v1.ClusterServiceProto
657           .internal_static_google_container_v1_MasterAuth_descriptor;
658     }
659 
660     @java.lang.Override
661     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()662         internalGetFieldAccessorTable() {
663       return com.google.container.v1.ClusterServiceProto
664           .internal_static_google_container_v1_MasterAuth_fieldAccessorTable
665           .ensureFieldAccessorsInitialized(
666               com.google.container.v1.MasterAuth.class,
667               com.google.container.v1.MasterAuth.Builder.class);
668     }
669 
670     // Construct using com.google.container.v1.MasterAuth.newBuilder()
Builder()671     private Builder() {}
672 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)673     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
674       super(parent);
675     }
676 
677     @java.lang.Override
clear()678     public Builder clear() {
679       super.clear();
680       bitField0_ = 0;
681       username_ = "";
682       password_ = "";
683       clientCertificateConfig_ = null;
684       if (clientCertificateConfigBuilder_ != null) {
685         clientCertificateConfigBuilder_.dispose();
686         clientCertificateConfigBuilder_ = null;
687       }
688       clusterCaCertificate_ = "";
689       clientCertificate_ = "";
690       clientKey_ = "";
691       return this;
692     }
693 
694     @java.lang.Override
getDescriptorForType()695     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
696       return com.google.container.v1.ClusterServiceProto
697           .internal_static_google_container_v1_MasterAuth_descriptor;
698     }
699 
700     @java.lang.Override
getDefaultInstanceForType()701     public com.google.container.v1.MasterAuth getDefaultInstanceForType() {
702       return com.google.container.v1.MasterAuth.getDefaultInstance();
703     }
704 
705     @java.lang.Override
build()706     public com.google.container.v1.MasterAuth build() {
707       com.google.container.v1.MasterAuth result = buildPartial();
708       if (!result.isInitialized()) {
709         throw newUninitializedMessageException(result);
710       }
711       return result;
712     }
713 
714     @java.lang.Override
buildPartial()715     public com.google.container.v1.MasterAuth buildPartial() {
716       com.google.container.v1.MasterAuth result = new com.google.container.v1.MasterAuth(this);
717       if (bitField0_ != 0) {
718         buildPartial0(result);
719       }
720       onBuilt();
721       return result;
722     }
723 
buildPartial0(com.google.container.v1.MasterAuth result)724     private void buildPartial0(com.google.container.v1.MasterAuth result) {
725       int from_bitField0_ = bitField0_;
726       if (((from_bitField0_ & 0x00000001) != 0)) {
727         result.username_ = username_;
728       }
729       if (((from_bitField0_ & 0x00000002) != 0)) {
730         result.password_ = password_;
731       }
732       if (((from_bitField0_ & 0x00000004) != 0)) {
733         result.clientCertificateConfig_ =
734             clientCertificateConfigBuilder_ == null
735                 ? clientCertificateConfig_
736                 : clientCertificateConfigBuilder_.build();
737       }
738       if (((from_bitField0_ & 0x00000008) != 0)) {
739         result.clusterCaCertificate_ = clusterCaCertificate_;
740       }
741       if (((from_bitField0_ & 0x00000010) != 0)) {
742         result.clientCertificate_ = clientCertificate_;
743       }
744       if (((from_bitField0_ & 0x00000020) != 0)) {
745         result.clientKey_ = clientKey_;
746       }
747     }
748 
749     @java.lang.Override
clone()750     public Builder clone() {
751       return super.clone();
752     }
753 
754     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)755     public Builder setField(
756         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
757       return super.setField(field, value);
758     }
759 
760     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)761     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
762       return super.clearField(field);
763     }
764 
765     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)766     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
767       return super.clearOneof(oneof);
768     }
769 
770     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)771     public Builder setRepeatedField(
772         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
773       return super.setRepeatedField(field, index, value);
774     }
775 
776     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)777     public Builder addRepeatedField(
778         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
779       return super.addRepeatedField(field, value);
780     }
781 
782     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)783     public Builder mergeFrom(com.google.protobuf.Message other) {
784       if (other instanceof com.google.container.v1.MasterAuth) {
785         return mergeFrom((com.google.container.v1.MasterAuth) other);
786       } else {
787         super.mergeFrom(other);
788         return this;
789       }
790     }
791 
mergeFrom(com.google.container.v1.MasterAuth other)792     public Builder mergeFrom(com.google.container.v1.MasterAuth other) {
793       if (other == com.google.container.v1.MasterAuth.getDefaultInstance()) return this;
794       if (!other.getUsername().isEmpty()) {
795         username_ = other.username_;
796         bitField0_ |= 0x00000001;
797         onChanged();
798       }
799       if (!other.getPassword().isEmpty()) {
800         password_ = other.password_;
801         bitField0_ |= 0x00000002;
802         onChanged();
803       }
804       if (other.hasClientCertificateConfig()) {
805         mergeClientCertificateConfig(other.getClientCertificateConfig());
806       }
807       if (!other.getClusterCaCertificate().isEmpty()) {
808         clusterCaCertificate_ = other.clusterCaCertificate_;
809         bitField0_ |= 0x00000008;
810         onChanged();
811       }
812       if (!other.getClientCertificate().isEmpty()) {
813         clientCertificate_ = other.clientCertificate_;
814         bitField0_ |= 0x00000010;
815         onChanged();
816       }
817       if (!other.getClientKey().isEmpty()) {
818         clientKey_ = other.clientKey_;
819         bitField0_ |= 0x00000020;
820         onChanged();
821       }
822       this.mergeUnknownFields(other.getUnknownFields());
823       onChanged();
824       return this;
825     }
826 
827     @java.lang.Override
isInitialized()828     public final boolean isInitialized() {
829       return true;
830     }
831 
832     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)833     public Builder mergeFrom(
834         com.google.protobuf.CodedInputStream input,
835         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
836         throws java.io.IOException {
837       if (extensionRegistry == null) {
838         throw new java.lang.NullPointerException();
839       }
840       try {
841         boolean done = false;
842         while (!done) {
843           int tag = input.readTag();
844           switch (tag) {
845             case 0:
846               done = true;
847               break;
848             case 10:
849               {
850                 username_ = input.readStringRequireUtf8();
851                 bitField0_ |= 0x00000001;
852                 break;
853               } // case 10
854             case 18:
855               {
856                 password_ = input.readStringRequireUtf8();
857                 bitField0_ |= 0x00000002;
858                 break;
859               } // case 18
860             case 26:
861               {
862                 input.readMessage(
863                     getClientCertificateConfigFieldBuilder().getBuilder(), extensionRegistry);
864                 bitField0_ |= 0x00000004;
865                 break;
866               } // case 26
867             case 802:
868               {
869                 clusterCaCertificate_ = input.readStringRequireUtf8();
870                 bitField0_ |= 0x00000008;
871                 break;
872               } // case 802
873             case 810:
874               {
875                 clientCertificate_ = input.readStringRequireUtf8();
876                 bitField0_ |= 0x00000010;
877                 break;
878               } // case 810
879             case 818:
880               {
881                 clientKey_ = input.readStringRequireUtf8();
882                 bitField0_ |= 0x00000020;
883                 break;
884               } // case 818
885             default:
886               {
887                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
888                   done = true; // was an endgroup tag
889                 }
890                 break;
891               } // default:
892           } // switch (tag)
893         } // while (!done)
894       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
895         throw e.unwrapIOException();
896       } finally {
897         onChanged();
898       } // finally
899       return this;
900     }
901 
902     private int bitField0_;
903 
904     private java.lang.Object username_ = "";
905     /**
906      *
907      *
908      * <pre>
909      * The username to use for HTTP basic authentication to the master endpoint.
910      * For clusters v1.6.0 and later, basic authentication can be disabled by
911      * leaving username unspecified (or setting it to the empty string).
912      * Warning: basic authentication is deprecated, and will be removed in GKE
913      * control plane versions 1.19 and newer. For a list of recommended
914      * authentication methods, see:
915      * https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication
916      * </pre>
917      *
918      * <code>string username = 1 [deprecated = true];</code>
919      *
920      * @deprecated google.container.v1.MasterAuth.username is deprecated. See
921      *     google/container/v1/cluster_service.proto;l=1054
922      * @return The username.
923      */
924     @java.lang.Deprecated
getUsername()925     public java.lang.String getUsername() {
926       java.lang.Object ref = username_;
927       if (!(ref instanceof java.lang.String)) {
928         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
929         java.lang.String s = bs.toStringUtf8();
930         username_ = s;
931         return s;
932       } else {
933         return (java.lang.String) ref;
934       }
935     }
936     /**
937      *
938      *
939      * <pre>
940      * The username to use for HTTP basic authentication to the master endpoint.
941      * For clusters v1.6.0 and later, basic authentication can be disabled by
942      * leaving username unspecified (or setting it to the empty string).
943      * Warning: basic authentication is deprecated, and will be removed in GKE
944      * control plane versions 1.19 and newer. For a list of recommended
945      * authentication methods, see:
946      * https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication
947      * </pre>
948      *
949      * <code>string username = 1 [deprecated = true];</code>
950      *
951      * @deprecated google.container.v1.MasterAuth.username is deprecated. See
952      *     google/container/v1/cluster_service.proto;l=1054
953      * @return The bytes for username.
954      */
955     @java.lang.Deprecated
getUsernameBytes()956     public com.google.protobuf.ByteString getUsernameBytes() {
957       java.lang.Object ref = username_;
958       if (ref instanceof String) {
959         com.google.protobuf.ByteString b =
960             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
961         username_ = b;
962         return b;
963       } else {
964         return (com.google.protobuf.ByteString) ref;
965       }
966     }
967     /**
968      *
969      *
970      * <pre>
971      * The username to use for HTTP basic authentication to the master endpoint.
972      * For clusters v1.6.0 and later, basic authentication can be disabled by
973      * leaving username unspecified (or setting it to the empty string).
974      * Warning: basic authentication is deprecated, and will be removed in GKE
975      * control plane versions 1.19 and newer. For a list of recommended
976      * authentication methods, see:
977      * https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication
978      * </pre>
979      *
980      * <code>string username = 1 [deprecated = true];</code>
981      *
982      * @deprecated google.container.v1.MasterAuth.username is deprecated. See
983      *     google/container/v1/cluster_service.proto;l=1054
984      * @param value The username to set.
985      * @return This builder for chaining.
986      */
987     @java.lang.Deprecated
setUsername(java.lang.String value)988     public Builder setUsername(java.lang.String value) {
989       if (value == null) {
990         throw new NullPointerException();
991       }
992       username_ = value;
993       bitField0_ |= 0x00000001;
994       onChanged();
995       return this;
996     }
997     /**
998      *
999      *
1000      * <pre>
1001      * The username to use for HTTP basic authentication to the master endpoint.
1002      * For clusters v1.6.0 and later, basic authentication can be disabled by
1003      * leaving username unspecified (or setting it to the empty string).
1004      * Warning: basic authentication is deprecated, and will be removed in GKE
1005      * control plane versions 1.19 and newer. For a list of recommended
1006      * authentication methods, see:
1007      * https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication
1008      * </pre>
1009      *
1010      * <code>string username = 1 [deprecated = true];</code>
1011      *
1012      * @deprecated google.container.v1.MasterAuth.username is deprecated. See
1013      *     google/container/v1/cluster_service.proto;l=1054
1014      * @return This builder for chaining.
1015      */
1016     @java.lang.Deprecated
clearUsername()1017     public Builder clearUsername() {
1018       username_ = getDefaultInstance().getUsername();
1019       bitField0_ = (bitField0_ & ~0x00000001);
1020       onChanged();
1021       return this;
1022     }
1023     /**
1024      *
1025      *
1026      * <pre>
1027      * The username to use for HTTP basic authentication to the master endpoint.
1028      * For clusters v1.6.0 and later, basic authentication can be disabled by
1029      * leaving username unspecified (or setting it to the empty string).
1030      * Warning: basic authentication is deprecated, and will be removed in GKE
1031      * control plane versions 1.19 and newer. For a list of recommended
1032      * authentication methods, see:
1033      * https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication
1034      * </pre>
1035      *
1036      * <code>string username = 1 [deprecated = true];</code>
1037      *
1038      * @deprecated google.container.v1.MasterAuth.username is deprecated. See
1039      *     google/container/v1/cluster_service.proto;l=1054
1040      * @param value The bytes for username to set.
1041      * @return This builder for chaining.
1042      */
1043     @java.lang.Deprecated
setUsernameBytes(com.google.protobuf.ByteString value)1044     public Builder setUsernameBytes(com.google.protobuf.ByteString value) {
1045       if (value == null) {
1046         throw new NullPointerException();
1047       }
1048       checkByteStringIsUtf8(value);
1049       username_ = value;
1050       bitField0_ |= 0x00000001;
1051       onChanged();
1052       return this;
1053     }
1054 
1055     private java.lang.Object password_ = "";
1056     /**
1057      *
1058      *
1059      * <pre>
1060      * The password to use for HTTP basic authentication to the master endpoint.
1061      * Because the master endpoint is open to the Internet, you should create a
1062      * strong password.  If a password is provided for cluster creation, username
1063      * must be non-empty.
1064      * Warning: basic authentication is deprecated, and will be removed in GKE
1065      * control plane versions 1.19 and newer. For a list of recommended
1066      * authentication methods, see:
1067      * https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication
1068      * </pre>
1069      *
1070      * <code>string password = 2 [deprecated = true];</code>
1071      *
1072      * @deprecated google.container.v1.MasterAuth.password is deprecated. See
1073      *     google/container/v1/cluster_service.proto;l=1065
1074      * @return The password.
1075      */
1076     @java.lang.Deprecated
getPassword()1077     public java.lang.String getPassword() {
1078       java.lang.Object ref = password_;
1079       if (!(ref instanceof java.lang.String)) {
1080         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1081         java.lang.String s = bs.toStringUtf8();
1082         password_ = s;
1083         return s;
1084       } else {
1085         return (java.lang.String) ref;
1086       }
1087     }
1088     /**
1089      *
1090      *
1091      * <pre>
1092      * The password to use for HTTP basic authentication to the master endpoint.
1093      * Because the master endpoint is open to the Internet, you should create a
1094      * strong password.  If a password is provided for cluster creation, username
1095      * must be non-empty.
1096      * Warning: basic authentication is deprecated, and will be removed in GKE
1097      * control plane versions 1.19 and newer. For a list of recommended
1098      * authentication methods, see:
1099      * https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication
1100      * </pre>
1101      *
1102      * <code>string password = 2 [deprecated = true];</code>
1103      *
1104      * @deprecated google.container.v1.MasterAuth.password is deprecated. See
1105      *     google/container/v1/cluster_service.proto;l=1065
1106      * @return The bytes for password.
1107      */
1108     @java.lang.Deprecated
getPasswordBytes()1109     public com.google.protobuf.ByteString getPasswordBytes() {
1110       java.lang.Object ref = password_;
1111       if (ref instanceof String) {
1112         com.google.protobuf.ByteString b =
1113             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1114         password_ = b;
1115         return b;
1116       } else {
1117         return (com.google.protobuf.ByteString) ref;
1118       }
1119     }
1120     /**
1121      *
1122      *
1123      * <pre>
1124      * The password to use for HTTP basic authentication to the master endpoint.
1125      * Because the master endpoint is open to the Internet, you should create a
1126      * strong password.  If a password is provided for cluster creation, username
1127      * must be non-empty.
1128      * Warning: basic authentication is deprecated, and will be removed in GKE
1129      * control plane versions 1.19 and newer. For a list of recommended
1130      * authentication methods, see:
1131      * https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication
1132      * </pre>
1133      *
1134      * <code>string password = 2 [deprecated = true];</code>
1135      *
1136      * @deprecated google.container.v1.MasterAuth.password is deprecated. See
1137      *     google/container/v1/cluster_service.proto;l=1065
1138      * @param value The password to set.
1139      * @return This builder for chaining.
1140      */
1141     @java.lang.Deprecated
setPassword(java.lang.String value)1142     public Builder setPassword(java.lang.String value) {
1143       if (value == null) {
1144         throw new NullPointerException();
1145       }
1146       password_ = value;
1147       bitField0_ |= 0x00000002;
1148       onChanged();
1149       return this;
1150     }
1151     /**
1152      *
1153      *
1154      * <pre>
1155      * The password to use for HTTP basic authentication to the master endpoint.
1156      * Because the master endpoint is open to the Internet, you should create a
1157      * strong password.  If a password is provided for cluster creation, username
1158      * must be non-empty.
1159      * Warning: basic authentication is deprecated, and will be removed in GKE
1160      * control plane versions 1.19 and newer. For a list of recommended
1161      * authentication methods, see:
1162      * https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication
1163      * </pre>
1164      *
1165      * <code>string password = 2 [deprecated = true];</code>
1166      *
1167      * @deprecated google.container.v1.MasterAuth.password is deprecated. See
1168      *     google/container/v1/cluster_service.proto;l=1065
1169      * @return This builder for chaining.
1170      */
1171     @java.lang.Deprecated
clearPassword()1172     public Builder clearPassword() {
1173       password_ = getDefaultInstance().getPassword();
1174       bitField0_ = (bitField0_ & ~0x00000002);
1175       onChanged();
1176       return this;
1177     }
1178     /**
1179      *
1180      *
1181      * <pre>
1182      * The password to use for HTTP basic authentication to the master endpoint.
1183      * Because the master endpoint is open to the Internet, you should create a
1184      * strong password.  If a password is provided for cluster creation, username
1185      * must be non-empty.
1186      * Warning: basic authentication is deprecated, and will be removed in GKE
1187      * control plane versions 1.19 and newer. For a list of recommended
1188      * authentication methods, see:
1189      * https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication
1190      * </pre>
1191      *
1192      * <code>string password = 2 [deprecated = true];</code>
1193      *
1194      * @deprecated google.container.v1.MasterAuth.password is deprecated. See
1195      *     google/container/v1/cluster_service.proto;l=1065
1196      * @param value The bytes for password to set.
1197      * @return This builder for chaining.
1198      */
1199     @java.lang.Deprecated
setPasswordBytes(com.google.protobuf.ByteString value)1200     public Builder setPasswordBytes(com.google.protobuf.ByteString value) {
1201       if (value == null) {
1202         throw new NullPointerException();
1203       }
1204       checkByteStringIsUtf8(value);
1205       password_ = value;
1206       bitField0_ |= 0x00000002;
1207       onChanged();
1208       return this;
1209     }
1210 
1211     private com.google.container.v1.ClientCertificateConfig clientCertificateConfig_;
1212     private com.google.protobuf.SingleFieldBuilderV3<
1213             com.google.container.v1.ClientCertificateConfig,
1214             com.google.container.v1.ClientCertificateConfig.Builder,
1215             com.google.container.v1.ClientCertificateConfigOrBuilder>
1216         clientCertificateConfigBuilder_;
1217     /**
1218      *
1219      *
1220      * <pre>
1221      * Configuration for client certificate authentication on the cluster. For
1222      * clusters before v1.12, if no configuration is specified, a client
1223      * certificate is issued.
1224      * </pre>
1225      *
1226      * <code>.google.container.v1.ClientCertificateConfig client_certificate_config = 3;</code>
1227      *
1228      * @return Whether the clientCertificateConfig field is set.
1229      */
hasClientCertificateConfig()1230     public boolean hasClientCertificateConfig() {
1231       return ((bitField0_ & 0x00000004) != 0);
1232     }
1233     /**
1234      *
1235      *
1236      * <pre>
1237      * Configuration for client certificate authentication on the cluster. For
1238      * clusters before v1.12, if no configuration is specified, a client
1239      * certificate is issued.
1240      * </pre>
1241      *
1242      * <code>.google.container.v1.ClientCertificateConfig client_certificate_config = 3;</code>
1243      *
1244      * @return The clientCertificateConfig.
1245      */
getClientCertificateConfig()1246     public com.google.container.v1.ClientCertificateConfig getClientCertificateConfig() {
1247       if (clientCertificateConfigBuilder_ == null) {
1248         return clientCertificateConfig_ == null
1249             ? com.google.container.v1.ClientCertificateConfig.getDefaultInstance()
1250             : clientCertificateConfig_;
1251       } else {
1252         return clientCertificateConfigBuilder_.getMessage();
1253       }
1254     }
1255     /**
1256      *
1257      *
1258      * <pre>
1259      * Configuration for client certificate authentication on the cluster. For
1260      * clusters before v1.12, if no configuration is specified, a client
1261      * certificate is issued.
1262      * </pre>
1263      *
1264      * <code>.google.container.v1.ClientCertificateConfig client_certificate_config = 3;</code>
1265      */
setClientCertificateConfig( com.google.container.v1.ClientCertificateConfig value)1266     public Builder setClientCertificateConfig(
1267         com.google.container.v1.ClientCertificateConfig value) {
1268       if (clientCertificateConfigBuilder_ == null) {
1269         if (value == null) {
1270           throw new NullPointerException();
1271         }
1272         clientCertificateConfig_ = value;
1273       } else {
1274         clientCertificateConfigBuilder_.setMessage(value);
1275       }
1276       bitField0_ |= 0x00000004;
1277       onChanged();
1278       return this;
1279     }
1280     /**
1281      *
1282      *
1283      * <pre>
1284      * Configuration for client certificate authentication on the cluster. For
1285      * clusters before v1.12, if no configuration is specified, a client
1286      * certificate is issued.
1287      * </pre>
1288      *
1289      * <code>.google.container.v1.ClientCertificateConfig client_certificate_config = 3;</code>
1290      */
setClientCertificateConfig( com.google.container.v1.ClientCertificateConfig.Builder builderForValue)1291     public Builder setClientCertificateConfig(
1292         com.google.container.v1.ClientCertificateConfig.Builder builderForValue) {
1293       if (clientCertificateConfigBuilder_ == null) {
1294         clientCertificateConfig_ = builderForValue.build();
1295       } else {
1296         clientCertificateConfigBuilder_.setMessage(builderForValue.build());
1297       }
1298       bitField0_ |= 0x00000004;
1299       onChanged();
1300       return this;
1301     }
1302     /**
1303      *
1304      *
1305      * <pre>
1306      * Configuration for client certificate authentication on the cluster. For
1307      * clusters before v1.12, if no configuration is specified, a client
1308      * certificate is issued.
1309      * </pre>
1310      *
1311      * <code>.google.container.v1.ClientCertificateConfig client_certificate_config = 3;</code>
1312      */
mergeClientCertificateConfig( com.google.container.v1.ClientCertificateConfig value)1313     public Builder mergeClientCertificateConfig(
1314         com.google.container.v1.ClientCertificateConfig value) {
1315       if (clientCertificateConfigBuilder_ == null) {
1316         if (((bitField0_ & 0x00000004) != 0)
1317             && clientCertificateConfig_ != null
1318             && clientCertificateConfig_
1319                 != com.google.container.v1.ClientCertificateConfig.getDefaultInstance()) {
1320           getClientCertificateConfigBuilder().mergeFrom(value);
1321         } else {
1322           clientCertificateConfig_ = value;
1323         }
1324       } else {
1325         clientCertificateConfigBuilder_.mergeFrom(value);
1326       }
1327       bitField0_ |= 0x00000004;
1328       onChanged();
1329       return this;
1330     }
1331     /**
1332      *
1333      *
1334      * <pre>
1335      * Configuration for client certificate authentication on the cluster. For
1336      * clusters before v1.12, if no configuration is specified, a client
1337      * certificate is issued.
1338      * </pre>
1339      *
1340      * <code>.google.container.v1.ClientCertificateConfig client_certificate_config = 3;</code>
1341      */
clearClientCertificateConfig()1342     public Builder clearClientCertificateConfig() {
1343       bitField0_ = (bitField0_ & ~0x00000004);
1344       clientCertificateConfig_ = null;
1345       if (clientCertificateConfigBuilder_ != null) {
1346         clientCertificateConfigBuilder_.dispose();
1347         clientCertificateConfigBuilder_ = null;
1348       }
1349       onChanged();
1350       return this;
1351     }
1352     /**
1353      *
1354      *
1355      * <pre>
1356      * Configuration for client certificate authentication on the cluster. For
1357      * clusters before v1.12, if no configuration is specified, a client
1358      * certificate is issued.
1359      * </pre>
1360      *
1361      * <code>.google.container.v1.ClientCertificateConfig client_certificate_config = 3;</code>
1362      */
1363     public com.google.container.v1.ClientCertificateConfig.Builder
getClientCertificateConfigBuilder()1364         getClientCertificateConfigBuilder() {
1365       bitField0_ |= 0x00000004;
1366       onChanged();
1367       return getClientCertificateConfigFieldBuilder().getBuilder();
1368     }
1369     /**
1370      *
1371      *
1372      * <pre>
1373      * Configuration for client certificate authentication on the cluster. For
1374      * clusters before v1.12, if no configuration is specified, a client
1375      * certificate is issued.
1376      * </pre>
1377      *
1378      * <code>.google.container.v1.ClientCertificateConfig client_certificate_config = 3;</code>
1379      */
1380     public com.google.container.v1.ClientCertificateConfigOrBuilder
getClientCertificateConfigOrBuilder()1381         getClientCertificateConfigOrBuilder() {
1382       if (clientCertificateConfigBuilder_ != null) {
1383         return clientCertificateConfigBuilder_.getMessageOrBuilder();
1384       } else {
1385         return clientCertificateConfig_ == null
1386             ? com.google.container.v1.ClientCertificateConfig.getDefaultInstance()
1387             : clientCertificateConfig_;
1388       }
1389     }
1390     /**
1391      *
1392      *
1393      * <pre>
1394      * Configuration for client certificate authentication on the cluster. For
1395      * clusters before v1.12, if no configuration is specified, a client
1396      * certificate is issued.
1397      * </pre>
1398      *
1399      * <code>.google.container.v1.ClientCertificateConfig client_certificate_config = 3;</code>
1400      */
1401     private com.google.protobuf.SingleFieldBuilderV3<
1402             com.google.container.v1.ClientCertificateConfig,
1403             com.google.container.v1.ClientCertificateConfig.Builder,
1404             com.google.container.v1.ClientCertificateConfigOrBuilder>
getClientCertificateConfigFieldBuilder()1405         getClientCertificateConfigFieldBuilder() {
1406       if (clientCertificateConfigBuilder_ == null) {
1407         clientCertificateConfigBuilder_ =
1408             new com.google.protobuf.SingleFieldBuilderV3<
1409                 com.google.container.v1.ClientCertificateConfig,
1410                 com.google.container.v1.ClientCertificateConfig.Builder,
1411                 com.google.container.v1.ClientCertificateConfigOrBuilder>(
1412                 getClientCertificateConfig(), getParentForChildren(), isClean());
1413         clientCertificateConfig_ = null;
1414       }
1415       return clientCertificateConfigBuilder_;
1416     }
1417 
1418     private java.lang.Object clusterCaCertificate_ = "";
1419     /**
1420      *
1421      *
1422      * <pre>
1423      * [Output only] Base64-encoded public certificate that is the root of
1424      * trust for the cluster.
1425      * </pre>
1426      *
1427      * <code>string cluster_ca_certificate = 100;</code>
1428      *
1429      * @return The clusterCaCertificate.
1430      */
getClusterCaCertificate()1431     public java.lang.String getClusterCaCertificate() {
1432       java.lang.Object ref = clusterCaCertificate_;
1433       if (!(ref instanceof java.lang.String)) {
1434         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1435         java.lang.String s = bs.toStringUtf8();
1436         clusterCaCertificate_ = s;
1437         return s;
1438       } else {
1439         return (java.lang.String) ref;
1440       }
1441     }
1442     /**
1443      *
1444      *
1445      * <pre>
1446      * [Output only] Base64-encoded public certificate that is the root of
1447      * trust for the cluster.
1448      * </pre>
1449      *
1450      * <code>string cluster_ca_certificate = 100;</code>
1451      *
1452      * @return The bytes for clusterCaCertificate.
1453      */
getClusterCaCertificateBytes()1454     public com.google.protobuf.ByteString getClusterCaCertificateBytes() {
1455       java.lang.Object ref = clusterCaCertificate_;
1456       if (ref instanceof String) {
1457         com.google.protobuf.ByteString b =
1458             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1459         clusterCaCertificate_ = b;
1460         return b;
1461       } else {
1462         return (com.google.protobuf.ByteString) ref;
1463       }
1464     }
1465     /**
1466      *
1467      *
1468      * <pre>
1469      * [Output only] Base64-encoded public certificate that is the root of
1470      * trust for the cluster.
1471      * </pre>
1472      *
1473      * <code>string cluster_ca_certificate = 100;</code>
1474      *
1475      * @param value The clusterCaCertificate to set.
1476      * @return This builder for chaining.
1477      */
setClusterCaCertificate(java.lang.String value)1478     public Builder setClusterCaCertificate(java.lang.String value) {
1479       if (value == null) {
1480         throw new NullPointerException();
1481       }
1482       clusterCaCertificate_ = value;
1483       bitField0_ |= 0x00000008;
1484       onChanged();
1485       return this;
1486     }
1487     /**
1488      *
1489      *
1490      * <pre>
1491      * [Output only] Base64-encoded public certificate that is the root of
1492      * trust for the cluster.
1493      * </pre>
1494      *
1495      * <code>string cluster_ca_certificate = 100;</code>
1496      *
1497      * @return This builder for chaining.
1498      */
clearClusterCaCertificate()1499     public Builder clearClusterCaCertificate() {
1500       clusterCaCertificate_ = getDefaultInstance().getClusterCaCertificate();
1501       bitField0_ = (bitField0_ & ~0x00000008);
1502       onChanged();
1503       return this;
1504     }
1505     /**
1506      *
1507      *
1508      * <pre>
1509      * [Output only] Base64-encoded public certificate that is the root of
1510      * trust for the cluster.
1511      * </pre>
1512      *
1513      * <code>string cluster_ca_certificate = 100;</code>
1514      *
1515      * @param value The bytes for clusterCaCertificate to set.
1516      * @return This builder for chaining.
1517      */
setClusterCaCertificateBytes(com.google.protobuf.ByteString value)1518     public Builder setClusterCaCertificateBytes(com.google.protobuf.ByteString value) {
1519       if (value == null) {
1520         throw new NullPointerException();
1521       }
1522       checkByteStringIsUtf8(value);
1523       clusterCaCertificate_ = value;
1524       bitField0_ |= 0x00000008;
1525       onChanged();
1526       return this;
1527     }
1528 
1529     private java.lang.Object clientCertificate_ = "";
1530     /**
1531      *
1532      *
1533      * <pre>
1534      * [Output only] Base64-encoded public certificate used by clients to
1535      * authenticate to the cluster endpoint.
1536      * </pre>
1537      *
1538      * <code>string client_certificate = 101;</code>
1539      *
1540      * @return The clientCertificate.
1541      */
getClientCertificate()1542     public java.lang.String getClientCertificate() {
1543       java.lang.Object ref = clientCertificate_;
1544       if (!(ref instanceof java.lang.String)) {
1545         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1546         java.lang.String s = bs.toStringUtf8();
1547         clientCertificate_ = s;
1548         return s;
1549       } else {
1550         return (java.lang.String) ref;
1551       }
1552     }
1553     /**
1554      *
1555      *
1556      * <pre>
1557      * [Output only] Base64-encoded public certificate used by clients to
1558      * authenticate to the cluster endpoint.
1559      * </pre>
1560      *
1561      * <code>string client_certificate = 101;</code>
1562      *
1563      * @return The bytes for clientCertificate.
1564      */
getClientCertificateBytes()1565     public com.google.protobuf.ByteString getClientCertificateBytes() {
1566       java.lang.Object ref = clientCertificate_;
1567       if (ref instanceof String) {
1568         com.google.protobuf.ByteString b =
1569             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1570         clientCertificate_ = b;
1571         return b;
1572       } else {
1573         return (com.google.protobuf.ByteString) ref;
1574       }
1575     }
1576     /**
1577      *
1578      *
1579      * <pre>
1580      * [Output only] Base64-encoded public certificate used by clients to
1581      * authenticate to the cluster endpoint.
1582      * </pre>
1583      *
1584      * <code>string client_certificate = 101;</code>
1585      *
1586      * @param value The clientCertificate to set.
1587      * @return This builder for chaining.
1588      */
setClientCertificate(java.lang.String value)1589     public Builder setClientCertificate(java.lang.String value) {
1590       if (value == null) {
1591         throw new NullPointerException();
1592       }
1593       clientCertificate_ = value;
1594       bitField0_ |= 0x00000010;
1595       onChanged();
1596       return this;
1597     }
1598     /**
1599      *
1600      *
1601      * <pre>
1602      * [Output only] Base64-encoded public certificate used by clients to
1603      * authenticate to the cluster endpoint.
1604      * </pre>
1605      *
1606      * <code>string client_certificate = 101;</code>
1607      *
1608      * @return This builder for chaining.
1609      */
clearClientCertificate()1610     public Builder clearClientCertificate() {
1611       clientCertificate_ = getDefaultInstance().getClientCertificate();
1612       bitField0_ = (bitField0_ & ~0x00000010);
1613       onChanged();
1614       return this;
1615     }
1616     /**
1617      *
1618      *
1619      * <pre>
1620      * [Output only] Base64-encoded public certificate used by clients to
1621      * authenticate to the cluster endpoint.
1622      * </pre>
1623      *
1624      * <code>string client_certificate = 101;</code>
1625      *
1626      * @param value The bytes for clientCertificate to set.
1627      * @return This builder for chaining.
1628      */
setClientCertificateBytes(com.google.protobuf.ByteString value)1629     public Builder setClientCertificateBytes(com.google.protobuf.ByteString value) {
1630       if (value == null) {
1631         throw new NullPointerException();
1632       }
1633       checkByteStringIsUtf8(value);
1634       clientCertificate_ = value;
1635       bitField0_ |= 0x00000010;
1636       onChanged();
1637       return this;
1638     }
1639 
1640     private java.lang.Object clientKey_ = "";
1641     /**
1642      *
1643      *
1644      * <pre>
1645      * [Output only] Base64-encoded private key used by clients to authenticate
1646      * to the cluster endpoint.
1647      * </pre>
1648      *
1649      * <code>string client_key = 102;</code>
1650      *
1651      * @return The clientKey.
1652      */
getClientKey()1653     public java.lang.String getClientKey() {
1654       java.lang.Object ref = clientKey_;
1655       if (!(ref instanceof java.lang.String)) {
1656         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1657         java.lang.String s = bs.toStringUtf8();
1658         clientKey_ = s;
1659         return s;
1660       } else {
1661         return (java.lang.String) ref;
1662       }
1663     }
1664     /**
1665      *
1666      *
1667      * <pre>
1668      * [Output only] Base64-encoded private key used by clients to authenticate
1669      * to the cluster endpoint.
1670      * </pre>
1671      *
1672      * <code>string client_key = 102;</code>
1673      *
1674      * @return The bytes for clientKey.
1675      */
getClientKeyBytes()1676     public com.google.protobuf.ByteString getClientKeyBytes() {
1677       java.lang.Object ref = clientKey_;
1678       if (ref instanceof String) {
1679         com.google.protobuf.ByteString b =
1680             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1681         clientKey_ = b;
1682         return b;
1683       } else {
1684         return (com.google.protobuf.ByteString) ref;
1685       }
1686     }
1687     /**
1688      *
1689      *
1690      * <pre>
1691      * [Output only] Base64-encoded private key used by clients to authenticate
1692      * to the cluster endpoint.
1693      * </pre>
1694      *
1695      * <code>string client_key = 102;</code>
1696      *
1697      * @param value The clientKey to set.
1698      * @return This builder for chaining.
1699      */
setClientKey(java.lang.String value)1700     public Builder setClientKey(java.lang.String value) {
1701       if (value == null) {
1702         throw new NullPointerException();
1703       }
1704       clientKey_ = value;
1705       bitField0_ |= 0x00000020;
1706       onChanged();
1707       return this;
1708     }
1709     /**
1710      *
1711      *
1712      * <pre>
1713      * [Output only] Base64-encoded private key used by clients to authenticate
1714      * to the cluster endpoint.
1715      * </pre>
1716      *
1717      * <code>string client_key = 102;</code>
1718      *
1719      * @return This builder for chaining.
1720      */
clearClientKey()1721     public Builder clearClientKey() {
1722       clientKey_ = getDefaultInstance().getClientKey();
1723       bitField0_ = (bitField0_ & ~0x00000020);
1724       onChanged();
1725       return this;
1726     }
1727     /**
1728      *
1729      *
1730      * <pre>
1731      * [Output only] Base64-encoded private key used by clients to authenticate
1732      * to the cluster endpoint.
1733      * </pre>
1734      *
1735      * <code>string client_key = 102;</code>
1736      *
1737      * @param value The bytes for clientKey to set.
1738      * @return This builder for chaining.
1739      */
setClientKeyBytes(com.google.protobuf.ByteString value)1740     public Builder setClientKeyBytes(com.google.protobuf.ByteString value) {
1741       if (value == null) {
1742         throw new NullPointerException();
1743       }
1744       checkByteStringIsUtf8(value);
1745       clientKey_ = value;
1746       bitField0_ |= 0x00000020;
1747       onChanged();
1748       return this;
1749     }
1750 
1751     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1752     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
1753       return super.setUnknownFields(unknownFields);
1754     }
1755 
1756     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1757     public final Builder mergeUnknownFields(
1758         final com.google.protobuf.UnknownFieldSet unknownFields) {
1759       return super.mergeUnknownFields(unknownFields);
1760     }
1761 
1762     // @@protoc_insertion_point(builder_scope:google.container.v1.MasterAuth)
1763   }
1764 
1765   // @@protoc_insertion_point(class_scope:google.container.v1.MasterAuth)
1766   private static final com.google.container.v1.MasterAuth DEFAULT_INSTANCE;
1767 
1768   static {
1769     DEFAULT_INSTANCE = new com.google.container.v1.MasterAuth();
1770   }
1771 
getDefaultInstance()1772   public static com.google.container.v1.MasterAuth getDefaultInstance() {
1773     return DEFAULT_INSTANCE;
1774   }
1775 
1776   private static final com.google.protobuf.Parser<MasterAuth> PARSER =
1777       new com.google.protobuf.AbstractParser<MasterAuth>() {
1778         @java.lang.Override
1779         public MasterAuth parsePartialFrom(
1780             com.google.protobuf.CodedInputStream input,
1781             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1782             throws com.google.protobuf.InvalidProtocolBufferException {
1783           Builder builder = newBuilder();
1784           try {
1785             builder.mergeFrom(input, extensionRegistry);
1786           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1787             throw e.setUnfinishedMessage(builder.buildPartial());
1788           } catch (com.google.protobuf.UninitializedMessageException e) {
1789             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1790           } catch (java.io.IOException e) {
1791             throw new com.google.protobuf.InvalidProtocolBufferException(e)
1792                 .setUnfinishedMessage(builder.buildPartial());
1793           }
1794           return builder.buildPartial();
1795         }
1796       };
1797 
parser()1798   public static com.google.protobuf.Parser<MasterAuth> parser() {
1799     return PARSER;
1800   }
1801 
1802   @java.lang.Override
getParserForType()1803   public com.google.protobuf.Parser<MasterAuth> getParserForType() {
1804     return PARSER;
1805   }
1806 
1807   @java.lang.Override
getDefaultInstanceForType()1808   public com.google.container.v1.MasterAuth getDefaultInstanceForType() {
1809     return DEFAULT_INSTANCE;
1810   }
1811 }
1812