public static final class PriceTier.Builder extends GeneratedMessageV3.Builder<PriceTier.Builder> 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
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PriceTier.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public PriceTier buildPartial()
Returns
clear()
public PriceTier.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public PriceTier.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearFirstResource()
public PriceTier.Builder clearFirstResource()
First resource for which the tier price applies.
int32 first_resource = 1;
Returns
clearLastResource()
public PriceTier.Builder clearLastResource()
Last resource for which the tier price applies.
int32 last_resource = 2;
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public PriceTier.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearPrice()
public PriceTier.Builder clearPrice()
Price of the tier.
.google.cloud.channel.v1.Price price = 3;
Returns
clone()
public PriceTier.Builder clone()
Returns
Overrides
getDefaultInstanceForType()
public PriceTier getDefaultInstanceForType()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
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.
|
getPrice()
Price of the tier.
.google.cloud.channel.v1.Price price = 3;
Returns
Type | Description |
Price | The price.
|
getPriceBuilder()
public Price.Builder getPriceBuilder()
Price of the tier.
.google.cloud.channel.v1.Price price = 3;
Returns
getPriceOrBuilder()
public PriceOrBuilder getPriceOrBuilder()
Price of the tier.
.google.cloud.channel.v1.Price price = 3;
Returns
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.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(PriceTier other)
public PriceTier.Builder mergeFrom(PriceTier other)
Parameter
Returns
public PriceTier.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public PriceTier.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergePrice(Price value)
public PriceTier.Builder mergePrice(Price value)
Price of the tier.
.google.cloud.channel.v1.Price price = 3;
Parameter
Name | Description |
value | Price
|
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PriceTier.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public PriceTier.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setFirstResource(int value)
public PriceTier.Builder setFirstResource(int value)
First resource for which the tier price applies.
int32 first_resource = 1;
Parameter
Name | Description |
value | int
The firstResource to set.
|
Returns
setLastResource(int value)
public PriceTier.Builder setLastResource(int value)
Last resource for which the tier price applies.
int32 last_resource = 2;
Parameter
Name | Description |
value | int
The lastResource to set.
|
Returns
setPrice(Price value)
public PriceTier.Builder setPrice(Price value)
Price of the tier.
.google.cloud.channel.v1.Price price = 3;
Parameter
Name | Description |
value | Price
|
Returns
setPrice(Price.Builder builderForValue)
public PriceTier.Builder setPrice(Price.Builder builderForValue)
Price of the tier.
.google.cloud.channel.v1.Price price = 3;
Parameter
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PriceTier.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final PriceTier.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides