Class Sku (0.1.0)

public final class Sku extends GeneratedMessage 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 Fields

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

SKU_PRICE_TIMELINE_FIELD_NUMBER

public static final int SKU_PRICE_TIMELINE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Sku getDefaultInstance()
Returns
Type Description
Sku

getDescriptor()

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

newBuilder()

public static Sku.Builder newBuilder()
Returns
Type Description
Sku.Builder

newBuilder(Sku prototype)

public static Sku.Builder newBuilder(Sku prototype)
Parameter
Name Description
prototype Sku
Returns
Type Description
Sku.Builder

parseDelimitedFrom(InputStream input)

public static Sku parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Sku
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Sku parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sku
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Sku parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Sku
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Sku parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sku
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Sku parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Sku
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Sku parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sku
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Sku parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Sku
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Sku parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sku
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Sku parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Sku
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Sku parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sku
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Sku parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Sku
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Sku parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Sku
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Sku> parser()
Returns
Type Description
Parser<Sku>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

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.

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.

getParserForType()

public Parser<Sku> getParserForType()
Returns
Type Description
Parser<Sku>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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

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>

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Sku.Builder newBuilderForType()
Returns
Type Description
Sku.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected Sku.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Sku.Builder
Overrides

toBuilder()

public Sku.Builder toBuilder()
Returns
Type Description
Sku.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException