Class PriceTier.Builder (3.58.0)

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

Implements

PriceTierOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PriceTier.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
PriceTier.Builder
Overrides

build()

public PriceTier build()
Returns
Type Description
PriceTier

buildPartial()

public PriceTier buildPartial()
Returns
Type Description
PriceTier

clear()

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

clearField(Descriptors.FieldDescriptor field)

public PriceTier.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
PriceTier.Builder
Overrides

clearFirstResource()

public PriceTier.Builder clearFirstResource()

First resource for which the tier price applies.

int32 first_resource = 1;

Returns
Type Description
PriceTier.Builder

This builder for chaining.

clearLastResource()

public PriceTier.Builder clearLastResource()

Last resource for which the tier price applies.

int32 last_resource = 2;

Returns
Type Description
PriceTier.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public PriceTier.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
PriceTier.Builder
Overrides

clearPrice()

public PriceTier.Builder clearPrice()

Price of the tier.

.google.cloud.channel.v1.Price price = 3;

Returns
Type Description
PriceTier.Builder

clone()

public PriceTier.Builder clone()
Returns
Type Description
PriceTier.Builder
Overrides

getDefaultInstanceForType()

public PriceTier getDefaultInstanceForType()
Returns
Type Description
PriceTier

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
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()

public Price 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
Type Description
Price.Builder

getPriceOrBuilder()

public PriceOrBuilder getPriceOrBuilder()

Price of the tier.

.google.cloud.channel.v1.Price price = 3;

Returns
Type Description
PriceOrBuilder

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
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PriceTier other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public PriceTier.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
PriceTier.Builder
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
Type Description
PriceTier.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PriceTier.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PriceTier.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public PriceTier.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
PriceTier.Builder
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
Type Description
PriceTier.Builder

This builder for chaining.

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
Type Description
PriceTier.Builder

This builder for chaining.

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
Type Description
PriceTier.Builder

setPrice(Price.Builder builderForValue)

public PriceTier.Builder setPrice(Price.Builder builderForValue)

Price of the tier.

.google.cloud.channel.v1.Price price = 3;

Parameter
Name Description
builderForValue Price.Builder
Returns
Type Description
PriceTier.Builder

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

public PriceTier.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
PriceTier.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final PriceTier.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PriceTier.Builder
Overrides