• 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  * Configuration options for the horizontal pod autoscaling feature, which
26  * increases or decreases the number of replica pods a replication controller
27  * has based on the resource usage of the existing pods.
28  * </pre>
29  *
30  * Protobuf type {@code google.container.v1.HorizontalPodAutoscaling}
31  */
32 public final class HorizontalPodAutoscaling extends com.google.protobuf.GeneratedMessageV3
33     implements
34     // @@protoc_insertion_point(message_implements:google.container.v1.HorizontalPodAutoscaling)
35     HorizontalPodAutoscalingOrBuilder {
36   private static final long serialVersionUID = 0L;
37   // Use HorizontalPodAutoscaling.newBuilder() to construct.
HorizontalPodAutoscaling(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)38   private HorizontalPodAutoscaling(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
39     super(builder);
40   }
41 
HorizontalPodAutoscaling()42   private HorizontalPodAutoscaling() {}
43 
44   @java.lang.Override
45   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)46   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
47     return new HorizontalPodAutoscaling();
48   }
49 
50   @java.lang.Override
getUnknownFields()51   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
52     return this.unknownFields;
53   }
54 
getDescriptor()55   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
56     return com.google.container.v1.ClusterServiceProto
57         .internal_static_google_container_v1_HorizontalPodAutoscaling_descriptor;
58   }
59 
60   @java.lang.Override
61   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()62       internalGetFieldAccessorTable() {
63     return com.google.container.v1.ClusterServiceProto
64         .internal_static_google_container_v1_HorizontalPodAutoscaling_fieldAccessorTable
65         .ensureFieldAccessorsInitialized(
66             com.google.container.v1.HorizontalPodAutoscaling.class,
67             com.google.container.v1.HorizontalPodAutoscaling.Builder.class);
68   }
69 
70   public static final int DISABLED_FIELD_NUMBER = 1;
71   private boolean disabled_ = false;
72   /**
73    *
74    *
75    * <pre>
76    * Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.
77    * When enabled, it ensures that metrics are collected into Stackdriver
78    * Monitoring.
79    * </pre>
80    *
81    * <code>bool disabled = 1;</code>
82    *
83    * @return The disabled.
84    */
85   @java.lang.Override
getDisabled()86   public boolean getDisabled() {
87     return disabled_;
88   }
89 
90   private byte memoizedIsInitialized = -1;
91 
92   @java.lang.Override
isInitialized()93   public final boolean isInitialized() {
94     byte isInitialized = memoizedIsInitialized;
95     if (isInitialized == 1) return true;
96     if (isInitialized == 0) return false;
97 
98     memoizedIsInitialized = 1;
99     return true;
100   }
101 
102   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)103   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
104     if (disabled_ != false) {
105       output.writeBool(1, disabled_);
106     }
107     getUnknownFields().writeTo(output);
108   }
109 
110   @java.lang.Override
getSerializedSize()111   public int getSerializedSize() {
112     int size = memoizedSize;
113     if (size != -1) return size;
114 
115     size = 0;
116     if (disabled_ != false) {
117       size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, disabled_);
118     }
119     size += getUnknownFields().getSerializedSize();
120     memoizedSize = size;
121     return size;
122   }
123 
124   @java.lang.Override
equals(final java.lang.Object obj)125   public boolean equals(final java.lang.Object obj) {
126     if (obj == this) {
127       return true;
128     }
129     if (!(obj instanceof com.google.container.v1.HorizontalPodAutoscaling)) {
130       return super.equals(obj);
131     }
132     com.google.container.v1.HorizontalPodAutoscaling other =
133         (com.google.container.v1.HorizontalPodAutoscaling) obj;
134 
135     if (getDisabled() != other.getDisabled()) return false;
136     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
137     return true;
138   }
139 
140   @java.lang.Override
hashCode()141   public int hashCode() {
142     if (memoizedHashCode != 0) {
143       return memoizedHashCode;
144     }
145     int hash = 41;
146     hash = (19 * hash) + getDescriptor().hashCode();
147     hash = (37 * hash) + DISABLED_FIELD_NUMBER;
148     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisabled());
149     hash = (29 * hash) + getUnknownFields().hashCode();
150     memoizedHashCode = hash;
151     return hash;
152   }
153 
parseFrom(java.nio.ByteBuffer data)154   public static com.google.container.v1.HorizontalPodAutoscaling parseFrom(java.nio.ByteBuffer data)
155       throws com.google.protobuf.InvalidProtocolBufferException {
156     return PARSER.parseFrom(data);
157   }
158 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)159   public static com.google.container.v1.HorizontalPodAutoscaling parseFrom(
160       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
161       throws com.google.protobuf.InvalidProtocolBufferException {
162     return PARSER.parseFrom(data, extensionRegistry);
163   }
164 
parseFrom( com.google.protobuf.ByteString data)165   public static com.google.container.v1.HorizontalPodAutoscaling parseFrom(
166       com.google.protobuf.ByteString data)
167       throws com.google.protobuf.InvalidProtocolBufferException {
168     return PARSER.parseFrom(data);
169   }
170 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)171   public static com.google.container.v1.HorizontalPodAutoscaling parseFrom(
172       com.google.protobuf.ByteString data,
173       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
174       throws com.google.protobuf.InvalidProtocolBufferException {
175     return PARSER.parseFrom(data, extensionRegistry);
176   }
177 
parseFrom(byte[] data)178   public static com.google.container.v1.HorizontalPodAutoscaling parseFrom(byte[] data)
179       throws com.google.protobuf.InvalidProtocolBufferException {
180     return PARSER.parseFrom(data);
181   }
182 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)183   public static com.google.container.v1.HorizontalPodAutoscaling parseFrom(
184       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
185       throws com.google.protobuf.InvalidProtocolBufferException {
186     return PARSER.parseFrom(data, extensionRegistry);
187   }
188 
parseFrom( java.io.InputStream input)189   public static com.google.container.v1.HorizontalPodAutoscaling parseFrom(
190       java.io.InputStream input) throws java.io.IOException {
191     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
192   }
193 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)194   public static com.google.container.v1.HorizontalPodAutoscaling parseFrom(
195       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
196       throws java.io.IOException {
197     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
198         PARSER, input, extensionRegistry);
199   }
200 
parseDelimitedFrom( java.io.InputStream input)201   public static com.google.container.v1.HorizontalPodAutoscaling parseDelimitedFrom(
202       java.io.InputStream input) throws java.io.IOException {
203     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
204   }
205 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)206   public static com.google.container.v1.HorizontalPodAutoscaling parseDelimitedFrom(
207       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
208       throws java.io.IOException {
209     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
210         PARSER, input, extensionRegistry);
211   }
212 
parseFrom( com.google.protobuf.CodedInputStream input)213   public static com.google.container.v1.HorizontalPodAutoscaling parseFrom(
214       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
215     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
216   }
217 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)218   public static com.google.container.v1.HorizontalPodAutoscaling parseFrom(
219       com.google.protobuf.CodedInputStream input,
220       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
221       throws java.io.IOException {
222     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
223         PARSER, input, extensionRegistry);
224   }
225 
226   @java.lang.Override
newBuilderForType()227   public Builder newBuilderForType() {
228     return newBuilder();
229   }
230 
newBuilder()231   public static Builder newBuilder() {
232     return DEFAULT_INSTANCE.toBuilder();
233   }
234 
newBuilder(com.google.container.v1.HorizontalPodAutoscaling prototype)235   public static Builder newBuilder(com.google.container.v1.HorizontalPodAutoscaling prototype) {
236     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
237   }
238 
239   @java.lang.Override
toBuilder()240   public Builder toBuilder() {
241     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
242   }
243 
244   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)245   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
246     Builder builder = new Builder(parent);
247     return builder;
248   }
249   /**
250    *
251    *
252    * <pre>
253    * Configuration options for the horizontal pod autoscaling feature, which
254    * increases or decreases the number of replica pods a replication controller
255    * has based on the resource usage of the existing pods.
256    * </pre>
257    *
258    * Protobuf type {@code google.container.v1.HorizontalPodAutoscaling}
259    */
260   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
261       implements
262       // @@protoc_insertion_point(builder_implements:google.container.v1.HorizontalPodAutoscaling)
263       com.google.container.v1.HorizontalPodAutoscalingOrBuilder {
getDescriptor()264     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
265       return com.google.container.v1.ClusterServiceProto
266           .internal_static_google_container_v1_HorizontalPodAutoscaling_descriptor;
267     }
268 
269     @java.lang.Override
270     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()271         internalGetFieldAccessorTable() {
272       return com.google.container.v1.ClusterServiceProto
273           .internal_static_google_container_v1_HorizontalPodAutoscaling_fieldAccessorTable
274           .ensureFieldAccessorsInitialized(
275               com.google.container.v1.HorizontalPodAutoscaling.class,
276               com.google.container.v1.HorizontalPodAutoscaling.Builder.class);
277     }
278 
279     // Construct using com.google.container.v1.HorizontalPodAutoscaling.newBuilder()
Builder()280     private Builder() {}
281 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)282     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
283       super(parent);
284     }
285 
286     @java.lang.Override
clear()287     public Builder clear() {
288       super.clear();
289       bitField0_ = 0;
290       disabled_ = false;
291       return this;
292     }
293 
294     @java.lang.Override
getDescriptorForType()295     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
296       return com.google.container.v1.ClusterServiceProto
297           .internal_static_google_container_v1_HorizontalPodAutoscaling_descriptor;
298     }
299 
300     @java.lang.Override
getDefaultInstanceForType()301     public com.google.container.v1.HorizontalPodAutoscaling getDefaultInstanceForType() {
302       return com.google.container.v1.HorizontalPodAutoscaling.getDefaultInstance();
303     }
304 
305     @java.lang.Override
build()306     public com.google.container.v1.HorizontalPodAutoscaling build() {
307       com.google.container.v1.HorizontalPodAutoscaling result = buildPartial();
308       if (!result.isInitialized()) {
309         throw newUninitializedMessageException(result);
310       }
311       return result;
312     }
313 
314     @java.lang.Override
buildPartial()315     public com.google.container.v1.HorizontalPodAutoscaling buildPartial() {
316       com.google.container.v1.HorizontalPodAutoscaling result =
317           new com.google.container.v1.HorizontalPodAutoscaling(this);
318       if (bitField0_ != 0) {
319         buildPartial0(result);
320       }
321       onBuilt();
322       return result;
323     }
324 
buildPartial0(com.google.container.v1.HorizontalPodAutoscaling result)325     private void buildPartial0(com.google.container.v1.HorizontalPodAutoscaling result) {
326       int from_bitField0_ = bitField0_;
327       if (((from_bitField0_ & 0x00000001) != 0)) {
328         result.disabled_ = disabled_;
329       }
330     }
331 
332     @java.lang.Override
clone()333     public Builder clone() {
334       return super.clone();
335     }
336 
337     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)338     public Builder setField(
339         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
340       return super.setField(field, value);
341     }
342 
343     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)344     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
345       return super.clearField(field);
346     }
347 
348     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)349     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
350       return super.clearOneof(oneof);
351     }
352 
353     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)354     public Builder setRepeatedField(
355         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
356       return super.setRepeatedField(field, index, value);
357     }
358 
359     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)360     public Builder addRepeatedField(
361         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
362       return super.addRepeatedField(field, value);
363     }
364 
365     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)366     public Builder mergeFrom(com.google.protobuf.Message other) {
367       if (other instanceof com.google.container.v1.HorizontalPodAutoscaling) {
368         return mergeFrom((com.google.container.v1.HorizontalPodAutoscaling) other);
369       } else {
370         super.mergeFrom(other);
371         return this;
372       }
373     }
374 
mergeFrom(com.google.container.v1.HorizontalPodAutoscaling other)375     public Builder mergeFrom(com.google.container.v1.HorizontalPodAutoscaling other) {
376       if (other == com.google.container.v1.HorizontalPodAutoscaling.getDefaultInstance())
377         return this;
378       if (other.getDisabled() != false) {
379         setDisabled(other.getDisabled());
380       }
381       this.mergeUnknownFields(other.getUnknownFields());
382       onChanged();
383       return this;
384     }
385 
386     @java.lang.Override
isInitialized()387     public final boolean isInitialized() {
388       return true;
389     }
390 
391     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)392     public Builder mergeFrom(
393         com.google.protobuf.CodedInputStream input,
394         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
395         throws java.io.IOException {
396       if (extensionRegistry == null) {
397         throw new java.lang.NullPointerException();
398       }
399       try {
400         boolean done = false;
401         while (!done) {
402           int tag = input.readTag();
403           switch (tag) {
404             case 0:
405               done = true;
406               break;
407             case 8:
408               {
409                 disabled_ = input.readBool();
410                 bitField0_ |= 0x00000001;
411                 break;
412               } // case 8
413             default:
414               {
415                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
416                   done = true; // was an endgroup tag
417                 }
418                 break;
419               } // default:
420           } // switch (tag)
421         } // while (!done)
422       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
423         throw e.unwrapIOException();
424       } finally {
425         onChanged();
426       } // finally
427       return this;
428     }
429 
430     private int bitField0_;
431 
432     private boolean disabled_;
433     /**
434      *
435      *
436      * <pre>
437      * Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.
438      * When enabled, it ensures that metrics are collected into Stackdriver
439      * Monitoring.
440      * </pre>
441      *
442      * <code>bool disabled = 1;</code>
443      *
444      * @return The disabled.
445      */
446     @java.lang.Override
getDisabled()447     public boolean getDisabled() {
448       return disabled_;
449     }
450     /**
451      *
452      *
453      * <pre>
454      * Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.
455      * When enabled, it ensures that metrics are collected into Stackdriver
456      * Monitoring.
457      * </pre>
458      *
459      * <code>bool disabled = 1;</code>
460      *
461      * @param value The disabled to set.
462      * @return This builder for chaining.
463      */
setDisabled(boolean value)464     public Builder setDisabled(boolean value) {
465 
466       disabled_ = value;
467       bitField0_ |= 0x00000001;
468       onChanged();
469       return this;
470     }
471     /**
472      *
473      *
474      * <pre>
475      * Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.
476      * When enabled, it ensures that metrics are collected into Stackdriver
477      * Monitoring.
478      * </pre>
479      *
480      * <code>bool disabled = 1;</code>
481      *
482      * @return This builder for chaining.
483      */
clearDisabled()484     public Builder clearDisabled() {
485       bitField0_ = (bitField0_ & ~0x00000001);
486       disabled_ = false;
487       onChanged();
488       return this;
489     }
490 
491     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)492     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
493       return super.setUnknownFields(unknownFields);
494     }
495 
496     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)497     public final Builder mergeUnknownFields(
498         final com.google.protobuf.UnknownFieldSet unknownFields) {
499       return super.mergeUnknownFields(unknownFields);
500     }
501 
502     // @@protoc_insertion_point(builder_scope:google.container.v1.HorizontalPodAutoscaling)
503   }
504 
505   // @@protoc_insertion_point(class_scope:google.container.v1.HorizontalPodAutoscaling)
506   private static final com.google.container.v1.HorizontalPodAutoscaling DEFAULT_INSTANCE;
507 
508   static {
509     DEFAULT_INSTANCE = new com.google.container.v1.HorizontalPodAutoscaling();
510   }
511 
getDefaultInstance()512   public static com.google.container.v1.HorizontalPodAutoscaling getDefaultInstance() {
513     return DEFAULT_INSTANCE;
514   }
515 
516   private static final com.google.protobuf.Parser<HorizontalPodAutoscaling> PARSER =
517       new com.google.protobuf.AbstractParser<HorizontalPodAutoscaling>() {
518         @java.lang.Override
519         public HorizontalPodAutoscaling parsePartialFrom(
520             com.google.protobuf.CodedInputStream input,
521             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
522             throws com.google.protobuf.InvalidProtocolBufferException {
523           Builder builder = newBuilder();
524           try {
525             builder.mergeFrom(input, extensionRegistry);
526           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
527             throw e.setUnfinishedMessage(builder.buildPartial());
528           } catch (com.google.protobuf.UninitializedMessageException e) {
529             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
530           } catch (java.io.IOException e) {
531             throw new com.google.protobuf.InvalidProtocolBufferException(e)
532                 .setUnfinishedMessage(builder.buildPartial());
533           }
534           return builder.buildPartial();
535         }
536       };
537 
parser()538   public static com.google.protobuf.Parser<HorizontalPodAutoscaling> parser() {
539     return PARSER;
540   }
541 
542   @java.lang.Override
getParserForType()543   public com.google.protobuf.Parser<HorizontalPodAutoscaling> getParserForType() {
544     return PARSER;
545   }
546 
547   @java.lang.Override
getDefaultInstanceForType()548   public com.google.container.v1.HorizontalPodAutoscaling getDefaultInstanceForType() {
549     return DEFAULT_INSTANCE;
550   }
551 }
552