• 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/cloud/billing/v1/cloud_catalog.proto
18 
19 package com.google.cloud.billing.v1;
20 
21 /**
22  *
23  *
24  * <pre>
25  * Represents the aggregation level and interval for pricing of a single SKU.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.billing.v1.AggregationInfo}
29  */
30 public final class AggregationInfo extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.billing.v1.AggregationInfo)
33     AggregationInfoOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use AggregationInfo.newBuilder() to construct.
AggregationInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private AggregationInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
AggregationInfo()40   private AggregationInfo() {
41     aggregationLevel_ = 0;
42     aggregationInterval_ = 0;
43   }
44 
45   @java.lang.Override
46   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)47   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
48     return new AggregationInfo();
49   }
50 
51   @java.lang.Override
getUnknownFields()52   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
53     return this.unknownFields;
54   }
55 
getDescriptor()56   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
57     return com.google.cloud.billing.v1.CloudCatalogProto
58         .internal_static_google_cloud_billing_v1_AggregationInfo_descriptor;
59   }
60 
61   @java.lang.Override
62   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()63       internalGetFieldAccessorTable() {
64     return com.google.cloud.billing.v1.CloudCatalogProto
65         .internal_static_google_cloud_billing_v1_AggregationInfo_fieldAccessorTable
66         .ensureFieldAccessorsInitialized(
67             com.google.cloud.billing.v1.AggregationInfo.class,
68             com.google.cloud.billing.v1.AggregationInfo.Builder.class);
69   }
70 
71   /**
72    *
73    *
74    * <pre>
75    * The level at which usage is aggregated to compute cost.
76    * Example: "ACCOUNT" aggregation level indicates that usage for tiered
77    * pricing is aggregated across all projects in a single account.
78    * </pre>
79    *
80    * Protobuf enum {@code google.cloud.billing.v1.AggregationInfo.AggregationLevel}
81    */
82   public enum AggregationLevel implements com.google.protobuf.ProtocolMessageEnum {
83     /** <code>AGGREGATION_LEVEL_UNSPECIFIED = 0;</code> */
84     AGGREGATION_LEVEL_UNSPECIFIED(0),
85     /** <code>ACCOUNT = 1;</code> */
86     ACCOUNT(1),
87     /** <code>PROJECT = 2;</code> */
88     PROJECT(2),
89     UNRECOGNIZED(-1),
90     ;
91 
92     /** <code>AGGREGATION_LEVEL_UNSPECIFIED = 0;</code> */
93     public static final int AGGREGATION_LEVEL_UNSPECIFIED_VALUE = 0;
94     /** <code>ACCOUNT = 1;</code> */
95     public static final int ACCOUNT_VALUE = 1;
96     /** <code>PROJECT = 2;</code> */
97     public static final int PROJECT_VALUE = 2;
98 
getNumber()99     public final int getNumber() {
100       if (this == UNRECOGNIZED) {
101         throw new java.lang.IllegalArgumentException(
102             "Can't get the number of an unknown enum value.");
103       }
104       return value;
105     }
106 
107     /**
108      * @param value The numeric wire value of the corresponding enum entry.
109      * @return The enum associated with the given numeric wire value.
110      * @deprecated Use {@link #forNumber(int)} instead.
111      */
112     @java.lang.Deprecated
valueOf(int value)113     public static AggregationLevel valueOf(int value) {
114       return forNumber(value);
115     }
116 
117     /**
118      * @param value The numeric wire value of the corresponding enum entry.
119      * @return The enum associated with the given numeric wire value.
120      */
forNumber(int value)121     public static AggregationLevel forNumber(int value) {
122       switch (value) {
123         case 0:
124           return AGGREGATION_LEVEL_UNSPECIFIED;
125         case 1:
126           return ACCOUNT;
127         case 2:
128           return PROJECT;
129         default:
130           return null;
131       }
132     }
133 
internalGetValueMap()134     public static com.google.protobuf.Internal.EnumLiteMap<AggregationLevel> internalGetValueMap() {
135       return internalValueMap;
136     }
137 
138     private static final com.google.protobuf.Internal.EnumLiteMap<AggregationLevel>
139         internalValueMap =
140             new com.google.protobuf.Internal.EnumLiteMap<AggregationLevel>() {
141               public AggregationLevel findValueByNumber(int number) {
142                 return AggregationLevel.forNumber(number);
143               }
144             };
145 
getValueDescriptor()146     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
147       if (this == UNRECOGNIZED) {
148         throw new java.lang.IllegalStateException(
149             "Can't get the descriptor of an unrecognized enum value.");
150       }
151       return getDescriptor().getValues().get(ordinal());
152     }
153 
getDescriptorForType()154     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
155       return getDescriptor();
156     }
157 
getDescriptor()158     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
159       return com.google.cloud.billing.v1.AggregationInfo.getDescriptor().getEnumTypes().get(0);
160     }
161 
162     private static final AggregationLevel[] VALUES = values();
163 
valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)164     public static AggregationLevel valueOf(
165         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
166       if (desc.getType() != getDescriptor()) {
167         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
168       }
169       if (desc.getIndex() == -1) {
170         return UNRECOGNIZED;
171       }
172       return VALUES[desc.getIndex()];
173     }
174 
175     private final int value;
176 
AggregationLevel(int value)177     private AggregationLevel(int value) {
178       this.value = value;
179     }
180 
181     // @@protoc_insertion_point(enum_scope:google.cloud.billing.v1.AggregationInfo.AggregationLevel)
182   }
183 
184   /**
185    *
186    *
187    * <pre>
188    * The interval at which usage is aggregated to compute cost.
189    * Example: "MONTHLY" aggregation interval indicates that usage for tiered
190    * pricing is aggregated every month.
191    * </pre>
192    *
193    * Protobuf enum {@code google.cloud.billing.v1.AggregationInfo.AggregationInterval}
194    */
195   public enum AggregationInterval implements com.google.protobuf.ProtocolMessageEnum {
196     /** <code>AGGREGATION_INTERVAL_UNSPECIFIED = 0;</code> */
197     AGGREGATION_INTERVAL_UNSPECIFIED(0),
198     /** <code>DAILY = 1;</code> */
199     DAILY(1),
200     /** <code>MONTHLY = 2;</code> */
201     MONTHLY(2),
202     UNRECOGNIZED(-1),
203     ;
204 
205     /** <code>AGGREGATION_INTERVAL_UNSPECIFIED = 0;</code> */
206     public static final int AGGREGATION_INTERVAL_UNSPECIFIED_VALUE = 0;
207     /** <code>DAILY = 1;</code> */
208     public static final int DAILY_VALUE = 1;
209     /** <code>MONTHLY = 2;</code> */
210     public static final int MONTHLY_VALUE = 2;
211 
getNumber()212     public final int getNumber() {
213       if (this == UNRECOGNIZED) {
214         throw new java.lang.IllegalArgumentException(
215             "Can't get the number of an unknown enum value.");
216       }
217       return value;
218     }
219 
220     /**
221      * @param value The numeric wire value of the corresponding enum entry.
222      * @return The enum associated with the given numeric wire value.
223      * @deprecated Use {@link #forNumber(int)} instead.
224      */
225     @java.lang.Deprecated
valueOf(int value)226     public static AggregationInterval valueOf(int value) {
227       return forNumber(value);
228     }
229 
230     /**
231      * @param value The numeric wire value of the corresponding enum entry.
232      * @return The enum associated with the given numeric wire value.
233      */
forNumber(int value)234     public static AggregationInterval forNumber(int value) {
235       switch (value) {
236         case 0:
237           return AGGREGATION_INTERVAL_UNSPECIFIED;
238         case 1:
239           return DAILY;
240         case 2:
241           return MONTHLY;
242         default:
243           return null;
244       }
245     }
246 
247     public static com.google.protobuf.Internal.EnumLiteMap<AggregationInterval>
internalGetValueMap()248         internalGetValueMap() {
249       return internalValueMap;
250     }
251 
252     private static final com.google.protobuf.Internal.EnumLiteMap<AggregationInterval>
253         internalValueMap =
254             new com.google.protobuf.Internal.EnumLiteMap<AggregationInterval>() {
255               public AggregationInterval findValueByNumber(int number) {
256                 return AggregationInterval.forNumber(number);
257               }
258             };
259 
getValueDescriptor()260     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
261       if (this == UNRECOGNIZED) {
262         throw new java.lang.IllegalStateException(
263             "Can't get the descriptor of an unrecognized enum value.");
264       }
265       return getDescriptor().getValues().get(ordinal());
266     }
267 
getDescriptorForType()268     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
269       return getDescriptor();
270     }
271 
getDescriptor()272     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
273       return com.google.cloud.billing.v1.AggregationInfo.getDescriptor().getEnumTypes().get(1);
274     }
275 
276     private static final AggregationInterval[] VALUES = values();
277 
valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)278     public static AggregationInterval valueOf(
279         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
280       if (desc.getType() != getDescriptor()) {
281         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
282       }
283       if (desc.getIndex() == -1) {
284         return UNRECOGNIZED;
285       }
286       return VALUES[desc.getIndex()];
287     }
288 
289     private final int value;
290 
AggregationInterval(int value)291     private AggregationInterval(int value) {
292       this.value = value;
293     }
294 
295     // @@protoc_insertion_point(enum_scope:google.cloud.billing.v1.AggregationInfo.AggregationInterval)
296   }
297 
298   public static final int AGGREGATION_LEVEL_FIELD_NUMBER = 1;
299   private int aggregationLevel_ = 0;
300   /**
301    * <code>.google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1;</code>
302    *
303    * @return The enum numeric value on the wire for aggregationLevel.
304    */
305   @java.lang.Override
getAggregationLevelValue()306   public int getAggregationLevelValue() {
307     return aggregationLevel_;
308   }
309   /**
310    * <code>.google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1;</code>
311    *
312    * @return The aggregationLevel.
313    */
314   @java.lang.Override
getAggregationLevel()315   public com.google.cloud.billing.v1.AggregationInfo.AggregationLevel getAggregationLevel() {
316     com.google.cloud.billing.v1.AggregationInfo.AggregationLevel result =
317         com.google.cloud.billing.v1.AggregationInfo.AggregationLevel.forNumber(aggregationLevel_);
318     return result == null
319         ? com.google.cloud.billing.v1.AggregationInfo.AggregationLevel.UNRECOGNIZED
320         : result;
321   }
322 
323   public static final int AGGREGATION_INTERVAL_FIELD_NUMBER = 2;
324   private int aggregationInterval_ = 0;
325   /**
326    * <code>.google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2;
327    * </code>
328    *
329    * @return The enum numeric value on the wire for aggregationInterval.
330    */
331   @java.lang.Override
getAggregationIntervalValue()332   public int getAggregationIntervalValue() {
333     return aggregationInterval_;
334   }
335   /**
336    * <code>.google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2;
337    * </code>
338    *
339    * @return The aggregationInterval.
340    */
341   @java.lang.Override
getAggregationInterval()342   public com.google.cloud.billing.v1.AggregationInfo.AggregationInterval getAggregationInterval() {
343     com.google.cloud.billing.v1.AggregationInfo.AggregationInterval result =
344         com.google.cloud.billing.v1.AggregationInfo.AggregationInterval.forNumber(
345             aggregationInterval_);
346     return result == null
347         ? com.google.cloud.billing.v1.AggregationInfo.AggregationInterval.UNRECOGNIZED
348         : result;
349   }
350 
351   public static final int AGGREGATION_COUNT_FIELD_NUMBER = 3;
352   private int aggregationCount_ = 0;
353   /**
354    *
355    *
356    * <pre>
357    * The number of intervals to aggregate over.
358    * Example: If aggregation_level is "DAILY" and aggregation_count is 14,
359    * aggregation will be over 14 days.
360    * </pre>
361    *
362    * <code>int32 aggregation_count = 3;</code>
363    *
364    * @return The aggregationCount.
365    */
366   @java.lang.Override
getAggregationCount()367   public int getAggregationCount() {
368     return aggregationCount_;
369   }
370 
371   private byte memoizedIsInitialized = -1;
372 
373   @java.lang.Override
isInitialized()374   public final boolean isInitialized() {
375     byte isInitialized = memoizedIsInitialized;
376     if (isInitialized == 1) return true;
377     if (isInitialized == 0) return false;
378 
379     memoizedIsInitialized = 1;
380     return true;
381   }
382 
383   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)384   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
385     if (aggregationLevel_
386         != com.google.cloud.billing.v1.AggregationInfo.AggregationLevel
387             .AGGREGATION_LEVEL_UNSPECIFIED
388             .getNumber()) {
389       output.writeEnum(1, aggregationLevel_);
390     }
391     if (aggregationInterval_
392         != com.google.cloud.billing.v1.AggregationInfo.AggregationInterval
393             .AGGREGATION_INTERVAL_UNSPECIFIED
394             .getNumber()) {
395       output.writeEnum(2, aggregationInterval_);
396     }
397     if (aggregationCount_ != 0) {
398       output.writeInt32(3, aggregationCount_);
399     }
400     getUnknownFields().writeTo(output);
401   }
402 
403   @java.lang.Override
getSerializedSize()404   public int getSerializedSize() {
405     int size = memoizedSize;
406     if (size != -1) return size;
407 
408     size = 0;
409     if (aggregationLevel_
410         != com.google.cloud.billing.v1.AggregationInfo.AggregationLevel
411             .AGGREGATION_LEVEL_UNSPECIFIED
412             .getNumber()) {
413       size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, aggregationLevel_);
414     }
415     if (aggregationInterval_
416         != com.google.cloud.billing.v1.AggregationInfo.AggregationInterval
417             .AGGREGATION_INTERVAL_UNSPECIFIED
418             .getNumber()) {
419       size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, aggregationInterval_);
420     }
421     if (aggregationCount_ != 0) {
422       size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, aggregationCount_);
423     }
424     size += getUnknownFields().getSerializedSize();
425     memoizedSize = size;
426     return size;
427   }
428 
429   @java.lang.Override
equals(final java.lang.Object obj)430   public boolean equals(final java.lang.Object obj) {
431     if (obj == this) {
432       return true;
433     }
434     if (!(obj instanceof com.google.cloud.billing.v1.AggregationInfo)) {
435       return super.equals(obj);
436     }
437     com.google.cloud.billing.v1.AggregationInfo other =
438         (com.google.cloud.billing.v1.AggregationInfo) obj;
439 
440     if (aggregationLevel_ != other.aggregationLevel_) return false;
441     if (aggregationInterval_ != other.aggregationInterval_) return false;
442     if (getAggregationCount() != other.getAggregationCount()) return false;
443     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
444     return true;
445   }
446 
447   @java.lang.Override
hashCode()448   public int hashCode() {
449     if (memoizedHashCode != 0) {
450       return memoizedHashCode;
451     }
452     int hash = 41;
453     hash = (19 * hash) + getDescriptor().hashCode();
454     hash = (37 * hash) + AGGREGATION_LEVEL_FIELD_NUMBER;
455     hash = (53 * hash) + aggregationLevel_;
456     hash = (37 * hash) + AGGREGATION_INTERVAL_FIELD_NUMBER;
457     hash = (53 * hash) + aggregationInterval_;
458     hash = (37 * hash) + AGGREGATION_COUNT_FIELD_NUMBER;
459     hash = (53 * hash) + getAggregationCount();
460     hash = (29 * hash) + getUnknownFields().hashCode();
461     memoizedHashCode = hash;
462     return hash;
463   }
464 
parseFrom(java.nio.ByteBuffer data)465   public static com.google.cloud.billing.v1.AggregationInfo parseFrom(java.nio.ByteBuffer data)
466       throws com.google.protobuf.InvalidProtocolBufferException {
467     return PARSER.parseFrom(data);
468   }
469 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)470   public static com.google.cloud.billing.v1.AggregationInfo parseFrom(
471       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
472       throws com.google.protobuf.InvalidProtocolBufferException {
473     return PARSER.parseFrom(data, extensionRegistry);
474   }
475 
parseFrom( com.google.protobuf.ByteString data)476   public static com.google.cloud.billing.v1.AggregationInfo parseFrom(
477       com.google.protobuf.ByteString data)
478       throws com.google.protobuf.InvalidProtocolBufferException {
479     return PARSER.parseFrom(data);
480   }
481 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)482   public static com.google.cloud.billing.v1.AggregationInfo parseFrom(
483       com.google.protobuf.ByteString data,
484       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
485       throws com.google.protobuf.InvalidProtocolBufferException {
486     return PARSER.parseFrom(data, extensionRegistry);
487   }
488 
parseFrom(byte[] data)489   public static com.google.cloud.billing.v1.AggregationInfo parseFrom(byte[] data)
490       throws com.google.protobuf.InvalidProtocolBufferException {
491     return PARSER.parseFrom(data);
492   }
493 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)494   public static com.google.cloud.billing.v1.AggregationInfo parseFrom(
495       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
496       throws com.google.protobuf.InvalidProtocolBufferException {
497     return PARSER.parseFrom(data, extensionRegistry);
498   }
499 
parseFrom(java.io.InputStream input)500   public static com.google.cloud.billing.v1.AggregationInfo parseFrom(java.io.InputStream input)
501       throws java.io.IOException {
502     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
503   }
504 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)505   public static com.google.cloud.billing.v1.AggregationInfo parseFrom(
506       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
507       throws java.io.IOException {
508     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
509         PARSER, input, extensionRegistry);
510   }
511 
parseDelimitedFrom( java.io.InputStream input)512   public static com.google.cloud.billing.v1.AggregationInfo parseDelimitedFrom(
513       java.io.InputStream input) throws java.io.IOException {
514     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
515   }
516 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)517   public static com.google.cloud.billing.v1.AggregationInfo parseDelimitedFrom(
518       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
519       throws java.io.IOException {
520     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
521         PARSER, input, extensionRegistry);
522   }
523 
parseFrom( com.google.protobuf.CodedInputStream input)524   public static com.google.cloud.billing.v1.AggregationInfo parseFrom(
525       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
526     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
527   }
528 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)529   public static com.google.cloud.billing.v1.AggregationInfo parseFrom(
530       com.google.protobuf.CodedInputStream input,
531       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
532       throws java.io.IOException {
533     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
534         PARSER, input, extensionRegistry);
535   }
536 
537   @java.lang.Override
newBuilderForType()538   public Builder newBuilderForType() {
539     return newBuilder();
540   }
541 
newBuilder()542   public static Builder newBuilder() {
543     return DEFAULT_INSTANCE.toBuilder();
544   }
545 
newBuilder(com.google.cloud.billing.v1.AggregationInfo prototype)546   public static Builder newBuilder(com.google.cloud.billing.v1.AggregationInfo prototype) {
547     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
548   }
549 
550   @java.lang.Override
toBuilder()551   public Builder toBuilder() {
552     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
553   }
554 
555   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)556   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
557     Builder builder = new Builder(parent);
558     return builder;
559   }
560   /**
561    *
562    *
563    * <pre>
564    * Represents the aggregation level and interval for pricing of a single SKU.
565    * </pre>
566    *
567    * Protobuf type {@code google.cloud.billing.v1.AggregationInfo}
568    */
569   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
570       implements
571       // @@protoc_insertion_point(builder_implements:google.cloud.billing.v1.AggregationInfo)
572       com.google.cloud.billing.v1.AggregationInfoOrBuilder {
getDescriptor()573     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
574       return com.google.cloud.billing.v1.CloudCatalogProto
575           .internal_static_google_cloud_billing_v1_AggregationInfo_descriptor;
576     }
577 
578     @java.lang.Override
579     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()580         internalGetFieldAccessorTable() {
581       return com.google.cloud.billing.v1.CloudCatalogProto
582           .internal_static_google_cloud_billing_v1_AggregationInfo_fieldAccessorTable
583           .ensureFieldAccessorsInitialized(
584               com.google.cloud.billing.v1.AggregationInfo.class,
585               com.google.cloud.billing.v1.AggregationInfo.Builder.class);
586     }
587 
588     // Construct using com.google.cloud.billing.v1.AggregationInfo.newBuilder()
Builder()589     private Builder() {}
590 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)591     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
592       super(parent);
593     }
594 
595     @java.lang.Override
clear()596     public Builder clear() {
597       super.clear();
598       bitField0_ = 0;
599       aggregationLevel_ = 0;
600       aggregationInterval_ = 0;
601       aggregationCount_ = 0;
602       return this;
603     }
604 
605     @java.lang.Override
getDescriptorForType()606     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
607       return com.google.cloud.billing.v1.CloudCatalogProto
608           .internal_static_google_cloud_billing_v1_AggregationInfo_descriptor;
609     }
610 
611     @java.lang.Override
getDefaultInstanceForType()612     public com.google.cloud.billing.v1.AggregationInfo getDefaultInstanceForType() {
613       return com.google.cloud.billing.v1.AggregationInfo.getDefaultInstance();
614     }
615 
616     @java.lang.Override
build()617     public com.google.cloud.billing.v1.AggregationInfo build() {
618       com.google.cloud.billing.v1.AggregationInfo result = buildPartial();
619       if (!result.isInitialized()) {
620         throw newUninitializedMessageException(result);
621       }
622       return result;
623     }
624 
625     @java.lang.Override
buildPartial()626     public com.google.cloud.billing.v1.AggregationInfo buildPartial() {
627       com.google.cloud.billing.v1.AggregationInfo result =
628           new com.google.cloud.billing.v1.AggregationInfo(this);
629       if (bitField0_ != 0) {
630         buildPartial0(result);
631       }
632       onBuilt();
633       return result;
634     }
635 
buildPartial0(com.google.cloud.billing.v1.AggregationInfo result)636     private void buildPartial0(com.google.cloud.billing.v1.AggregationInfo result) {
637       int from_bitField0_ = bitField0_;
638       if (((from_bitField0_ & 0x00000001) != 0)) {
639         result.aggregationLevel_ = aggregationLevel_;
640       }
641       if (((from_bitField0_ & 0x00000002) != 0)) {
642         result.aggregationInterval_ = aggregationInterval_;
643       }
644       if (((from_bitField0_ & 0x00000004) != 0)) {
645         result.aggregationCount_ = aggregationCount_;
646       }
647     }
648 
649     @java.lang.Override
clone()650     public Builder clone() {
651       return super.clone();
652     }
653 
654     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)655     public Builder setField(
656         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
657       return super.setField(field, value);
658     }
659 
660     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)661     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
662       return super.clearField(field);
663     }
664 
665     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)666     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
667       return super.clearOneof(oneof);
668     }
669 
670     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)671     public Builder setRepeatedField(
672         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
673       return super.setRepeatedField(field, index, value);
674     }
675 
676     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)677     public Builder addRepeatedField(
678         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
679       return super.addRepeatedField(field, value);
680     }
681 
682     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)683     public Builder mergeFrom(com.google.protobuf.Message other) {
684       if (other instanceof com.google.cloud.billing.v1.AggregationInfo) {
685         return mergeFrom((com.google.cloud.billing.v1.AggregationInfo) other);
686       } else {
687         super.mergeFrom(other);
688         return this;
689       }
690     }
691 
mergeFrom(com.google.cloud.billing.v1.AggregationInfo other)692     public Builder mergeFrom(com.google.cloud.billing.v1.AggregationInfo other) {
693       if (other == com.google.cloud.billing.v1.AggregationInfo.getDefaultInstance()) return this;
694       if (other.aggregationLevel_ != 0) {
695         setAggregationLevelValue(other.getAggregationLevelValue());
696       }
697       if (other.aggregationInterval_ != 0) {
698         setAggregationIntervalValue(other.getAggregationIntervalValue());
699       }
700       if (other.getAggregationCount() != 0) {
701         setAggregationCount(other.getAggregationCount());
702       }
703       this.mergeUnknownFields(other.getUnknownFields());
704       onChanged();
705       return this;
706     }
707 
708     @java.lang.Override
isInitialized()709     public final boolean isInitialized() {
710       return true;
711     }
712 
713     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)714     public Builder mergeFrom(
715         com.google.protobuf.CodedInputStream input,
716         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
717         throws java.io.IOException {
718       if (extensionRegistry == null) {
719         throw new java.lang.NullPointerException();
720       }
721       try {
722         boolean done = false;
723         while (!done) {
724           int tag = input.readTag();
725           switch (tag) {
726             case 0:
727               done = true;
728               break;
729             case 8:
730               {
731                 aggregationLevel_ = input.readEnum();
732                 bitField0_ |= 0x00000001;
733                 break;
734               } // case 8
735             case 16:
736               {
737                 aggregationInterval_ = input.readEnum();
738                 bitField0_ |= 0x00000002;
739                 break;
740               } // case 16
741             case 24:
742               {
743                 aggregationCount_ = input.readInt32();
744                 bitField0_ |= 0x00000004;
745                 break;
746               } // case 24
747             default:
748               {
749                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
750                   done = true; // was an endgroup tag
751                 }
752                 break;
753               } // default:
754           } // switch (tag)
755         } // while (!done)
756       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
757         throw e.unwrapIOException();
758       } finally {
759         onChanged();
760       } // finally
761       return this;
762     }
763 
764     private int bitField0_;
765 
766     private int aggregationLevel_ = 0;
767     /**
768      * <code>.google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1;</code>
769      *
770      * @return The enum numeric value on the wire for aggregationLevel.
771      */
772     @java.lang.Override
getAggregationLevelValue()773     public int getAggregationLevelValue() {
774       return aggregationLevel_;
775     }
776     /**
777      * <code>.google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1;</code>
778      *
779      * @param value The enum numeric value on the wire for aggregationLevel to set.
780      * @return This builder for chaining.
781      */
setAggregationLevelValue(int value)782     public Builder setAggregationLevelValue(int value) {
783       aggregationLevel_ = value;
784       bitField0_ |= 0x00000001;
785       onChanged();
786       return this;
787     }
788     /**
789      * <code>.google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1;</code>
790      *
791      * @return The aggregationLevel.
792      */
793     @java.lang.Override
getAggregationLevel()794     public com.google.cloud.billing.v1.AggregationInfo.AggregationLevel getAggregationLevel() {
795       com.google.cloud.billing.v1.AggregationInfo.AggregationLevel result =
796           com.google.cloud.billing.v1.AggregationInfo.AggregationLevel.forNumber(aggregationLevel_);
797       return result == null
798           ? com.google.cloud.billing.v1.AggregationInfo.AggregationLevel.UNRECOGNIZED
799           : result;
800     }
801     /**
802      * <code>.google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1;</code>
803      *
804      * @param value The aggregationLevel to set.
805      * @return This builder for chaining.
806      */
setAggregationLevel( com.google.cloud.billing.v1.AggregationInfo.AggregationLevel value)807     public Builder setAggregationLevel(
808         com.google.cloud.billing.v1.AggregationInfo.AggregationLevel value) {
809       if (value == null) {
810         throw new NullPointerException();
811       }
812       bitField0_ |= 0x00000001;
813       aggregationLevel_ = value.getNumber();
814       onChanged();
815       return this;
816     }
817     /**
818      * <code>.google.cloud.billing.v1.AggregationInfo.AggregationLevel aggregation_level = 1;</code>
819      *
820      * @return This builder for chaining.
821      */
clearAggregationLevel()822     public Builder clearAggregationLevel() {
823       bitField0_ = (bitField0_ & ~0x00000001);
824       aggregationLevel_ = 0;
825       onChanged();
826       return this;
827     }
828 
829     private int aggregationInterval_ = 0;
830     /**
831      * <code>.google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2;
832      * </code>
833      *
834      * @return The enum numeric value on the wire for aggregationInterval.
835      */
836     @java.lang.Override
getAggregationIntervalValue()837     public int getAggregationIntervalValue() {
838       return aggregationInterval_;
839     }
840     /**
841      * <code>.google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2;
842      * </code>
843      *
844      * @param value The enum numeric value on the wire for aggregationInterval to set.
845      * @return This builder for chaining.
846      */
setAggregationIntervalValue(int value)847     public Builder setAggregationIntervalValue(int value) {
848       aggregationInterval_ = value;
849       bitField0_ |= 0x00000002;
850       onChanged();
851       return this;
852     }
853     /**
854      * <code>.google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2;
855      * </code>
856      *
857      * @return The aggregationInterval.
858      */
859     @java.lang.Override
860     public com.google.cloud.billing.v1.AggregationInfo.AggregationInterval
getAggregationInterval()861         getAggregationInterval() {
862       com.google.cloud.billing.v1.AggregationInfo.AggregationInterval result =
863           com.google.cloud.billing.v1.AggregationInfo.AggregationInterval.forNumber(
864               aggregationInterval_);
865       return result == null
866           ? com.google.cloud.billing.v1.AggregationInfo.AggregationInterval.UNRECOGNIZED
867           : result;
868     }
869     /**
870      * <code>.google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2;
871      * </code>
872      *
873      * @param value The aggregationInterval to set.
874      * @return This builder for chaining.
875      */
setAggregationInterval( com.google.cloud.billing.v1.AggregationInfo.AggregationInterval value)876     public Builder setAggregationInterval(
877         com.google.cloud.billing.v1.AggregationInfo.AggregationInterval value) {
878       if (value == null) {
879         throw new NullPointerException();
880       }
881       bitField0_ |= 0x00000002;
882       aggregationInterval_ = value.getNumber();
883       onChanged();
884       return this;
885     }
886     /**
887      * <code>.google.cloud.billing.v1.AggregationInfo.AggregationInterval aggregation_interval = 2;
888      * </code>
889      *
890      * @return This builder for chaining.
891      */
clearAggregationInterval()892     public Builder clearAggregationInterval() {
893       bitField0_ = (bitField0_ & ~0x00000002);
894       aggregationInterval_ = 0;
895       onChanged();
896       return this;
897     }
898 
899     private int aggregationCount_;
900     /**
901      *
902      *
903      * <pre>
904      * The number of intervals to aggregate over.
905      * Example: If aggregation_level is "DAILY" and aggregation_count is 14,
906      * aggregation will be over 14 days.
907      * </pre>
908      *
909      * <code>int32 aggregation_count = 3;</code>
910      *
911      * @return The aggregationCount.
912      */
913     @java.lang.Override
getAggregationCount()914     public int getAggregationCount() {
915       return aggregationCount_;
916     }
917     /**
918      *
919      *
920      * <pre>
921      * The number of intervals to aggregate over.
922      * Example: If aggregation_level is "DAILY" and aggregation_count is 14,
923      * aggregation will be over 14 days.
924      * </pre>
925      *
926      * <code>int32 aggregation_count = 3;</code>
927      *
928      * @param value The aggregationCount to set.
929      * @return This builder for chaining.
930      */
setAggregationCount(int value)931     public Builder setAggregationCount(int value) {
932 
933       aggregationCount_ = value;
934       bitField0_ |= 0x00000004;
935       onChanged();
936       return this;
937     }
938     /**
939      *
940      *
941      * <pre>
942      * The number of intervals to aggregate over.
943      * Example: If aggregation_level is "DAILY" and aggregation_count is 14,
944      * aggregation will be over 14 days.
945      * </pre>
946      *
947      * <code>int32 aggregation_count = 3;</code>
948      *
949      * @return This builder for chaining.
950      */
clearAggregationCount()951     public Builder clearAggregationCount() {
952       bitField0_ = (bitField0_ & ~0x00000004);
953       aggregationCount_ = 0;
954       onChanged();
955       return this;
956     }
957 
958     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)959     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
960       return super.setUnknownFields(unknownFields);
961     }
962 
963     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)964     public final Builder mergeUnknownFields(
965         final com.google.protobuf.UnknownFieldSet unknownFields) {
966       return super.mergeUnknownFields(unknownFields);
967     }
968 
969     // @@protoc_insertion_point(builder_scope:google.cloud.billing.v1.AggregationInfo)
970   }
971 
972   // @@protoc_insertion_point(class_scope:google.cloud.billing.v1.AggregationInfo)
973   private static final com.google.cloud.billing.v1.AggregationInfo DEFAULT_INSTANCE;
974 
975   static {
976     DEFAULT_INSTANCE = new com.google.cloud.billing.v1.AggregationInfo();
977   }
978 
getDefaultInstance()979   public static com.google.cloud.billing.v1.AggregationInfo getDefaultInstance() {
980     return DEFAULT_INSTANCE;
981   }
982 
983   private static final com.google.protobuf.Parser<AggregationInfo> PARSER =
984       new com.google.protobuf.AbstractParser<AggregationInfo>() {
985         @java.lang.Override
986         public AggregationInfo parsePartialFrom(
987             com.google.protobuf.CodedInputStream input,
988             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
989             throws com.google.protobuf.InvalidProtocolBufferException {
990           Builder builder = newBuilder();
991           try {
992             builder.mergeFrom(input, extensionRegistry);
993           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
994             throw e.setUnfinishedMessage(builder.buildPartial());
995           } catch (com.google.protobuf.UninitializedMessageException e) {
996             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
997           } catch (java.io.IOException e) {
998             throw new com.google.protobuf.InvalidProtocolBufferException(e)
999                 .setUnfinishedMessage(builder.buildPartial());
1000           }
1001           return builder.buildPartial();
1002         }
1003       };
1004 
parser()1005   public static com.google.protobuf.Parser<AggregationInfo> parser() {
1006     return PARSER;
1007   }
1008 
1009   @java.lang.Override
getParserForType()1010   public com.google.protobuf.Parser<AggregationInfo> getParserForType() {
1011     return PARSER;
1012   }
1013 
1014   @java.lang.Override
getDefaultInstanceForType()1015   public com.google.cloud.billing.v1.AggregationInfo getDefaultInstanceForType() {
1016     return DEFAULT_INSTANCE;
1017   }
1018 }
1019