• 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  * Encapsulates a single SKU in Google Cloud Platform
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.billing.v1.Sku}
29  */
30 public final class Sku extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.billing.v1.Sku)
33     SkuOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use Sku.newBuilder() to construct.
Sku(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private Sku(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
Sku()40   private Sku() {
41     name_ = "";
42     skuId_ = "";
43     description_ = "";
44     serviceRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
45     pricingInfo_ = java.util.Collections.emptyList();
46     serviceProviderName_ = "";
47   }
48 
49   @java.lang.Override
50   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)51   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
52     return new Sku();
53   }
54 
55   @java.lang.Override
getUnknownFields()56   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
57     return this.unknownFields;
58   }
59 
getDescriptor()60   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
61     return com.google.cloud.billing.v1.CloudCatalogProto
62         .internal_static_google_cloud_billing_v1_Sku_descriptor;
63   }
64 
65   @java.lang.Override
66   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()67       internalGetFieldAccessorTable() {
68     return com.google.cloud.billing.v1.CloudCatalogProto
69         .internal_static_google_cloud_billing_v1_Sku_fieldAccessorTable
70         .ensureFieldAccessorsInitialized(
71             com.google.cloud.billing.v1.Sku.class, com.google.cloud.billing.v1.Sku.Builder.class);
72   }
73 
74   public static final int NAME_FIELD_NUMBER = 1;
75 
76   @SuppressWarnings("serial")
77   private volatile java.lang.Object name_ = "";
78   /**
79    *
80    *
81    * <pre>
82    * The resource name for the SKU.
83    * Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE"
84    * </pre>
85    *
86    * <code>string name = 1;</code>
87    *
88    * @return The name.
89    */
90   @java.lang.Override
getName()91   public java.lang.String getName() {
92     java.lang.Object ref = name_;
93     if (ref instanceof java.lang.String) {
94       return (java.lang.String) ref;
95     } else {
96       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
97       java.lang.String s = bs.toStringUtf8();
98       name_ = s;
99       return s;
100     }
101   }
102   /**
103    *
104    *
105    * <pre>
106    * The resource name for the SKU.
107    * Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE"
108    * </pre>
109    *
110    * <code>string name = 1;</code>
111    *
112    * @return The bytes for name.
113    */
114   @java.lang.Override
getNameBytes()115   public com.google.protobuf.ByteString getNameBytes() {
116     java.lang.Object ref = name_;
117     if (ref instanceof java.lang.String) {
118       com.google.protobuf.ByteString b =
119           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
120       name_ = b;
121       return b;
122     } else {
123       return (com.google.protobuf.ByteString) ref;
124     }
125   }
126 
127   public static final int SKU_ID_FIELD_NUMBER = 2;
128 
129   @SuppressWarnings("serial")
130   private volatile java.lang.Object skuId_ = "";
131   /**
132    *
133    *
134    * <pre>
135    * The identifier for the SKU.
136    * Example: "AA95-CD31-42FE"
137    * </pre>
138    *
139    * <code>string sku_id = 2;</code>
140    *
141    * @return The skuId.
142    */
143   @java.lang.Override
getSkuId()144   public java.lang.String getSkuId() {
145     java.lang.Object ref = skuId_;
146     if (ref instanceof java.lang.String) {
147       return (java.lang.String) ref;
148     } else {
149       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
150       java.lang.String s = bs.toStringUtf8();
151       skuId_ = s;
152       return s;
153     }
154   }
155   /**
156    *
157    *
158    * <pre>
159    * The identifier for the SKU.
160    * Example: "AA95-CD31-42FE"
161    * </pre>
162    *
163    * <code>string sku_id = 2;</code>
164    *
165    * @return The bytes for skuId.
166    */
167   @java.lang.Override
getSkuIdBytes()168   public com.google.protobuf.ByteString getSkuIdBytes() {
169     java.lang.Object ref = skuId_;
170     if (ref instanceof java.lang.String) {
171       com.google.protobuf.ByteString b =
172           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
173       skuId_ = b;
174       return b;
175     } else {
176       return (com.google.protobuf.ByteString) ref;
177     }
178   }
179 
180   public static final int DESCRIPTION_FIELD_NUMBER = 3;
181 
182   @SuppressWarnings("serial")
183   private volatile java.lang.Object description_ = "";
184   /**
185    *
186    *
187    * <pre>
188    * A human readable description of the SKU, has a maximum length of 256
189    * characters.
190    * </pre>
191    *
192    * <code>string description = 3;</code>
193    *
194    * @return The description.
195    */
196   @java.lang.Override
getDescription()197   public java.lang.String getDescription() {
198     java.lang.Object ref = description_;
199     if (ref instanceof java.lang.String) {
200       return (java.lang.String) ref;
201     } else {
202       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
203       java.lang.String s = bs.toStringUtf8();
204       description_ = s;
205       return s;
206     }
207   }
208   /**
209    *
210    *
211    * <pre>
212    * A human readable description of the SKU, has a maximum length of 256
213    * characters.
214    * </pre>
215    *
216    * <code>string description = 3;</code>
217    *
218    * @return The bytes for description.
219    */
220   @java.lang.Override
getDescriptionBytes()221   public com.google.protobuf.ByteString getDescriptionBytes() {
222     java.lang.Object ref = description_;
223     if (ref instanceof java.lang.String) {
224       com.google.protobuf.ByteString b =
225           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
226       description_ = b;
227       return b;
228     } else {
229       return (com.google.protobuf.ByteString) ref;
230     }
231   }
232 
233   public static final int CATEGORY_FIELD_NUMBER = 4;
234   private com.google.cloud.billing.v1.Category category_;
235   /**
236    *
237    *
238    * <pre>
239    * The category hierarchy of this SKU, purely for organizational purpose.
240    * </pre>
241    *
242    * <code>.google.cloud.billing.v1.Category category = 4;</code>
243    *
244    * @return Whether the category field is set.
245    */
246   @java.lang.Override
hasCategory()247   public boolean hasCategory() {
248     return category_ != null;
249   }
250   /**
251    *
252    *
253    * <pre>
254    * The category hierarchy of this SKU, purely for organizational purpose.
255    * </pre>
256    *
257    * <code>.google.cloud.billing.v1.Category category = 4;</code>
258    *
259    * @return The category.
260    */
261   @java.lang.Override
getCategory()262   public com.google.cloud.billing.v1.Category getCategory() {
263     return category_ == null
264         ? com.google.cloud.billing.v1.Category.getDefaultInstance()
265         : category_;
266   }
267   /**
268    *
269    *
270    * <pre>
271    * The category hierarchy of this SKU, purely for organizational purpose.
272    * </pre>
273    *
274    * <code>.google.cloud.billing.v1.Category category = 4;</code>
275    */
276   @java.lang.Override
getCategoryOrBuilder()277   public com.google.cloud.billing.v1.CategoryOrBuilder getCategoryOrBuilder() {
278     return category_ == null
279         ? com.google.cloud.billing.v1.Category.getDefaultInstance()
280         : category_;
281   }
282 
283   public static final int SERVICE_REGIONS_FIELD_NUMBER = 5;
284 
285   @SuppressWarnings("serial")
286   private com.google.protobuf.LazyStringList serviceRegions_;
287   /**
288    *
289    *
290    * <pre>
291    * List of service regions this SKU is offered at.
292    * Example: "asia-east1"
293    * Service regions can be found at https://cloud.google.com/about/locations/
294    * </pre>
295    *
296    * <code>repeated string service_regions = 5;</code>
297    *
298    * @return A list containing the serviceRegions.
299    */
getServiceRegionsList()300   public com.google.protobuf.ProtocolStringList getServiceRegionsList() {
301     return serviceRegions_;
302   }
303   /**
304    *
305    *
306    * <pre>
307    * List of service regions this SKU is offered at.
308    * Example: "asia-east1"
309    * Service regions can be found at https://cloud.google.com/about/locations/
310    * </pre>
311    *
312    * <code>repeated string service_regions = 5;</code>
313    *
314    * @return The count of serviceRegions.
315    */
getServiceRegionsCount()316   public int getServiceRegionsCount() {
317     return serviceRegions_.size();
318   }
319   /**
320    *
321    *
322    * <pre>
323    * List of service regions this SKU is offered at.
324    * Example: "asia-east1"
325    * Service regions can be found at https://cloud.google.com/about/locations/
326    * </pre>
327    *
328    * <code>repeated string service_regions = 5;</code>
329    *
330    * @param index The index of the element to return.
331    * @return The serviceRegions at the given index.
332    */
getServiceRegions(int index)333   public java.lang.String getServiceRegions(int index) {
334     return serviceRegions_.get(index);
335   }
336   /**
337    *
338    *
339    * <pre>
340    * List of service regions this SKU is offered at.
341    * Example: "asia-east1"
342    * Service regions can be found at https://cloud.google.com/about/locations/
343    * </pre>
344    *
345    * <code>repeated string service_regions = 5;</code>
346    *
347    * @param index The index of the value to return.
348    * @return The bytes of the serviceRegions at the given index.
349    */
getServiceRegionsBytes(int index)350   public com.google.protobuf.ByteString getServiceRegionsBytes(int index) {
351     return serviceRegions_.getByteString(index);
352   }
353 
354   public static final int PRICING_INFO_FIELD_NUMBER = 6;
355 
356   @SuppressWarnings("serial")
357   private java.util.List<com.google.cloud.billing.v1.PricingInfo> pricingInfo_;
358   /**
359    *
360    *
361    * <pre>
362    * A timeline of pricing info for this SKU in chronological order.
363    * </pre>
364    *
365    * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
366    */
367   @java.lang.Override
getPricingInfoList()368   public java.util.List<com.google.cloud.billing.v1.PricingInfo> getPricingInfoList() {
369     return pricingInfo_;
370   }
371   /**
372    *
373    *
374    * <pre>
375    * A timeline of pricing info for this SKU in chronological order.
376    * </pre>
377    *
378    * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
379    */
380   @java.lang.Override
381   public java.util.List<? extends com.google.cloud.billing.v1.PricingInfoOrBuilder>
getPricingInfoOrBuilderList()382       getPricingInfoOrBuilderList() {
383     return pricingInfo_;
384   }
385   /**
386    *
387    *
388    * <pre>
389    * A timeline of pricing info for this SKU in chronological order.
390    * </pre>
391    *
392    * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
393    */
394   @java.lang.Override
getPricingInfoCount()395   public int getPricingInfoCount() {
396     return pricingInfo_.size();
397   }
398   /**
399    *
400    *
401    * <pre>
402    * A timeline of pricing info for this SKU in chronological order.
403    * </pre>
404    *
405    * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
406    */
407   @java.lang.Override
getPricingInfo(int index)408   public com.google.cloud.billing.v1.PricingInfo getPricingInfo(int index) {
409     return pricingInfo_.get(index);
410   }
411   /**
412    *
413    *
414    * <pre>
415    * A timeline of pricing info for this SKU in chronological order.
416    * </pre>
417    *
418    * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
419    */
420   @java.lang.Override
getPricingInfoOrBuilder(int index)421   public com.google.cloud.billing.v1.PricingInfoOrBuilder getPricingInfoOrBuilder(int index) {
422     return pricingInfo_.get(index);
423   }
424 
425   public static final int SERVICE_PROVIDER_NAME_FIELD_NUMBER = 7;
426 
427   @SuppressWarnings("serial")
428   private volatile java.lang.Object serviceProviderName_ = "";
429   /**
430    *
431    *
432    * <pre>
433    * Identifies the service provider.
434    * This is 'Google' for first party services in Google Cloud Platform.
435    * </pre>
436    *
437    * <code>string service_provider_name = 7;</code>
438    *
439    * @return The serviceProviderName.
440    */
441   @java.lang.Override
getServiceProviderName()442   public java.lang.String getServiceProviderName() {
443     java.lang.Object ref = serviceProviderName_;
444     if (ref instanceof java.lang.String) {
445       return (java.lang.String) ref;
446     } else {
447       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
448       java.lang.String s = bs.toStringUtf8();
449       serviceProviderName_ = s;
450       return s;
451     }
452   }
453   /**
454    *
455    *
456    * <pre>
457    * Identifies the service provider.
458    * This is 'Google' for first party services in Google Cloud Platform.
459    * </pre>
460    *
461    * <code>string service_provider_name = 7;</code>
462    *
463    * @return The bytes for serviceProviderName.
464    */
465   @java.lang.Override
getServiceProviderNameBytes()466   public com.google.protobuf.ByteString getServiceProviderNameBytes() {
467     java.lang.Object ref = serviceProviderName_;
468     if (ref instanceof java.lang.String) {
469       com.google.protobuf.ByteString b =
470           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
471       serviceProviderName_ = b;
472       return b;
473     } else {
474       return (com.google.protobuf.ByteString) ref;
475     }
476   }
477 
478   public static final int GEO_TAXONOMY_FIELD_NUMBER = 8;
479   private com.google.cloud.billing.v1.GeoTaxonomy geoTaxonomy_;
480   /**
481    *
482    *
483    * <pre>
484    * The geographic taxonomy for this sku.
485    * </pre>
486    *
487    * <code>.google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8;</code>
488    *
489    * @return Whether the geoTaxonomy field is set.
490    */
491   @java.lang.Override
hasGeoTaxonomy()492   public boolean hasGeoTaxonomy() {
493     return geoTaxonomy_ != null;
494   }
495   /**
496    *
497    *
498    * <pre>
499    * The geographic taxonomy for this sku.
500    * </pre>
501    *
502    * <code>.google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8;</code>
503    *
504    * @return The geoTaxonomy.
505    */
506   @java.lang.Override
getGeoTaxonomy()507   public com.google.cloud.billing.v1.GeoTaxonomy getGeoTaxonomy() {
508     return geoTaxonomy_ == null
509         ? com.google.cloud.billing.v1.GeoTaxonomy.getDefaultInstance()
510         : geoTaxonomy_;
511   }
512   /**
513    *
514    *
515    * <pre>
516    * The geographic taxonomy for this sku.
517    * </pre>
518    *
519    * <code>.google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8;</code>
520    */
521   @java.lang.Override
getGeoTaxonomyOrBuilder()522   public com.google.cloud.billing.v1.GeoTaxonomyOrBuilder getGeoTaxonomyOrBuilder() {
523     return geoTaxonomy_ == null
524         ? com.google.cloud.billing.v1.GeoTaxonomy.getDefaultInstance()
525         : geoTaxonomy_;
526   }
527 
528   private byte memoizedIsInitialized = -1;
529 
530   @java.lang.Override
isInitialized()531   public final boolean isInitialized() {
532     byte isInitialized = memoizedIsInitialized;
533     if (isInitialized == 1) return true;
534     if (isInitialized == 0) return false;
535 
536     memoizedIsInitialized = 1;
537     return true;
538   }
539 
540   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)541   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
542     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
543       com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
544     }
545     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(skuId_)) {
546       com.google.protobuf.GeneratedMessageV3.writeString(output, 2, skuId_);
547     }
548     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
549       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
550     }
551     if (category_ != null) {
552       output.writeMessage(4, getCategory());
553     }
554     for (int i = 0; i < serviceRegions_.size(); i++) {
555       com.google.protobuf.GeneratedMessageV3.writeString(output, 5, serviceRegions_.getRaw(i));
556     }
557     for (int i = 0; i < pricingInfo_.size(); i++) {
558       output.writeMessage(6, pricingInfo_.get(i));
559     }
560     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceProviderName_)) {
561       com.google.protobuf.GeneratedMessageV3.writeString(output, 7, serviceProviderName_);
562     }
563     if (geoTaxonomy_ != null) {
564       output.writeMessage(8, getGeoTaxonomy());
565     }
566     getUnknownFields().writeTo(output);
567   }
568 
569   @java.lang.Override
getSerializedSize()570   public int getSerializedSize() {
571     int size = memoizedSize;
572     if (size != -1) return size;
573 
574     size = 0;
575     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
576       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
577     }
578     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(skuId_)) {
579       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, skuId_);
580     }
581     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
582       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
583     }
584     if (category_ != null) {
585       size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCategory());
586     }
587     {
588       int dataSize = 0;
589       for (int i = 0; i < serviceRegions_.size(); i++) {
590         dataSize += computeStringSizeNoTag(serviceRegions_.getRaw(i));
591       }
592       size += dataSize;
593       size += 1 * getServiceRegionsList().size();
594     }
595     for (int i = 0; i < pricingInfo_.size(); i++) {
596       size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, pricingInfo_.get(i));
597     }
598     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceProviderName_)) {
599       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, serviceProviderName_);
600     }
601     if (geoTaxonomy_ != null) {
602       size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getGeoTaxonomy());
603     }
604     size += getUnknownFields().getSerializedSize();
605     memoizedSize = size;
606     return size;
607   }
608 
609   @java.lang.Override
equals(final java.lang.Object obj)610   public boolean equals(final java.lang.Object obj) {
611     if (obj == this) {
612       return true;
613     }
614     if (!(obj instanceof com.google.cloud.billing.v1.Sku)) {
615       return super.equals(obj);
616     }
617     com.google.cloud.billing.v1.Sku other = (com.google.cloud.billing.v1.Sku) obj;
618 
619     if (!getName().equals(other.getName())) return false;
620     if (!getSkuId().equals(other.getSkuId())) return false;
621     if (!getDescription().equals(other.getDescription())) return false;
622     if (hasCategory() != other.hasCategory()) return false;
623     if (hasCategory()) {
624       if (!getCategory().equals(other.getCategory())) return false;
625     }
626     if (!getServiceRegionsList().equals(other.getServiceRegionsList())) return false;
627     if (!getPricingInfoList().equals(other.getPricingInfoList())) return false;
628     if (!getServiceProviderName().equals(other.getServiceProviderName())) return false;
629     if (hasGeoTaxonomy() != other.hasGeoTaxonomy()) return false;
630     if (hasGeoTaxonomy()) {
631       if (!getGeoTaxonomy().equals(other.getGeoTaxonomy())) return false;
632     }
633     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
634     return true;
635   }
636 
637   @java.lang.Override
hashCode()638   public int hashCode() {
639     if (memoizedHashCode != 0) {
640       return memoizedHashCode;
641     }
642     int hash = 41;
643     hash = (19 * hash) + getDescriptor().hashCode();
644     hash = (37 * hash) + NAME_FIELD_NUMBER;
645     hash = (53 * hash) + getName().hashCode();
646     hash = (37 * hash) + SKU_ID_FIELD_NUMBER;
647     hash = (53 * hash) + getSkuId().hashCode();
648     hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
649     hash = (53 * hash) + getDescription().hashCode();
650     if (hasCategory()) {
651       hash = (37 * hash) + CATEGORY_FIELD_NUMBER;
652       hash = (53 * hash) + getCategory().hashCode();
653     }
654     if (getServiceRegionsCount() > 0) {
655       hash = (37 * hash) + SERVICE_REGIONS_FIELD_NUMBER;
656       hash = (53 * hash) + getServiceRegionsList().hashCode();
657     }
658     if (getPricingInfoCount() > 0) {
659       hash = (37 * hash) + PRICING_INFO_FIELD_NUMBER;
660       hash = (53 * hash) + getPricingInfoList().hashCode();
661     }
662     hash = (37 * hash) + SERVICE_PROVIDER_NAME_FIELD_NUMBER;
663     hash = (53 * hash) + getServiceProviderName().hashCode();
664     if (hasGeoTaxonomy()) {
665       hash = (37 * hash) + GEO_TAXONOMY_FIELD_NUMBER;
666       hash = (53 * hash) + getGeoTaxonomy().hashCode();
667     }
668     hash = (29 * hash) + getUnknownFields().hashCode();
669     memoizedHashCode = hash;
670     return hash;
671   }
672 
parseFrom(java.nio.ByteBuffer data)673   public static com.google.cloud.billing.v1.Sku parseFrom(java.nio.ByteBuffer data)
674       throws com.google.protobuf.InvalidProtocolBufferException {
675     return PARSER.parseFrom(data);
676   }
677 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)678   public static com.google.cloud.billing.v1.Sku parseFrom(
679       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
680       throws com.google.protobuf.InvalidProtocolBufferException {
681     return PARSER.parseFrom(data, extensionRegistry);
682   }
683 
parseFrom(com.google.protobuf.ByteString data)684   public static com.google.cloud.billing.v1.Sku parseFrom(com.google.protobuf.ByteString data)
685       throws com.google.protobuf.InvalidProtocolBufferException {
686     return PARSER.parseFrom(data);
687   }
688 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)689   public static com.google.cloud.billing.v1.Sku parseFrom(
690       com.google.protobuf.ByteString data,
691       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
692       throws com.google.protobuf.InvalidProtocolBufferException {
693     return PARSER.parseFrom(data, extensionRegistry);
694   }
695 
parseFrom(byte[] data)696   public static com.google.cloud.billing.v1.Sku parseFrom(byte[] data)
697       throws com.google.protobuf.InvalidProtocolBufferException {
698     return PARSER.parseFrom(data);
699   }
700 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)701   public static com.google.cloud.billing.v1.Sku parseFrom(
702       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
703       throws com.google.protobuf.InvalidProtocolBufferException {
704     return PARSER.parseFrom(data, extensionRegistry);
705   }
706 
parseFrom(java.io.InputStream input)707   public static com.google.cloud.billing.v1.Sku parseFrom(java.io.InputStream input)
708       throws java.io.IOException {
709     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
710   }
711 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)712   public static com.google.cloud.billing.v1.Sku parseFrom(
713       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
714       throws java.io.IOException {
715     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
716         PARSER, input, extensionRegistry);
717   }
718 
parseDelimitedFrom(java.io.InputStream input)719   public static com.google.cloud.billing.v1.Sku parseDelimitedFrom(java.io.InputStream input)
720       throws java.io.IOException {
721     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
722   }
723 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)724   public static com.google.cloud.billing.v1.Sku parseDelimitedFrom(
725       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
726       throws java.io.IOException {
727     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
728         PARSER, input, extensionRegistry);
729   }
730 
parseFrom( com.google.protobuf.CodedInputStream input)731   public static com.google.cloud.billing.v1.Sku parseFrom(
732       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
733     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
734   }
735 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)736   public static com.google.cloud.billing.v1.Sku parseFrom(
737       com.google.protobuf.CodedInputStream input,
738       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
739       throws java.io.IOException {
740     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
741         PARSER, input, extensionRegistry);
742   }
743 
744   @java.lang.Override
newBuilderForType()745   public Builder newBuilderForType() {
746     return newBuilder();
747   }
748 
newBuilder()749   public static Builder newBuilder() {
750     return DEFAULT_INSTANCE.toBuilder();
751   }
752 
newBuilder(com.google.cloud.billing.v1.Sku prototype)753   public static Builder newBuilder(com.google.cloud.billing.v1.Sku prototype) {
754     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
755   }
756 
757   @java.lang.Override
toBuilder()758   public Builder toBuilder() {
759     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
760   }
761 
762   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)763   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
764     Builder builder = new Builder(parent);
765     return builder;
766   }
767   /**
768    *
769    *
770    * <pre>
771    * Encapsulates a single SKU in Google Cloud Platform
772    * </pre>
773    *
774    * Protobuf type {@code google.cloud.billing.v1.Sku}
775    */
776   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
777       implements
778       // @@protoc_insertion_point(builder_implements:google.cloud.billing.v1.Sku)
779       com.google.cloud.billing.v1.SkuOrBuilder {
getDescriptor()780     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
781       return com.google.cloud.billing.v1.CloudCatalogProto
782           .internal_static_google_cloud_billing_v1_Sku_descriptor;
783     }
784 
785     @java.lang.Override
786     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()787         internalGetFieldAccessorTable() {
788       return com.google.cloud.billing.v1.CloudCatalogProto
789           .internal_static_google_cloud_billing_v1_Sku_fieldAccessorTable
790           .ensureFieldAccessorsInitialized(
791               com.google.cloud.billing.v1.Sku.class, com.google.cloud.billing.v1.Sku.Builder.class);
792     }
793 
794     // Construct using com.google.cloud.billing.v1.Sku.newBuilder()
Builder()795     private Builder() {}
796 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)797     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
798       super(parent);
799     }
800 
801     @java.lang.Override
clear()802     public Builder clear() {
803       super.clear();
804       bitField0_ = 0;
805       name_ = "";
806       skuId_ = "";
807       description_ = "";
808       category_ = null;
809       if (categoryBuilder_ != null) {
810         categoryBuilder_.dispose();
811         categoryBuilder_ = null;
812       }
813       serviceRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
814       bitField0_ = (bitField0_ & ~0x00000010);
815       if (pricingInfoBuilder_ == null) {
816         pricingInfo_ = java.util.Collections.emptyList();
817       } else {
818         pricingInfo_ = null;
819         pricingInfoBuilder_.clear();
820       }
821       bitField0_ = (bitField0_ & ~0x00000020);
822       serviceProviderName_ = "";
823       geoTaxonomy_ = null;
824       if (geoTaxonomyBuilder_ != null) {
825         geoTaxonomyBuilder_.dispose();
826         geoTaxonomyBuilder_ = null;
827       }
828       return this;
829     }
830 
831     @java.lang.Override
getDescriptorForType()832     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
833       return com.google.cloud.billing.v1.CloudCatalogProto
834           .internal_static_google_cloud_billing_v1_Sku_descriptor;
835     }
836 
837     @java.lang.Override
getDefaultInstanceForType()838     public com.google.cloud.billing.v1.Sku getDefaultInstanceForType() {
839       return com.google.cloud.billing.v1.Sku.getDefaultInstance();
840     }
841 
842     @java.lang.Override
build()843     public com.google.cloud.billing.v1.Sku build() {
844       com.google.cloud.billing.v1.Sku result = buildPartial();
845       if (!result.isInitialized()) {
846         throw newUninitializedMessageException(result);
847       }
848       return result;
849     }
850 
851     @java.lang.Override
buildPartial()852     public com.google.cloud.billing.v1.Sku buildPartial() {
853       com.google.cloud.billing.v1.Sku result = new com.google.cloud.billing.v1.Sku(this);
854       buildPartialRepeatedFields(result);
855       if (bitField0_ != 0) {
856         buildPartial0(result);
857       }
858       onBuilt();
859       return result;
860     }
861 
buildPartialRepeatedFields(com.google.cloud.billing.v1.Sku result)862     private void buildPartialRepeatedFields(com.google.cloud.billing.v1.Sku result) {
863       if (((bitField0_ & 0x00000010) != 0)) {
864         serviceRegions_ = serviceRegions_.getUnmodifiableView();
865         bitField0_ = (bitField0_ & ~0x00000010);
866       }
867       result.serviceRegions_ = serviceRegions_;
868       if (pricingInfoBuilder_ == null) {
869         if (((bitField0_ & 0x00000020) != 0)) {
870           pricingInfo_ = java.util.Collections.unmodifiableList(pricingInfo_);
871           bitField0_ = (bitField0_ & ~0x00000020);
872         }
873         result.pricingInfo_ = pricingInfo_;
874       } else {
875         result.pricingInfo_ = pricingInfoBuilder_.build();
876       }
877     }
878 
buildPartial0(com.google.cloud.billing.v1.Sku result)879     private void buildPartial0(com.google.cloud.billing.v1.Sku result) {
880       int from_bitField0_ = bitField0_;
881       if (((from_bitField0_ & 0x00000001) != 0)) {
882         result.name_ = name_;
883       }
884       if (((from_bitField0_ & 0x00000002) != 0)) {
885         result.skuId_ = skuId_;
886       }
887       if (((from_bitField0_ & 0x00000004) != 0)) {
888         result.description_ = description_;
889       }
890       if (((from_bitField0_ & 0x00000008) != 0)) {
891         result.category_ = categoryBuilder_ == null ? category_ : categoryBuilder_.build();
892       }
893       if (((from_bitField0_ & 0x00000040) != 0)) {
894         result.serviceProviderName_ = serviceProviderName_;
895       }
896       if (((from_bitField0_ & 0x00000080) != 0)) {
897         result.geoTaxonomy_ =
898             geoTaxonomyBuilder_ == null ? geoTaxonomy_ : geoTaxonomyBuilder_.build();
899       }
900     }
901 
902     @java.lang.Override
clone()903     public Builder clone() {
904       return super.clone();
905     }
906 
907     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)908     public Builder setField(
909         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
910       return super.setField(field, value);
911     }
912 
913     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)914     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
915       return super.clearField(field);
916     }
917 
918     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)919     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
920       return super.clearOneof(oneof);
921     }
922 
923     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)924     public Builder setRepeatedField(
925         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
926       return super.setRepeatedField(field, index, value);
927     }
928 
929     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)930     public Builder addRepeatedField(
931         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
932       return super.addRepeatedField(field, value);
933     }
934 
935     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)936     public Builder mergeFrom(com.google.protobuf.Message other) {
937       if (other instanceof com.google.cloud.billing.v1.Sku) {
938         return mergeFrom((com.google.cloud.billing.v1.Sku) other);
939       } else {
940         super.mergeFrom(other);
941         return this;
942       }
943     }
944 
mergeFrom(com.google.cloud.billing.v1.Sku other)945     public Builder mergeFrom(com.google.cloud.billing.v1.Sku other) {
946       if (other == com.google.cloud.billing.v1.Sku.getDefaultInstance()) return this;
947       if (!other.getName().isEmpty()) {
948         name_ = other.name_;
949         bitField0_ |= 0x00000001;
950         onChanged();
951       }
952       if (!other.getSkuId().isEmpty()) {
953         skuId_ = other.skuId_;
954         bitField0_ |= 0x00000002;
955         onChanged();
956       }
957       if (!other.getDescription().isEmpty()) {
958         description_ = other.description_;
959         bitField0_ |= 0x00000004;
960         onChanged();
961       }
962       if (other.hasCategory()) {
963         mergeCategory(other.getCategory());
964       }
965       if (!other.serviceRegions_.isEmpty()) {
966         if (serviceRegions_.isEmpty()) {
967           serviceRegions_ = other.serviceRegions_;
968           bitField0_ = (bitField0_ & ~0x00000010);
969         } else {
970           ensureServiceRegionsIsMutable();
971           serviceRegions_.addAll(other.serviceRegions_);
972         }
973         onChanged();
974       }
975       if (pricingInfoBuilder_ == null) {
976         if (!other.pricingInfo_.isEmpty()) {
977           if (pricingInfo_.isEmpty()) {
978             pricingInfo_ = other.pricingInfo_;
979             bitField0_ = (bitField0_ & ~0x00000020);
980           } else {
981             ensurePricingInfoIsMutable();
982             pricingInfo_.addAll(other.pricingInfo_);
983           }
984           onChanged();
985         }
986       } else {
987         if (!other.pricingInfo_.isEmpty()) {
988           if (pricingInfoBuilder_.isEmpty()) {
989             pricingInfoBuilder_.dispose();
990             pricingInfoBuilder_ = null;
991             pricingInfo_ = other.pricingInfo_;
992             bitField0_ = (bitField0_ & ~0x00000020);
993             pricingInfoBuilder_ =
994                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
995                     ? getPricingInfoFieldBuilder()
996                     : null;
997           } else {
998             pricingInfoBuilder_.addAllMessages(other.pricingInfo_);
999           }
1000         }
1001       }
1002       if (!other.getServiceProviderName().isEmpty()) {
1003         serviceProviderName_ = other.serviceProviderName_;
1004         bitField0_ |= 0x00000040;
1005         onChanged();
1006       }
1007       if (other.hasGeoTaxonomy()) {
1008         mergeGeoTaxonomy(other.getGeoTaxonomy());
1009       }
1010       this.mergeUnknownFields(other.getUnknownFields());
1011       onChanged();
1012       return this;
1013     }
1014 
1015     @java.lang.Override
isInitialized()1016     public final boolean isInitialized() {
1017       return true;
1018     }
1019 
1020     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1021     public Builder mergeFrom(
1022         com.google.protobuf.CodedInputStream input,
1023         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1024         throws java.io.IOException {
1025       if (extensionRegistry == null) {
1026         throw new java.lang.NullPointerException();
1027       }
1028       try {
1029         boolean done = false;
1030         while (!done) {
1031           int tag = input.readTag();
1032           switch (tag) {
1033             case 0:
1034               done = true;
1035               break;
1036             case 10:
1037               {
1038                 name_ = input.readStringRequireUtf8();
1039                 bitField0_ |= 0x00000001;
1040                 break;
1041               } // case 10
1042             case 18:
1043               {
1044                 skuId_ = input.readStringRequireUtf8();
1045                 bitField0_ |= 0x00000002;
1046                 break;
1047               } // case 18
1048             case 26:
1049               {
1050                 description_ = input.readStringRequireUtf8();
1051                 bitField0_ |= 0x00000004;
1052                 break;
1053               } // case 26
1054             case 34:
1055               {
1056                 input.readMessage(getCategoryFieldBuilder().getBuilder(), extensionRegistry);
1057                 bitField0_ |= 0x00000008;
1058                 break;
1059               } // case 34
1060             case 42:
1061               {
1062                 java.lang.String s = input.readStringRequireUtf8();
1063                 ensureServiceRegionsIsMutable();
1064                 serviceRegions_.add(s);
1065                 break;
1066               } // case 42
1067             case 50:
1068               {
1069                 com.google.cloud.billing.v1.PricingInfo m =
1070                     input.readMessage(
1071                         com.google.cloud.billing.v1.PricingInfo.parser(), extensionRegistry);
1072                 if (pricingInfoBuilder_ == null) {
1073                   ensurePricingInfoIsMutable();
1074                   pricingInfo_.add(m);
1075                 } else {
1076                   pricingInfoBuilder_.addMessage(m);
1077                 }
1078                 break;
1079               } // case 50
1080             case 58:
1081               {
1082                 serviceProviderName_ = input.readStringRequireUtf8();
1083                 bitField0_ |= 0x00000040;
1084                 break;
1085               } // case 58
1086             case 66:
1087               {
1088                 input.readMessage(getGeoTaxonomyFieldBuilder().getBuilder(), extensionRegistry);
1089                 bitField0_ |= 0x00000080;
1090                 break;
1091               } // case 66
1092             default:
1093               {
1094                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1095                   done = true; // was an endgroup tag
1096                 }
1097                 break;
1098               } // default:
1099           } // switch (tag)
1100         } // while (!done)
1101       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1102         throw e.unwrapIOException();
1103       } finally {
1104         onChanged();
1105       } // finally
1106       return this;
1107     }
1108 
1109     private int bitField0_;
1110 
1111     private java.lang.Object name_ = "";
1112     /**
1113      *
1114      *
1115      * <pre>
1116      * The resource name for the SKU.
1117      * Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE"
1118      * </pre>
1119      *
1120      * <code>string name = 1;</code>
1121      *
1122      * @return The name.
1123      */
getName()1124     public java.lang.String getName() {
1125       java.lang.Object ref = name_;
1126       if (!(ref instanceof java.lang.String)) {
1127         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1128         java.lang.String s = bs.toStringUtf8();
1129         name_ = s;
1130         return s;
1131       } else {
1132         return (java.lang.String) ref;
1133       }
1134     }
1135     /**
1136      *
1137      *
1138      * <pre>
1139      * The resource name for the SKU.
1140      * Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE"
1141      * </pre>
1142      *
1143      * <code>string name = 1;</code>
1144      *
1145      * @return The bytes for name.
1146      */
getNameBytes()1147     public com.google.protobuf.ByteString getNameBytes() {
1148       java.lang.Object ref = name_;
1149       if (ref instanceof String) {
1150         com.google.protobuf.ByteString b =
1151             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1152         name_ = b;
1153         return b;
1154       } else {
1155         return (com.google.protobuf.ByteString) ref;
1156       }
1157     }
1158     /**
1159      *
1160      *
1161      * <pre>
1162      * The resource name for the SKU.
1163      * Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE"
1164      * </pre>
1165      *
1166      * <code>string name = 1;</code>
1167      *
1168      * @param value The name to set.
1169      * @return This builder for chaining.
1170      */
setName(java.lang.String value)1171     public Builder setName(java.lang.String value) {
1172       if (value == null) {
1173         throw new NullPointerException();
1174       }
1175       name_ = value;
1176       bitField0_ |= 0x00000001;
1177       onChanged();
1178       return this;
1179     }
1180     /**
1181      *
1182      *
1183      * <pre>
1184      * The resource name for the SKU.
1185      * Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE"
1186      * </pre>
1187      *
1188      * <code>string name = 1;</code>
1189      *
1190      * @return This builder for chaining.
1191      */
clearName()1192     public Builder clearName() {
1193       name_ = getDefaultInstance().getName();
1194       bitField0_ = (bitField0_ & ~0x00000001);
1195       onChanged();
1196       return this;
1197     }
1198     /**
1199      *
1200      *
1201      * <pre>
1202      * The resource name for the SKU.
1203      * Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE"
1204      * </pre>
1205      *
1206      * <code>string name = 1;</code>
1207      *
1208      * @param value The bytes for name to set.
1209      * @return This builder for chaining.
1210      */
setNameBytes(com.google.protobuf.ByteString value)1211     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1212       if (value == null) {
1213         throw new NullPointerException();
1214       }
1215       checkByteStringIsUtf8(value);
1216       name_ = value;
1217       bitField0_ |= 0x00000001;
1218       onChanged();
1219       return this;
1220     }
1221 
1222     private java.lang.Object skuId_ = "";
1223     /**
1224      *
1225      *
1226      * <pre>
1227      * The identifier for the SKU.
1228      * Example: "AA95-CD31-42FE"
1229      * </pre>
1230      *
1231      * <code>string sku_id = 2;</code>
1232      *
1233      * @return The skuId.
1234      */
getSkuId()1235     public java.lang.String getSkuId() {
1236       java.lang.Object ref = skuId_;
1237       if (!(ref instanceof java.lang.String)) {
1238         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1239         java.lang.String s = bs.toStringUtf8();
1240         skuId_ = s;
1241         return s;
1242       } else {
1243         return (java.lang.String) ref;
1244       }
1245     }
1246     /**
1247      *
1248      *
1249      * <pre>
1250      * The identifier for the SKU.
1251      * Example: "AA95-CD31-42FE"
1252      * </pre>
1253      *
1254      * <code>string sku_id = 2;</code>
1255      *
1256      * @return The bytes for skuId.
1257      */
getSkuIdBytes()1258     public com.google.protobuf.ByteString getSkuIdBytes() {
1259       java.lang.Object ref = skuId_;
1260       if (ref instanceof String) {
1261         com.google.protobuf.ByteString b =
1262             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1263         skuId_ = b;
1264         return b;
1265       } else {
1266         return (com.google.protobuf.ByteString) ref;
1267       }
1268     }
1269     /**
1270      *
1271      *
1272      * <pre>
1273      * The identifier for the SKU.
1274      * Example: "AA95-CD31-42FE"
1275      * </pre>
1276      *
1277      * <code>string sku_id = 2;</code>
1278      *
1279      * @param value The skuId to set.
1280      * @return This builder for chaining.
1281      */
setSkuId(java.lang.String value)1282     public Builder setSkuId(java.lang.String value) {
1283       if (value == null) {
1284         throw new NullPointerException();
1285       }
1286       skuId_ = value;
1287       bitField0_ |= 0x00000002;
1288       onChanged();
1289       return this;
1290     }
1291     /**
1292      *
1293      *
1294      * <pre>
1295      * The identifier for the SKU.
1296      * Example: "AA95-CD31-42FE"
1297      * </pre>
1298      *
1299      * <code>string sku_id = 2;</code>
1300      *
1301      * @return This builder for chaining.
1302      */
clearSkuId()1303     public Builder clearSkuId() {
1304       skuId_ = getDefaultInstance().getSkuId();
1305       bitField0_ = (bitField0_ & ~0x00000002);
1306       onChanged();
1307       return this;
1308     }
1309     /**
1310      *
1311      *
1312      * <pre>
1313      * The identifier for the SKU.
1314      * Example: "AA95-CD31-42FE"
1315      * </pre>
1316      *
1317      * <code>string sku_id = 2;</code>
1318      *
1319      * @param value The bytes for skuId to set.
1320      * @return This builder for chaining.
1321      */
setSkuIdBytes(com.google.protobuf.ByteString value)1322     public Builder setSkuIdBytes(com.google.protobuf.ByteString value) {
1323       if (value == null) {
1324         throw new NullPointerException();
1325       }
1326       checkByteStringIsUtf8(value);
1327       skuId_ = value;
1328       bitField0_ |= 0x00000002;
1329       onChanged();
1330       return this;
1331     }
1332 
1333     private java.lang.Object description_ = "";
1334     /**
1335      *
1336      *
1337      * <pre>
1338      * A human readable description of the SKU, has a maximum length of 256
1339      * characters.
1340      * </pre>
1341      *
1342      * <code>string description = 3;</code>
1343      *
1344      * @return The description.
1345      */
getDescription()1346     public java.lang.String getDescription() {
1347       java.lang.Object ref = description_;
1348       if (!(ref instanceof java.lang.String)) {
1349         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1350         java.lang.String s = bs.toStringUtf8();
1351         description_ = s;
1352         return s;
1353       } else {
1354         return (java.lang.String) ref;
1355       }
1356     }
1357     /**
1358      *
1359      *
1360      * <pre>
1361      * A human readable description of the SKU, has a maximum length of 256
1362      * characters.
1363      * </pre>
1364      *
1365      * <code>string description = 3;</code>
1366      *
1367      * @return The bytes for description.
1368      */
getDescriptionBytes()1369     public com.google.protobuf.ByteString getDescriptionBytes() {
1370       java.lang.Object ref = description_;
1371       if (ref instanceof String) {
1372         com.google.protobuf.ByteString b =
1373             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1374         description_ = b;
1375         return b;
1376       } else {
1377         return (com.google.protobuf.ByteString) ref;
1378       }
1379     }
1380     /**
1381      *
1382      *
1383      * <pre>
1384      * A human readable description of the SKU, has a maximum length of 256
1385      * characters.
1386      * </pre>
1387      *
1388      * <code>string description = 3;</code>
1389      *
1390      * @param value The description to set.
1391      * @return This builder for chaining.
1392      */
setDescription(java.lang.String value)1393     public Builder setDescription(java.lang.String value) {
1394       if (value == null) {
1395         throw new NullPointerException();
1396       }
1397       description_ = value;
1398       bitField0_ |= 0x00000004;
1399       onChanged();
1400       return this;
1401     }
1402     /**
1403      *
1404      *
1405      * <pre>
1406      * A human readable description of the SKU, has a maximum length of 256
1407      * characters.
1408      * </pre>
1409      *
1410      * <code>string description = 3;</code>
1411      *
1412      * @return This builder for chaining.
1413      */
clearDescription()1414     public Builder clearDescription() {
1415       description_ = getDefaultInstance().getDescription();
1416       bitField0_ = (bitField0_ & ~0x00000004);
1417       onChanged();
1418       return this;
1419     }
1420     /**
1421      *
1422      *
1423      * <pre>
1424      * A human readable description of the SKU, has a maximum length of 256
1425      * characters.
1426      * </pre>
1427      *
1428      * <code>string description = 3;</code>
1429      *
1430      * @param value The bytes for description to set.
1431      * @return This builder for chaining.
1432      */
setDescriptionBytes(com.google.protobuf.ByteString value)1433     public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
1434       if (value == null) {
1435         throw new NullPointerException();
1436       }
1437       checkByteStringIsUtf8(value);
1438       description_ = value;
1439       bitField0_ |= 0x00000004;
1440       onChanged();
1441       return this;
1442     }
1443 
1444     private com.google.cloud.billing.v1.Category category_;
1445     private com.google.protobuf.SingleFieldBuilderV3<
1446             com.google.cloud.billing.v1.Category,
1447             com.google.cloud.billing.v1.Category.Builder,
1448             com.google.cloud.billing.v1.CategoryOrBuilder>
1449         categoryBuilder_;
1450     /**
1451      *
1452      *
1453      * <pre>
1454      * The category hierarchy of this SKU, purely for organizational purpose.
1455      * </pre>
1456      *
1457      * <code>.google.cloud.billing.v1.Category category = 4;</code>
1458      *
1459      * @return Whether the category field is set.
1460      */
hasCategory()1461     public boolean hasCategory() {
1462       return ((bitField0_ & 0x00000008) != 0);
1463     }
1464     /**
1465      *
1466      *
1467      * <pre>
1468      * The category hierarchy of this SKU, purely for organizational purpose.
1469      * </pre>
1470      *
1471      * <code>.google.cloud.billing.v1.Category category = 4;</code>
1472      *
1473      * @return The category.
1474      */
getCategory()1475     public com.google.cloud.billing.v1.Category getCategory() {
1476       if (categoryBuilder_ == null) {
1477         return category_ == null
1478             ? com.google.cloud.billing.v1.Category.getDefaultInstance()
1479             : category_;
1480       } else {
1481         return categoryBuilder_.getMessage();
1482       }
1483     }
1484     /**
1485      *
1486      *
1487      * <pre>
1488      * The category hierarchy of this SKU, purely for organizational purpose.
1489      * </pre>
1490      *
1491      * <code>.google.cloud.billing.v1.Category category = 4;</code>
1492      */
setCategory(com.google.cloud.billing.v1.Category value)1493     public Builder setCategory(com.google.cloud.billing.v1.Category value) {
1494       if (categoryBuilder_ == null) {
1495         if (value == null) {
1496           throw new NullPointerException();
1497         }
1498         category_ = value;
1499       } else {
1500         categoryBuilder_.setMessage(value);
1501       }
1502       bitField0_ |= 0x00000008;
1503       onChanged();
1504       return this;
1505     }
1506     /**
1507      *
1508      *
1509      * <pre>
1510      * The category hierarchy of this SKU, purely for organizational purpose.
1511      * </pre>
1512      *
1513      * <code>.google.cloud.billing.v1.Category category = 4;</code>
1514      */
setCategory(com.google.cloud.billing.v1.Category.Builder builderForValue)1515     public Builder setCategory(com.google.cloud.billing.v1.Category.Builder builderForValue) {
1516       if (categoryBuilder_ == null) {
1517         category_ = builderForValue.build();
1518       } else {
1519         categoryBuilder_.setMessage(builderForValue.build());
1520       }
1521       bitField0_ |= 0x00000008;
1522       onChanged();
1523       return this;
1524     }
1525     /**
1526      *
1527      *
1528      * <pre>
1529      * The category hierarchy of this SKU, purely for organizational purpose.
1530      * </pre>
1531      *
1532      * <code>.google.cloud.billing.v1.Category category = 4;</code>
1533      */
mergeCategory(com.google.cloud.billing.v1.Category value)1534     public Builder mergeCategory(com.google.cloud.billing.v1.Category value) {
1535       if (categoryBuilder_ == null) {
1536         if (((bitField0_ & 0x00000008) != 0)
1537             && category_ != null
1538             && category_ != com.google.cloud.billing.v1.Category.getDefaultInstance()) {
1539           getCategoryBuilder().mergeFrom(value);
1540         } else {
1541           category_ = value;
1542         }
1543       } else {
1544         categoryBuilder_.mergeFrom(value);
1545       }
1546       bitField0_ |= 0x00000008;
1547       onChanged();
1548       return this;
1549     }
1550     /**
1551      *
1552      *
1553      * <pre>
1554      * The category hierarchy of this SKU, purely for organizational purpose.
1555      * </pre>
1556      *
1557      * <code>.google.cloud.billing.v1.Category category = 4;</code>
1558      */
clearCategory()1559     public Builder clearCategory() {
1560       bitField0_ = (bitField0_ & ~0x00000008);
1561       category_ = null;
1562       if (categoryBuilder_ != null) {
1563         categoryBuilder_.dispose();
1564         categoryBuilder_ = null;
1565       }
1566       onChanged();
1567       return this;
1568     }
1569     /**
1570      *
1571      *
1572      * <pre>
1573      * The category hierarchy of this SKU, purely for organizational purpose.
1574      * </pre>
1575      *
1576      * <code>.google.cloud.billing.v1.Category category = 4;</code>
1577      */
getCategoryBuilder()1578     public com.google.cloud.billing.v1.Category.Builder getCategoryBuilder() {
1579       bitField0_ |= 0x00000008;
1580       onChanged();
1581       return getCategoryFieldBuilder().getBuilder();
1582     }
1583     /**
1584      *
1585      *
1586      * <pre>
1587      * The category hierarchy of this SKU, purely for organizational purpose.
1588      * </pre>
1589      *
1590      * <code>.google.cloud.billing.v1.Category category = 4;</code>
1591      */
getCategoryOrBuilder()1592     public com.google.cloud.billing.v1.CategoryOrBuilder getCategoryOrBuilder() {
1593       if (categoryBuilder_ != null) {
1594         return categoryBuilder_.getMessageOrBuilder();
1595       } else {
1596         return category_ == null
1597             ? com.google.cloud.billing.v1.Category.getDefaultInstance()
1598             : category_;
1599       }
1600     }
1601     /**
1602      *
1603      *
1604      * <pre>
1605      * The category hierarchy of this SKU, purely for organizational purpose.
1606      * </pre>
1607      *
1608      * <code>.google.cloud.billing.v1.Category category = 4;</code>
1609      */
1610     private com.google.protobuf.SingleFieldBuilderV3<
1611             com.google.cloud.billing.v1.Category,
1612             com.google.cloud.billing.v1.Category.Builder,
1613             com.google.cloud.billing.v1.CategoryOrBuilder>
getCategoryFieldBuilder()1614         getCategoryFieldBuilder() {
1615       if (categoryBuilder_ == null) {
1616         categoryBuilder_ =
1617             new com.google.protobuf.SingleFieldBuilderV3<
1618                 com.google.cloud.billing.v1.Category,
1619                 com.google.cloud.billing.v1.Category.Builder,
1620                 com.google.cloud.billing.v1.CategoryOrBuilder>(
1621                 getCategory(), getParentForChildren(), isClean());
1622         category_ = null;
1623       }
1624       return categoryBuilder_;
1625     }
1626 
1627     private com.google.protobuf.LazyStringList serviceRegions_ =
1628         com.google.protobuf.LazyStringArrayList.EMPTY;
1629 
ensureServiceRegionsIsMutable()1630     private void ensureServiceRegionsIsMutable() {
1631       if (!((bitField0_ & 0x00000010) != 0)) {
1632         serviceRegions_ = new com.google.protobuf.LazyStringArrayList(serviceRegions_);
1633         bitField0_ |= 0x00000010;
1634       }
1635     }
1636     /**
1637      *
1638      *
1639      * <pre>
1640      * List of service regions this SKU is offered at.
1641      * Example: "asia-east1"
1642      * Service regions can be found at https://cloud.google.com/about/locations/
1643      * </pre>
1644      *
1645      * <code>repeated string service_regions = 5;</code>
1646      *
1647      * @return A list containing the serviceRegions.
1648      */
getServiceRegionsList()1649     public com.google.protobuf.ProtocolStringList getServiceRegionsList() {
1650       return serviceRegions_.getUnmodifiableView();
1651     }
1652     /**
1653      *
1654      *
1655      * <pre>
1656      * List of service regions this SKU is offered at.
1657      * Example: "asia-east1"
1658      * Service regions can be found at https://cloud.google.com/about/locations/
1659      * </pre>
1660      *
1661      * <code>repeated string service_regions = 5;</code>
1662      *
1663      * @return The count of serviceRegions.
1664      */
getServiceRegionsCount()1665     public int getServiceRegionsCount() {
1666       return serviceRegions_.size();
1667     }
1668     /**
1669      *
1670      *
1671      * <pre>
1672      * List of service regions this SKU is offered at.
1673      * Example: "asia-east1"
1674      * Service regions can be found at https://cloud.google.com/about/locations/
1675      * </pre>
1676      *
1677      * <code>repeated string service_regions = 5;</code>
1678      *
1679      * @param index The index of the element to return.
1680      * @return The serviceRegions at the given index.
1681      */
getServiceRegions(int index)1682     public java.lang.String getServiceRegions(int index) {
1683       return serviceRegions_.get(index);
1684     }
1685     /**
1686      *
1687      *
1688      * <pre>
1689      * List of service regions this SKU is offered at.
1690      * Example: "asia-east1"
1691      * Service regions can be found at https://cloud.google.com/about/locations/
1692      * </pre>
1693      *
1694      * <code>repeated string service_regions = 5;</code>
1695      *
1696      * @param index The index of the value to return.
1697      * @return The bytes of the serviceRegions at the given index.
1698      */
getServiceRegionsBytes(int index)1699     public com.google.protobuf.ByteString getServiceRegionsBytes(int index) {
1700       return serviceRegions_.getByteString(index);
1701     }
1702     /**
1703      *
1704      *
1705      * <pre>
1706      * List of service regions this SKU is offered at.
1707      * Example: "asia-east1"
1708      * Service regions can be found at https://cloud.google.com/about/locations/
1709      * </pre>
1710      *
1711      * <code>repeated string service_regions = 5;</code>
1712      *
1713      * @param index The index to set the value at.
1714      * @param value The serviceRegions to set.
1715      * @return This builder for chaining.
1716      */
setServiceRegions(int index, java.lang.String value)1717     public Builder setServiceRegions(int index, java.lang.String value) {
1718       if (value == null) {
1719         throw new NullPointerException();
1720       }
1721       ensureServiceRegionsIsMutable();
1722       serviceRegions_.set(index, value);
1723       onChanged();
1724       return this;
1725     }
1726     /**
1727      *
1728      *
1729      * <pre>
1730      * List of service regions this SKU is offered at.
1731      * Example: "asia-east1"
1732      * Service regions can be found at https://cloud.google.com/about/locations/
1733      * </pre>
1734      *
1735      * <code>repeated string service_regions = 5;</code>
1736      *
1737      * @param value The serviceRegions to add.
1738      * @return This builder for chaining.
1739      */
addServiceRegions(java.lang.String value)1740     public Builder addServiceRegions(java.lang.String value) {
1741       if (value == null) {
1742         throw new NullPointerException();
1743       }
1744       ensureServiceRegionsIsMutable();
1745       serviceRegions_.add(value);
1746       onChanged();
1747       return this;
1748     }
1749     /**
1750      *
1751      *
1752      * <pre>
1753      * List of service regions this SKU is offered at.
1754      * Example: "asia-east1"
1755      * Service regions can be found at https://cloud.google.com/about/locations/
1756      * </pre>
1757      *
1758      * <code>repeated string service_regions = 5;</code>
1759      *
1760      * @param values The serviceRegions to add.
1761      * @return This builder for chaining.
1762      */
addAllServiceRegions(java.lang.Iterable<java.lang.String> values)1763     public Builder addAllServiceRegions(java.lang.Iterable<java.lang.String> values) {
1764       ensureServiceRegionsIsMutable();
1765       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceRegions_);
1766       onChanged();
1767       return this;
1768     }
1769     /**
1770      *
1771      *
1772      * <pre>
1773      * List of service regions this SKU is offered at.
1774      * Example: "asia-east1"
1775      * Service regions can be found at https://cloud.google.com/about/locations/
1776      * </pre>
1777      *
1778      * <code>repeated string service_regions = 5;</code>
1779      *
1780      * @return This builder for chaining.
1781      */
clearServiceRegions()1782     public Builder clearServiceRegions() {
1783       serviceRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1784       bitField0_ = (bitField0_ & ~0x00000010);
1785       onChanged();
1786       return this;
1787     }
1788     /**
1789      *
1790      *
1791      * <pre>
1792      * List of service regions this SKU is offered at.
1793      * Example: "asia-east1"
1794      * Service regions can be found at https://cloud.google.com/about/locations/
1795      * </pre>
1796      *
1797      * <code>repeated string service_regions = 5;</code>
1798      *
1799      * @param value The bytes of the serviceRegions to add.
1800      * @return This builder for chaining.
1801      */
addServiceRegionsBytes(com.google.protobuf.ByteString value)1802     public Builder addServiceRegionsBytes(com.google.protobuf.ByteString value) {
1803       if (value == null) {
1804         throw new NullPointerException();
1805       }
1806       checkByteStringIsUtf8(value);
1807       ensureServiceRegionsIsMutable();
1808       serviceRegions_.add(value);
1809       onChanged();
1810       return this;
1811     }
1812 
1813     private java.util.List<com.google.cloud.billing.v1.PricingInfo> pricingInfo_ =
1814         java.util.Collections.emptyList();
1815 
ensurePricingInfoIsMutable()1816     private void ensurePricingInfoIsMutable() {
1817       if (!((bitField0_ & 0x00000020) != 0)) {
1818         pricingInfo_ =
1819             new java.util.ArrayList<com.google.cloud.billing.v1.PricingInfo>(pricingInfo_);
1820         bitField0_ |= 0x00000020;
1821       }
1822     }
1823 
1824     private com.google.protobuf.RepeatedFieldBuilderV3<
1825             com.google.cloud.billing.v1.PricingInfo,
1826             com.google.cloud.billing.v1.PricingInfo.Builder,
1827             com.google.cloud.billing.v1.PricingInfoOrBuilder>
1828         pricingInfoBuilder_;
1829 
1830     /**
1831      *
1832      *
1833      * <pre>
1834      * A timeline of pricing info for this SKU in chronological order.
1835      * </pre>
1836      *
1837      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
1838      */
getPricingInfoList()1839     public java.util.List<com.google.cloud.billing.v1.PricingInfo> getPricingInfoList() {
1840       if (pricingInfoBuilder_ == null) {
1841         return java.util.Collections.unmodifiableList(pricingInfo_);
1842       } else {
1843         return pricingInfoBuilder_.getMessageList();
1844       }
1845     }
1846     /**
1847      *
1848      *
1849      * <pre>
1850      * A timeline of pricing info for this SKU in chronological order.
1851      * </pre>
1852      *
1853      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
1854      */
getPricingInfoCount()1855     public int getPricingInfoCount() {
1856       if (pricingInfoBuilder_ == null) {
1857         return pricingInfo_.size();
1858       } else {
1859         return pricingInfoBuilder_.getCount();
1860       }
1861     }
1862     /**
1863      *
1864      *
1865      * <pre>
1866      * A timeline of pricing info for this SKU in chronological order.
1867      * </pre>
1868      *
1869      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
1870      */
getPricingInfo(int index)1871     public com.google.cloud.billing.v1.PricingInfo getPricingInfo(int index) {
1872       if (pricingInfoBuilder_ == null) {
1873         return pricingInfo_.get(index);
1874       } else {
1875         return pricingInfoBuilder_.getMessage(index);
1876       }
1877     }
1878     /**
1879      *
1880      *
1881      * <pre>
1882      * A timeline of pricing info for this SKU in chronological order.
1883      * </pre>
1884      *
1885      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
1886      */
setPricingInfo(int index, com.google.cloud.billing.v1.PricingInfo value)1887     public Builder setPricingInfo(int index, com.google.cloud.billing.v1.PricingInfo value) {
1888       if (pricingInfoBuilder_ == null) {
1889         if (value == null) {
1890           throw new NullPointerException();
1891         }
1892         ensurePricingInfoIsMutable();
1893         pricingInfo_.set(index, value);
1894         onChanged();
1895       } else {
1896         pricingInfoBuilder_.setMessage(index, value);
1897       }
1898       return this;
1899     }
1900     /**
1901      *
1902      *
1903      * <pre>
1904      * A timeline of pricing info for this SKU in chronological order.
1905      * </pre>
1906      *
1907      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
1908      */
setPricingInfo( int index, com.google.cloud.billing.v1.PricingInfo.Builder builderForValue)1909     public Builder setPricingInfo(
1910         int index, com.google.cloud.billing.v1.PricingInfo.Builder builderForValue) {
1911       if (pricingInfoBuilder_ == null) {
1912         ensurePricingInfoIsMutable();
1913         pricingInfo_.set(index, builderForValue.build());
1914         onChanged();
1915       } else {
1916         pricingInfoBuilder_.setMessage(index, builderForValue.build());
1917       }
1918       return this;
1919     }
1920     /**
1921      *
1922      *
1923      * <pre>
1924      * A timeline of pricing info for this SKU in chronological order.
1925      * </pre>
1926      *
1927      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
1928      */
addPricingInfo(com.google.cloud.billing.v1.PricingInfo value)1929     public Builder addPricingInfo(com.google.cloud.billing.v1.PricingInfo value) {
1930       if (pricingInfoBuilder_ == null) {
1931         if (value == null) {
1932           throw new NullPointerException();
1933         }
1934         ensurePricingInfoIsMutable();
1935         pricingInfo_.add(value);
1936         onChanged();
1937       } else {
1938         pricingInfoBuilder_.addMessage(value);
1939       }
1940       return this;
1941     }
1942     /**
1943      *
1944      *
1945      * <pre>
1946      * A timeline of pricing info for this SKU in chronological order.
1947      * </pre>
1948      *
1949      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
1950      */
addPricingInfo(int index, com.google.cloud.billing.v1.PricingInfo value)1951     public Builder addPricingInfo(int index, com.google.cloud.billing.v1.PricingInfo value) {
1952       if (pricingInfoBuilder_ == null) {
1953         if (value == null) {
1954           throw new NullPointerException();
1955         }
1956         ensurePricingInfoIsMutable();
1957         pricingInfo_.add(index, value);
1958         onChanged();
1959       } else {
1960         pricingInfoBuilder_.addMessage(index, value);
1961       }
1962       return this;
1963     }
1964     /**
1965      *
1966      *
1967      * <pre>
1968      * A timeline of pricing info for this SKU in chronological order.
1969      * </pre>
1970      *
1971      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
1972      */
addPricingInfo(com.google.cloud.billing.v1.PricingInfo.Builder builderForValue)1973     public Builder addPricingInfo(com.google.cloud.billing.v1.PricingInfo.Builder builderForValue) {
1974       if (pricingInfoBuilder_ == null) {
1975         ensurePricingInfoIsMutable();
1976         pricingInfo_.add(builderForValue.build());
1977         onChanged();
1978       } else {
1979         pricingInfoBuilder_.addMessage(builderForValue.build());
1980       }
1981       return this;
1982     }
1983     /**
1984      *
1985      *
1986      * <pre>
1987      * A timeline of pricing info for this SKU in chronological order.
1988      * </pre>
1989      *
1990      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
1991      */
addPricingInfo( int index, com.google.cloud.billing.v1.PricingInfo.Builder builderForValue)1992     public Builder addPricingInfo(
1993         int index, com.google.cloud.billing.v1.PricingInfo.Builder builderForValue) {
1994       if (pricingInfoBuilder_ == null) {
1995         ensurePricingInfoIsMutable();
1996         pricingInfo_.add(index, builderForValue.build());
1997         onChanged();
1998       } else {
1999         pricingInfoBuilder_.addMessage(index, builderForValue.build());
2000       }
2001       return this;
2002     }
2003     /**
2004      *
2005      *
2006      * <pre>
2007      * A timeline of pricing info for this SKU in chronological order.
2008      * </pre>
2009      *
2010      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
2011      */
addAllPricingInfo( java.lang.Iterable<? extends com.google.cloud.billing.v1.PricingInfo> values)2012     public Builder addAllPricingInfo(
2013         java.lang.Iterable<? extends com.google.cloud.billing.v1.PricingInfo> values) {
2014       if (pricingInfoBuilder_ == null) {
2015         ensurePricingInfoIsMutable();
2016         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pricingInfo_);
2017         onChanged();
2018       } else {
2019         pricingInfoBuilder_.addAllMessages(values);
2020       }
2021       return this;
2022     }
2023     /**
2024      *
2025      *
2026      * <pre>
2027      * A timeline of pricing info for this SKU in chronological order.
2028      * </pre>
2029      *
2030      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
2031      */
clearPricingInfo()2032     public Builder clearPricingInfo() {
2033       if (pricingInfoBuilder_ == null) {
2034         pricingInfo_ = java.util.Collections.emptyList();
2035         bitField0_ = (bitField0_ & ~0x00000020);
2036         onChanged();
2037       } else {
2038         pricingInfoBuilder_.clear();
2039       }
2040       return this;
2041     }
2042     /**
2043      *
2044      *
2045      * <pre>
2046      * A timeline of pricing info for this SKU in chronological order.
2047      * </pre>
2048      *
2049      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
2050      */
removePricingInfo(int index)2051     public Builder removePricingInfo(int index) {
2052       if (pricingInfoBuilder_ == null) {
2053         ensurePricingInfoIsMutable();
2054         pricingInfo_.remove(index);
2055         onChanged();
2056       } else {
2057         pricingInfoBuilder_.remove(index);
2058       }
2059       return this;
2060     }
2061     /**
2062      *
2063      *
2064      * <pre>
2065      * A timeline of pricing info for this SKU in chronological order.
2066      * </pre>
2067      *
2068      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
2069      */
getPricingInfoBuilder(int index)2070     public com.google.cloud.billing.v1.PricingInfo.Builder getPricingInfoBuilder(int index) {
2071       return getPricingInfoFieldBuilder().getBuilder(index);
2072     }
2073     /**
2074      *
2075      *
2076      * <pre>
2077      * A timeline of pricing info for this SKU in chronological order.
2078      * </pre>
2079      *
2080      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
2081      */
getPricingInfoOrBuilder(int index)2082     public com.google.cloud.billing.v1.PricingInfoOrBuilder getPricingInfoOrBuilder(int index) {
2083       if (pricingInfoBuilder_ == null) {
2084         return pricingInfo_.get(index);
2085       } else {
2086         return pricingInfoBuilder_.getMessageOrBuilder(index);
2087       }
2088     }
2089     /**
2090      *
2091      *
2092      * <pre>
2093      * A timeline of pricing info for this SKU in chronological order.
2094      * </pre>
2095      *
2096      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
2097      */
2098     public java.util.List<? extends com.google.cloud.billing.v1.PricingInfoOrBuilder>
getPricingInfoOrBuilderList()2099         getPricingInfoOrBuilderList() {
2100       if (pricingInfoBuilder_ != null) {
2101         return pricingInfoBuilder_.getMessageOrBuilderList();
2102       } else {
2103         return java.util.Collections.unmodifiableList(pricingInfo_);
2104       }
2105     }
2106     /**
2107      *
2108      *
2109      * <pre>
2110      * A timeline of pricing info for this SKU in chronological order.
2111      * </pre>
2112      *
2113      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
2114      */
addPricingInfoBuilder()2115     public com.google.cloud.billing.v1.PricingInfo.Builder addPricingInfoBuilder() {
2116       return getPricingInfoFieldBuilder()
2117           .addBuilder(com.google.cloud.billing.v1.PricingInfo.getDefaultInstance());
2118     }
2119     /**
2120      *
2121      *
2122      * <pre>
2123      * A timeline of pricing info for this SKU in chronological order.
2124      * </pre>
2125      *
2126      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
2127      */
addPricingInfoBuilder(int index)2128     public com.google.cloud.billing.v1.PricingInfo.Builder addPricingInfoBuilder(int index) {
2129       return getPricingInfoFieldBuilder()
2130           .addBuilder(index, com.google.cloud.billing.v1.PricingInfo.getDefaultInstance());
2131     }
2132     /**
2133      *
2134      *
2135      * <pre>
2136      * A timeline of pricing info for this SKU in chronological order.
2137      * </pre>
2138      *
2139      * <code>repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;</code>
2140      */
2141     public java.util.List<com.google.cloud.billing.v1.PricingInfo.Builder>
getPricingInfoBuilderList()2142         getPricingInfoBuilderList() {
2143       return getPricingInfoFieldBuilder().getBuilderList();
2144     }
2145 
2146     private com.google.protobuf.RepeatedFieldBuilderV3<
2147             com.google.cloud.billing.v1.PricingInfo,
2148             com.google.cloud.billing.v1.PricingInfo.Builder,
2149             com.google.cloud.billing.v1.PricingInfoOrBuilder>
getPricingInfoFieldBuilder()2150         getPricingInfoFieldBuilder() {
2151       if (pricingInfoBuilder_ == null) {
2152         pricingInfoBuilder_ =
2153             new com.google.protobuf.RepeatedFieldBuilderV3<
2154                 com.google.cloud.billing.v1.PricingInfo,
2155                 com.google.cloud.billing.v1.PricingInfo.Builder,
2156                 com.google.cloud.billing.v1.PricingInfoOrBuilder>(
2157                 pricingInfo_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean());
2158         pricingInfo_ = null;
2159       }
2160       return pricingInfoBuilder_;
2161     }
2162 
2163     private java.lang.Object serviceProviderName_ = "";
2164     /**
2165      *
2166      *
2167      * <pre>
2168      * Identifies the service provider.
2169      * This is 'Google' for first party services in Google Cloud Platform.
2170      * </pre>
2171      *
2172      * <code>string service_provider_name = 7;</code>
2173      *
2174      * @return The serviceProviderName.
2175      */
getServiceProviderName()2176     public java.lang.String getServiceProviderName() {
2177       java.lang.Object ref = serviceProviderName_;
2178       if (!(ref instanceof java.lang.String)) {
2179         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2180         java.lang.String s = bs.toStringUtf8();
2181         serviceProviderName_ = s;
2182         return s;
2183       } else {
2184         return (java.lang.String) ref;
2185       }
2186     }
2187     /**
2188      *
2189      *
2190      * <pre>
2191      * Identifies the service provider.
2192      * This is 'Google' for first party services in Google Cloud Platform.
2193      * </pre>
2194      *
2195      * <code>string service_provider_name = 7;</code>
2196      *
2197      * @return The bytes for serviceProviderName.
2198      */
getServiceProviderNameBytes()2199     public com.google.protobuf.ByteString getServiceProviderNameBytes() {
2200       java.lang.Object ref = serviceProviderName_;
2201       if (ref instanceof String) {
2202         com.google.protobuf.ByteString b =
2203             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2204         serviceProviderName_ = b;
2205         return b;
2206       } else {
2207         return (com.google.protobuf.ByteString) ref;
2208       }
2209     }
2210     /**
2211      *
2212      *
2213      * <pre>
2214      * Identifies the service provider.
2215      * This is 'Google' for first party services in Google Cloud Platform.
2216      * </pre>
2217      *
2218      * <code>string service_provider_name = 7;</code>
2219      *
2220      * @param value The serviceProviderName to set.
2221      * @return This builder for chaining.
2222      */
setServiceProviderName(java.lang.String value)2223     public Builder setServiceProviderName(java.lang.String value) {
2224       if (value == null) {
2225         throw new NullPointerException();
2226       }
2227       serviceProviderName_ = value;
2228       bitField0_ |= 0x00000040;
2229       onChanged();
2230       return this;
2231     }
2232     /**
2233      *
2234      *
2235      * <pre>
2236      * Identifies the service provider.
2237      * This is 'Google' for first party services in Google Cloud Platform.
2238      * </pre>
2239      *
2240      * <code>string service_provider_name = 7;</code>
2241      *
2242      * @return This builder for chaining.
2243      */
clearServiceProviderName()2244     public Builder clearServiceProviderName() {
2245       serviceProviderName_ = getDefaultInstance().getServiceProviderName();
2246       bitField0_ = (bitField0_ & ~0x00000040);
2247       onChanged();
2248       return this;
2249     }
2250     /**
2251      *
2252      *
2253      * <pre>
2254      * Identifies the service provider.
2255      * This is 'Google' for first party services in Google Cloud Platform.
2256      * </pre>
2257      *
2258      * <code>string service_provider_name = 7;</code>
2259      *
2260      * @param value The bytes for serviceProviderName to set.
2261      * @return This builder for chaining.
2262      */
setServiceProviderNameBytes(com.google.protobuf.ByteString value)2263     public Builder setServiceProviderNameBytes(com.google.protobuf.ByteString value) {
2264       if (value == null) {
2265         throw new NullPointerException();
2266       }
2267       checkByteStringIsUtf8(value);
2268       serviceProviderName_ = value;
2269       bitField0_ |= 0x00000040;
2270       onChanged();
2271       return this;
2272     }
2273 
2274     private com.google.cloud.billing.v1.GeoTaxonomy geoTaxonomy_;
2275     private com.google.protobuf.SingleFieldBuilderV3<
2276             com.google.cloud.billing.v1.GeoTaxonomy,
2277             com.google.cloud.billing.v1.GeoTaxonomy.Builder,
2278             com.google.cloud.billing.v1.GeoTaxonomyOrBuilder>
2279         geoTaxonomyBuilder_;
2280     /**
2281      *
2282      *
2283      * <pre>
2284      * The geographic taxonomy for this sku.
2285      * </pre>
2286      *
2287      * <code>.google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8;</code>
2288      *
2289      * @return Whether the geoTaxonomy field is set.
2290      */
hasGeoTaxonomy()2291     public boolean hasGeoTaxonomy() {
2292       return ((bitField0_ & 0x00000080) != 0);
2293     }
2294     /**
2295      *
2296      *
2297      * <pre>
2298      * The geographic taxonomy for this sku.
2299      * </pre>
2300      *
2301      * <code>.google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8;</code>
2302      *
2303      * @return The geoTaxonomy.
2304      */
getGeoTaxonomy()2305     public com.google.cloud.billing.v1.GeoTaxonomy getGeoTaxonomy() {
2306       if (geoTaxonomyBuilder_ == null) {
2307         return geoTaxonomy_ == null
2308             ? com.google.cloud.billing.v1.GeoTaxonomy.getDefaultInstance()
2309             : geoTaxonomy_;
2310       } else {
2311         return geoTaxonomyBuilder_.getMessage();
2312       }
2313     }
2314     /**
2315      *
2316      *
2317      * <pre>
2318      * The geographic taxonomy for this sku.
2319      * </pre>
2320      *
2321      * <code>.google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8;</code>
2322      */
setGeoTaxonomy(com.google.cloud.billing.v1.GeoTaxonomy value)2323     public Builder setGeoTaxonomy(com.google.cloud.billing.v1.GeoTaxonomy value) {
2324       if (geoTaxonomyBuilder_ == null) {
2325         if (value == null) {
2326           throw new NullPointerException();
2327         }
2328         geoTaxonomy_ = value;
2329       } else {
2330         geoTaxonomyBuilder_.setMessage(value);
2331       }
2332       bitField0_ |= 0x00000080;
2333       onChanged();
2334       return this;
2335     }
2336     /**
2337      *
2338      *
2339      * <pre>
2340      * The geographic taxonomy for this sku.
2341      * </pre>
2342      *
2343      * <code>.google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8;</code>
2344      */
setGeoTaxonomy(com.google.cloud.billing.v1.GeoTaxonomy.Builder builderForValue)2345     public Builder setGeoTaxonomy(com.google.cloud.billing.v1.GeoTaxonomy.Builder builderForValue) {
2346       if (geoTaxonomyBuilder_ == null) {
2347         geoTaxonomy_ = builderForValue.build();
2348       } else {
2349         geoTaxonomyBuilder_.setMessage(builderForValue.build());
2350       }
2351       bitField0_ |= 0x00000080;
2352       onChanged();
2353       return this;
2354     }
2355     /**
2356      *
2357      *
2358      * <pre>
2359      * The geographic taxonomy for this sku.
2360      * </pre>
2361      *
2362      * <code>.google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8;</code>
2363      */
mergeGeoTaxonomy(com.google.cloud.billing.v1.GeoTaxonomy value)2364     public Builder mergeGeoTaxonomy(com.google.cloud.billing.v1.GeoTaxonomy value) {
2365       if (geoTaxonomyBuilder_ == null) {
2366         if (((bitField0_ & 0x00000080) != 0)
2367             && geoTaxonomy_ != null
2368             && geoTaxonomy_ != com.google.cloud.billing.v1.GeoTaxonomy.getDefaultInstance()) {
2369           getGeoTaxonomyBuilder().mergeFrom(value);
2370         } else {
2371           geoTaxonomy_ = value;
2372         }
2373       } else {
2374         geoTaxonomyBuilder_.mergeFrom(value);
2375       }
2376       bitField0_ |= 0x00000080;
2377       onChanged();
2378       return this;
2379     }
2380     /**
2381      *
2382      *
2383      * <pre>
2384      * The geographic taxonomy for this sku.
2385      * </pre>
2386      *
2387      * <code>.google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8;</code>
2388      */
clearGeoTaxonomy()2389     public Builder clearGeoTaxonomy() {
2390       bitField0_ = (bitField0_ & ~0x00000080);
2391       geoTaxonomy_ = null;
2392       if (geoTaxonomyBuilder_ != null) {
2393         geoTaxonomyBuilder_.dispose();
2394         geoTaxonomyBuilder_ = null;
2395       }
2396       onChanged();
2397       return this;
2398     }
2399     /**
2400      *
2401      *
2402      * <pre>
2403      * The geographic taxonomy for this sku.
2404      * </pre>
2405      *
2406      * <code>.google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8;</code>
2407      */
getGeoTaxonomyBuilder()2408     public com.google.cloud.billing.v1.GeoTaxonomy.Builder getGeoTaxonomyBuilder() {
2409       bitField0_ |= 0x00000080;
2410       onChanged();
2411       return getGeoTaxonomyFieldBuilder().getBuilder();
2412     }
2413     /**
2414      *
2415      *
2416      * <pre>
2417      * The geographic taxonomy for this sku.
2418      * </pre>
2419      *
2420      * <code>.google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8;</code>
2421      */
getGeoTaxonomyOrBuilder()2422     public com.google.cloud.billing.v1.GeoTaxonomyOrBuilder getGeoTaxonomyOrBuilder() {
2423       if (geoTaxonomyBuilder_ != null) {
2424         return geoTaxonomyBuilder_.getMessageOrBuilder();
2425       } else {
2426         return geoTaxonomy_ == null
2427             ? com.google.cloud.billing.v1.GeoTaxonomy.getDefaultInstance()
2428             : geoTaxonomy_;
2429       }
2430     }
2431     /**
2432      *
2433      *
2434      * <pre>
2435      * The geographic taxonomy for this sku.
2436      * </pre>
2437      *
2438      * <code>.google.cloud.billing.v1.GeoTaxonomy geo_taxonomy = 8;</code>
2439      */
2440     private com.google.protobuf.SingleFieldBuilderV3<
2441             com.google.cloud.billing.v1.GeoTaxonomy,
2442             com.google.cloud.billing.v1.GeoTaxonomy.Builder,
2443             com.google.cloud.billing.v1.GeoTaxonomyOrBuilder>
getGeoTaxonomyFieldBuilder()2444         getGeoTaxonomyFieldBuilder() {
2445       if (geoTaxonomyBuilder_ == null) {
2446         geoTaxonomyBuilder_ =
2447             new com.google.protobuf.SingleFieldBuilderV3<
2448                 com.google.cloud.billing.v1.GeoTaxonomy,
2449                 com.google.cloud.billing.v1.GeoTaxonomy.Builder,
2450                 com.google.cloud.billing.v1.GeoTaxonomyOrBuilder>(
2451                 getGeoTaxonomy(), getParentForChildren(), isClean());
2452         geoTaxonomy_ = null;
2453       }
2454       return geoTaxonomyBuilder_;
2455     }
2456 
2457     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2458     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
2459       return super.setUnknownFields(unknownFields);
2460     }
2461 
2462     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2463     public final Builder mergeUnknownFields(
2464         final com.google.protobuf.UnknownFieldSet unknownFields) {
2465       return super.mergeUnknownFields(unknownFields);
2466     }
2467 
2468     // @@protoc_insertion_point(builder_scope:google.cloud.billing.v1.Sku)
2469   }
2470 
2471   // @@protoc_insertion_point(class_scope:google.cloud.billing.v1.Sku)
2472   private static final com.google.cloud.billing.v1.Sku DEFAULT_INSTANCE;
2473 
2474   static {
2475     DEFAULT_INSTANCE = new com.google.cloud.billing.v1.Sku();
2476   }
2477 
getDefaultInstance()2478   public static com.google.cloud.billing.v1.Sku getDefaultInstance() {
2479     return DEFAULT_INSTANCE;
2480   }
2481 
2482   private static final com.google.protobuf.Parser<Sku> PARSER =
2483       new com.google.protobuf.AbstractParser<Sku>() {
2484         @java.lang.Override
2485         public Sku parsePartialFrom(
2486             com.google.protobuf.CodedInputStream input,
2487             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2488             throws com.google.protobuf.InvalidProtocolBufferException {
2489           Builder builder = newBuilder();
2490           try {
2491             builder.mergeFrom(input, extensionRegistry);
2492           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2493             throw e.setUnfinishedMessage(builder.buildPartial());
2494           } catch (com.google.protobuf.UninitializedMessageException e) {
2495             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2496           } catch (java.io.IOException e) {
2497             throw new com.google.protobuf.InvalidProtocolBufferException(e)
2498                 .setUnfinishedMessage(builder.buildPartial());
2499           }
2500           return builder.buildPartial();
2501         }
2502       };
2503 
parser()2504   public static com.google.protobuf.Parser<Sku> parser() {
2505     return PARSER;
2506   }
2507 
2508   @java.lang.Override
getParserForType()2509   public com.google.protobuf.Parser<Sku> getParserForType() {
2510     return PARSER;
2511   }
2512 
2513   @java.lang.Override
getDefaultInstanceForType()2514   public com.google.cloud.billing.v1.Sku getDefaultInstanceForType() {
2515     return DEFAULT_INSTANCE;
2516   }
2517 }
2518