Class Sku.Builder (2.3.2)

public static final class Sku.Builder extends GeneratedMessageV3.Builder<Sku.Builder> implements SkuOrBuilder

Encapsulates a single SKU in Google Cloud Platform

Protobuf type google.cloud.billing.v1.Sku

Implements

SkuOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllPricingInfo(Iterable<? extends PricingInfo> values)

public Sku.Builder addAllPricingInfo(Iterable<? extends PricingInfo> values)

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.billing.v1.PricingInfo>
Returns
TypeDescription
Sku.Builder

addAllServiceRegions(Iterable<String> values)

public Sku.Builder addAllServiceRegions(Iterable<String> values)

List of service regions this SKU is offered at. Example: "asia-east1" Service regions can be found at https://cloud.google.com/about/locations/

repeated string service_regions = 5;

Parameter
NameDescription
valuesIterable<String>

The serviceRegions to add.

Returns
TypeDescription
Sku.Builder

This builder for chaining.

addPricingInfo(PricingInfo value)

public Sku.Builder addPricingInfo(PricingInfo value)

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Parameter
NameDescription
valuePricingInfo
Returns
TypeDescription
Sku.Builder

addPricingInfo(PricingInfo.Builder builderForValue)

public Sku.Builder addPricingInfo(PricingInfo.Builder builderForValue)

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Parameter
NameDescription
builderForValuePricingInfo.Builder
Returns
TypeDescription
Sku.Builder

addPricingInfo(int index, PricingInfo value)

public Sku.Builder addPricingInfo(int index, PricingInfo value)

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Parameters
NameDescription
indexint
valuePricingInfo
Returns
TypeDescription
Sku.Builder

addPricingInfo(int index, PricingInfo.Builder builderForValue)

public Sku.Builder addPricingInfo(int index, PricingInfo.Builder builderForValue)

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Parameters
NameDescription
indexint
builderForValuePricingInfo.Builder
Returns
TypeDescription
Sku.Builder

addPricingInfoBuilder()

public PricingInfo.Builder addPricingInfoBuilder()

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Returns
TypeDescription
PricingInfo.Builder

addPricingInfoBuilder(int index)

public PricingInfo.Builder addPricingInfoBuilder(int index)

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
PricingInfo.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Sku.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Sku.Builder
Overrides

addServiceRegions(String value)

public Sku.Builder addServiceRegions(String value)

List of service regions this SKU is offered at. Example: "asia-east1" Service regions can be found at https://cloud.google.com/about/locations/

repeated string service_regions = 5;

Parameter
NameDescription
valueString

The serviceRegions to add.

Returns
TypeDescription
Sku.Builder

This builder for chaining.

addServiceRegionsBytes(ByteString value)

public Sku.Builder addServiceRegionsBytes(ByteString value)

List of service regions this SKU is offered at. Example: "asia-east1" Service regions can be found at https://cloud.google.com/about/locations/

repeated string service_regions = 5;

Parameter
NameDescription
valueByteString

The bytes of the serviceRegions to add.

Returns
TypeDescription
Sku.Builder

This builder for chaining.

build()

public Sku build()
Returns
TypeDescription
Sku

buildPartial()

public Sku buildPartial()
Returns
TypeDescription
Sku

clear()

public Sku.Builder clear()
Returns
TypeDescription
Sku.Builder
Overrides

clearCategory()

public Sku.Builder clearCategory()

The category hierarchy of this SKU, purely for organizational purpose.

.google.cloud.billing.v1.Category category = 4;

Returns
TypeDescription
Sku.Builder

clearDescription()

public Sku.Builder clearDescription()

A human readable description of the SKU, has a maximum length of 256 characters.

string description = 3;

Returns
TypeDescription
Sku.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Sku.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Sku.Builder
Overrides

clearName()

public Sku.Builder clearName()

The resource name for the SKU. Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE"

string name = 1;

Returns
TypeDescription
Sku.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Sku.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Sku.Builder
Overrides

clearPricingInfo()

public Sku.Builder clearPricingInfo()

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Returns
TypeDescription
Sku.Builder

clearServiceProviderName()

public Sku.Builder clearServiceProviderName()

Identifies the service provider. This is 'Google' for first party services in Google Cloud Platform.

string service_provider_name = 7;

Returns
TypeDescription
Sku.Builder

This builder for chaining.

clearServiceRegions()

public Sku.Builder clearServiceRegions()

List of service regions this SKU is offered at. Example: "asia-east1" Service regions can be found at https://cloud.google.com/about/locations/

repeated string service_regions = 5;

Returns
TypeDescription
Sku.Builder

This builder for chaining.

clearSkuId()

public Sku.Builder clearSkuId()

The identifier for the SKU. Example: "AA95-CD31-42FE"

string sku_id = 2;

Returns
TypeDescription
Sku.Builder

This builder for chaining.

clone()

public Sku.Builder clone()
Returns
TypeDescription
Sku.Builder
Overrides

getCategory()

public Category getCategory()

The category hierarchy of this SKU, purely for organizational purpose.

.google.cloud.billing.v1.Category category = 4;

Returns
TypeDescription
Category

The category.

getCategoryBuilder()

public Category.Builder getCategoryBuilder()

The category hierarchy of this SKU, purely for organizational purpose.

.google.cloud.billing.v1.Category category = 4;

Returns
TypeDescription
Category.Builder

getCategoryOrBuilder()

public CategoryOrBuilder getCategoryOrBuilder()

The category hierarchy of this SKU, purely for organizational purpose.

.google.cloud.billing.v1.Category category = 4;

Returns
TypeDescription
CategoryOrBuilder

getDefaultInstanceForType()

public Sku getDefaultInstanceForType()
Returns
TypeDescription
Sku

getDescription()

public String getDescription()

A human readable description of the SKU, has a maximum length of 256 characters.

string description = 3;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

A human readable description of the SKU, has a maximum length of 256 characters.

string description = 3;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getName()

public String getName()

The resource name for the SKU. Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE"

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The resource name for the SKU. Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE"

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getPricingInfo(int index)

public PricingInfo getPricingInfo(int index)

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
PricingInfo

getPricingInfoBuilder(int index)

public PricingInfo.Builder getPricingInfoBuilder(int index)

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
PricingInfo.Builder

getPricingInfoBuilderList()

public List<PricingInfo.Builder> getPricingInfoBuilderList()

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Returns
TypeDescription
List<Builder>

getPricingInfoCount()

public int getPricingInfoCount()

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Returns
TypeDescription
int

getPricingInfoList()

public List<PricingInfo> getPricingInfoList()

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Returns
TypeDescription
List<PricingInfo>

getPricingInfoOrBuilder(int index)

public PricingInfoOrBuilder getPricingInfoOrBuilder(int index)

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
PricingInfoOrBuilder

getPricingInfoOrBuilderList()

public List<? extends PricingInfoOrBuilder> getPricingInfoOrBuilderList()

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Returns
TypeDescription
List<? extends com.google.cloud.billing.v1.PricingInfoOrBuilder>

getServiceProviderName()

public String getServiceProviderName()

Identifies the service provider. This is 'Google' for first party services in Google Cloud Platform.

string service_provider_name = 7;

Returns
TypeDescription
String

The serviceProviderName.

getServiceProviderNameBytes()

public ByteString getServiceProviderNameBytes()

Identifies the service provider. This is 'Google' for first party services in Google Cloud Platform.

string service_provider_name = 7;

Returns
TypeDescription
ByteString

The bytes for serviceProviderName.

getServiceRegions(int index)

public String getServiceRegions(int index)

List of service regions this SKU is offered at. Example: "asia-east1" Service regions can be found at https://cloud.google.com/about/locations/

repeated string service_regions = 5;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The serviceRegions at the given index.

getServiceRegionsBytes(int index)

public ByteString getServiceRegionsBytes(int index)

List of service regions this SKU is offered at. Example: "asia-east1" Service regions can be found at https://cloud.google.com/about/locations/

repeated string service_regions = 5;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the serviceRegions at the given index.

getServiceRegionsCount()

public int getServiceRegionsCount()

List of service regions this SKU is offered at. Example: "asia-east1" Service regions can be found at https://cloud.google.com/about/locations/

repeated string service_regions = 5;

Returns
TypeDescription
int

The count of serviceRegions.

getServiceRegionsList()

public ProtocolStringList getServiceRegionsList()

List of service regions this SKU is offered at. Example: "asia-east1" Service regions can be found at https://cloud.google.com/about/locations/

repeated string service_regions = 5;

Returns
TypeDescription
ProtocolStringList

A list containing the serviceRegions.

getSkuId()

public String getSkuId()

The identifier for the SKU. Example: "AA95-CD31-42FE"

string sku_id = 2;

Returns
TypeDescription
String

The skuId.

getSkuIdBytes()

public ByteString getSkuIdBytes()

The identifier for the SKU. Example: "AA95-CD31-42FE"

string sku_id = 2;

Returns
TypeDescription
ByteString

The bytes for skuId.

hasCategory()

public boolean hasCategory()

The category hierarchy of this SKU, purely for organizational purpose.

.google.cloud.billing.v1.Category category = 4;

Returns
TypeDescription
boolean

Whether the category field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCategory(Category value)

public Sku.Builder mergeCategory(Category value)

The category hierarchy of this SKU, purely for organizational purpose.

.google.cloud.billing.v1.Category category = 4;

Parameter
NameDescription
valueCategory
Returns
TypeDescription
Sku.Builder

mergeFrom(Sku other)

public Sku.Builder mergeFrom(Sku other)
Parameter
NameDescription
otherSku
Returns
TypeDescription
Sku.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Sku.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Sku.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Sku.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Sku.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Sku.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Sku.Builder
Overrides

removePricingInfo(int index)

public Sku.Builder removePricingInfo(int index)

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
Sku.Builder

setCategory(Category value)

public Sku.Builder setCategory(Category value)

The category hierarchy of this SKU, purely for organizational purpose.

.google.cloud.billing.v1.Category category = 4;

Parameter
NameDescription
valueCategory
Returns
TypeDescription
Sku.Builder

setCategory(Category.Builder builderForValue)

public Sku.Builder setCategory(Category.Builder builderForValue)

The category hierarchy of this SKU, purely for organizational purpose.

.google.cloud.billing.v1.Category category = 4;

Parameter
NameDescription
builderForValueCategory.Builder
Returns
TypeDescription
Sku.Builder

setDescription(String value)

public Sku.Builder setDescription(String value)

A human readable description of the SKU, has a maximum length of 256 characters.

string description = 3;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
Sku.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Sku.Builder setDescriptionBytes(ByteString value)

A human readable description of the SKU, has a maximum length of 256 characters.

string description = 3;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
Sku.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Sku.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Sku.Builder
Overrides

setName(String value)

public Sku.Builder setName(String value)

The resource name for the SKU. Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE"

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Sku.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Sku.Builder setNameBytes(ByteString value)

The resource name for the SKU. Example: "services/DA34-426B-A397/skus/AA95-CD31-42FE"

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Sku.Builder

This builder for chaining.

setPricingInfo(int index, PricingInfo value)

public Sku.Builder setPricingInfo(int index, PricingInfo value)

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Parameters
NameDescription
indexint
valuePricingInfo
Returns
TypeDescription
Sku.Builder

setPricingInfo(int index, PricingInfo.Builder builderForValue)

public Sku.Builder setPricingInfo(int index, PricingInfo.Builder builderForValue)

A timeline of pricing info for this SKU in chronological order.

repeated .google.cloud.billing.v1.PricingInfo pricing_info = 6;

Parameters
NameDescription
indexint
builderForValuePricingInfo.Builder
Returns
TypeDescription
Sku.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Sku.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Sku.Builder
Overrides

setServiceProviderName(String value)

public Sku.Builder setServiceProviderName(String value)

Identifies the service provider. This is 'Google' for first party services in Google Cloud Platform.

string service_provider_name = 7;

Parameter
NameDescription
valueString

The serviceProviderName to set.

Returns
TypeDescription
Sku.Builder

This builder for chaining.

setServiceProviderNameBytes(ByteString value)

public Sku.Builder setServiceProviderNameBytes(ByteString value)

Identifies the service provider. This is 'Google' for first party services in Google Cloud Platform.

string service_provider_name = 7;

Parameter
NameDescription
valueByteString

The bytes for serviceProviderName to set.

Returns
TypeDescription
Sku.Builder

This builder for chaining.

setServiceRegions(int index, String value)

public Sku.Builder setServiceRegions(int index, String value)

List of service regions this SKU is offered at. Example: "asia-east1" Service regions can be found at https://cloud.google.com/about/locations/

repeated string service_regions = 5;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The serviceRegions to set.

Returns
TypeDescription
Sku.Builder

This builder for chaining.

setSkuId(String value)

public Sku.Builder setSkuId(String value)

The identifier for the SKU. Example: "AA95-CD31-42FE"

string sku_id = 2;

Parameter
NameDescription
valueString

The skuId to set.

Returns
TypeDescription
Sku.Builder

This builder for chaining.

setSkuIdBytes(ByteString value)

public Sku.Builder setSkuIdBytes(ByteString value)

The identifier for the SKU. Example: "AA95-CD31-42FE"

string sku_id = 2;

Parameter
NameDescription
valueByteString

The bytes for skuId to set.

Returns
TypeDescription
Sku.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Sku.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Sku.Builder
Overrides