Class Sku.Builder (0.1.0)

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

Message describing the Sku resource.

Encapsulates and represents a stock keeping unit (SKU), the atomic unit of pricing and billing in Google Cloud. Each customer charge is associated with and originates from exactly one SKU. While the Cloud Marketplace Sku resource shares a close relationship with the public Sku resource in the Cloud Billing API, Cloud Marketplace SKUs are represented here with additional information in an alternative format tailored for use by Cloud Marketplace partners, and are not necessarily public and by extension are not generally visible in the Cloud Billing API or the Google Cloud Public SKUs.

Note on terminology: While the name of the resource derives from the acronym 'SKU' it is named 'Sku' for consistency with other resource type names, and may be rendered variously as 'Sku', 'sku', or 'SKU' across this and other documentation.

Protobuf type google.cloud.commerceproducer.v1beta.Sku

Implements

SkuOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllSkuPriceTimeline(Iterable<? extends Sku.SkuPrice> values)

public Sku.Builder addAllSkuPriceTimeline(Iterable<? extends Sku.SkuPrice> values)

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<? extends com.google.cloud.commerceproducer.v1beta.Sku.SkuPrice>
Returns
Type Description
Sku.Builder

addSkuPriceTimeline(Sku.SkuPrice value)

public Sku.Builder addSkuPriceTimeline(Sku.SkuPrice value)

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Sku.SkuPrice
Returns
Type Description
Sku.Builder

addSkuPriceTimeline(Sku.SkuPrice.Builder builderForValue)

public Sku.Builder addSkuPriceTimeline(Sku.SkuPrice.Builder builderForValue)

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Sku.SkuPrice.Builder
Returns
Type Description
Sku.Builder

addSkuPriceTimeline(int index, Sku.SkuPrice value)

public Sku.Builder addSkuPriceTimeline(int index, Sku.SkuPrice value)

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value Sku.SkuPrice
Returns
Type Description
Sku.Builder

addSkuPriceTimeline(int index, Sku.SkuPrice.Builder builderForValue)

public Sku.Builder addSkuPriceTimeline(int index, Sku.SkuPrice.Builder builderForValue)

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue Sku.SkuPrice.Builder
Returns
Type Description
Sku.Builder

addSkuPriceTimelineBuilder()

public Sku.SkuPrice.Builder addSkuPriceTimelineBuilder()

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sku.SkuPrice.Builder

addSkuPriceTimelineBuilder(int index)

public Sku.SkuPrice.Builder addSkuPriceTimelineBuilder(int index)

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Sku.SkuPrice.Builder

build()

public Sku build()
Returns
Type Description
Sku

buildPartial()

public Sku buildPartial()
Returns
Type Description
Sku

clear()

public Sku.Builder clear()
Returns
Type Description
Sku.Builder
Overrides

clearDescription()

public Sku.Builder clearDescription()

Output only. Description of the SKU.

string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sku.Builder

This builder for chaining.

clearName()

public Sku.Builder clearName()

Output only. Identifier. Name of the SKU.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sku.Builder

This builder for chaining.

clearSkuPriceTimeline()

public Sku.Builder clearSkuPriceTimeline()

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Sku.Builder

getDefaultInstanceForType()

public Sku getDefaultInstanceForType()
Returns
Type Description
Sku

getDescription()

public String getDescription()

Output only. Description of the SKU.

string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Output only. Description of the SKU.

string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getName()

public String getName()

Output only. Identifier. Name of the SKU.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. Identifier. Name of the SKU.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for name.

getSkuPriceTimeline(int index)

public Sku.SkuPrice getSkuPriceTimeline(int index)

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Sku.SkuPrice

getSkuPriceTimelineBuilder(int index)

public Sku.SkuPrice.Builder getSkuPriceTimelineBuilder(int index)

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Sku.SkuPrice.Builder

getSkuPriceTimelineBuilderList()

public List<Sku.SkuPrice.Builder> getSkuPriceTimelineBuilderList()

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<Builder>

getSkuPriceTimelineCount()

public int getSkuPriceTimelineCount()

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getSkuPriceTimelineList()

public List<Sku.SkuPrice> getSkuPriceTimelineList()

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<SkuPrice>

getSkuPriceTimelineOrBuilder(int index)

public Sku.SkuPriceOrBuilder getSkuPriceTimelineOrBuilder(int index)

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Sku.SkuPriceOrBuilder

getSkuPriceTimelineOrBuilderList()

public List<? extends Sku.SkuPriceOrBuilder> getSkuPriceTimelineOrBuilderList()

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.cloud.commerceproducer.v1beta.Sku.SkuPriceOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Sku other)

public Sku.Builder mergeFrom(Sku other)
Parameter
Name Description
other Sku
Returns
Type Description
Sku.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Sku.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sku.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Sku.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Sku.Builder
Overrides

removeSkuPriceTimeline(int index)

public Sku.Builder removeSkuPriceTimeline(int index)

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Sku.Builder

setDescription(String value)

public Sku.Builder setDescription(String value)

Output only. Description of the SKU.

string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Sku.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Sku.Builder setDescriptionBytes(ByteString value)

Output only. Description of the SKU.

string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Sku.Builder

This builder for chaining.

setName(String value)

public Sku.Builder setName(String value)

Output only. Identifier. Name of the SKU.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Sku.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Sku.Builder setNameBytes(ByteString value)

Output only. Identifier. Name of the SKU.

string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Sku.Builder

This builder for chaining.

setSkuPriceTimeline(int index, Sku.SkuPrice value)

public Sku.Builder setSkuPriceTimeline(int index, Sku.SkuPrice value)

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value Sku.SkuPrice
Returns
Type Description
Sku.Builder

setSkuPriceTimeline(int index, Sku.SkuPrice.Builder builderForValue)

public Sku.Builder setSkuPriceTimeline(int index, Sku.SkuPrice.Builder builderForValue)

Output only. Timeline of the SKU prices, in chronological order by effective_time.

Each entry is active in the time range starting inclusively from the entry's effective_time and ending exclusively at the next entry's effective_time, if one exists, or else remaining active indefinitely if it is the final entry. The currently active entry is the entry with the latest effective_time that is in the past. Because of scheduled future price changes the currently active entry may not be the last entry in the timeline. A SKU does not necessarily have a currently active entry, as the SKU's first timeline entry may have an effective_time in the future.

repeated .google.cloud.commerceproducer.v1beta.Sku.SkuPrice sku_price_timeline = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue Sku.SkuPrice.Builder
Returns
Type Description
Sku.Builder