public final class PriceTier extends GeneratedMessageV3 implements PriceTierOrBuilder
Defines price at resource tier level.
For example, an offer with following definition :
- Tier 1: Provide 25% discount for all seats between 1 and 25.
- Tier 2: Provide 10% discount for all seats between 26 and 100.
- Tier 3: Provide flat 15% discount for all seats above 100.
Each of these tiers is represented as a PriceTier.
Protobuf type google.cloud.channel.v1.PriceTier
Static Fields
FIRST_RESOURCE_FIELD_NUMBER
public static final int FIRST_RESOURCE_FIELD_NUMBER
Field Value
LAST_RESOURCE_FIELD_NUMBER
public static final int LAST_RESOURCE_FIELD_NUMBER
Field Value
PRICE_FIELD_NUMBER
public static final int PRICE_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static PriceTier getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static PriceTier.Builder newBuilder()
Returns
newBuilder(PriceTier prototype)
public static PriceTier.Builder newBuilder(PriceTier prototype)
Parameter
Returns
public static PriceTier parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static PriceTier parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static PriceTier parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static PriceTier parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static PriceTier parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static PriceTier parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static PriceTier parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static PriceTier parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static PriceTier parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static PriceTier parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static PriceTier parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static PriceTier parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<PriceTier> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstanceForType()
public PriceTier getDefaultInstanceForType()
Returns
getFirstResource()
public int getFirstResource()
First resource for which the tier price applies.
int32 first_resource = 1;
Returns
Type | Description |
int | The firstResource.
|
getLastResource()
public int getLastResource()
Last resource for which the tier price applies.
int32 last_resource = 2;
Returns
Type | Description |
int | The lastResource.
|
getParserForType()
public Parser<PriceTier> getParserForType()
Returns
Overrides
getPrice()
Price of the tier.
.google.cloud.channel.v1.Price price = 3;
Returns
Type | Description |
Price | The price.
|
getPriceOrBuilder()
public PriceOrBuilder getPriceOrBuilder()
Price of the tier.
.google.cloud.channel.v1.Price price = 3;
Returns
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hasPrice()
public boolean hasPrice()
Price of the tier.
.google.cloud.channel.v1.Price price = 3;
Returns
Type | Description |
boolean | Whether the price field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public PriceTier.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected PriceTier.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public PriceTier.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions