Class PricePhase.Builder (3.58.0)

public static final class PricePhase.Builder extends GeneratedMessageV3.Builder<PricePhase.Builder> implements PricePhaseOrBuilder

Specifies the price by the duration of months. For example, a 20% discount for the first six months, then a 10% discount starting on the seventh month.

Protobuf type google.cloud.channel.v1.PricePhase

Implements

PricePhaseOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllPriceTiers(Iterable<? extends PriceTier> values)

public PricePhase.Builder addAllPriceTiers(Iterable<? extends PriceTier> values)

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Parameter
Name Description
values Iterable<? extends com.google.cloud.channel.v1.PriceTier>
Returns
Type Description
PricePhase.Builder

addPriceTiers(PriceTier value)

public PricePhase.Builder addPriceTiers(PriceTier value)

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Parameter
Name Description
value PriceTier
Returns
Type Description
PricePhase.Builder

addPriceTiers(PriceTier.Builder builderForValue)

public PricePhase.Builder addPriceTiers(PriceTier.Builder builderForValue)

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

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

addPriceTiers(int index, PriceTier value)

public PricePhase.Builder addPriceTiers(int index, PriceTier value)

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Parameters
Name Description
index int
value PriceTier
Returns
Type Description
PricePhase.Builder

addPriceTiers(int index, PriceTier.Builder builderForValue)

public PricePhase.Builder addPriceTiers(int index, PriceTier.Builder builderForValue)

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Parameters
Name Description
index int
builderForValue PriceTier.Builder
Returns
Type Description
PricePhase.Builder

addPriceTiersBuilder()

public PriceTier.Builder addPriceTiersBuilder()

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Returns
Type Description
PriceTier.Builder

addPriceTiersBuilder(int index)

public PriceTier.Builder addPriceTiersBuilder(int index)

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Parameter
Name Description
index int
Returns
Type Description
PriceTier.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PricePhase build()
Returns
Type Description
PricePhase

buildPartial()

public PricePhase buildPartial()
Returns
Type Description
PricePhase

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearFirstPeriod()

public PricePhase.Builder clearFirstPeriod()

Defines first period for the phase.

int32 first_period = 2;

Returns
Type Description
PricePhase.Builder

This builder for chaining.

clearLastPeriod()

public PricePhase.Builder clearLastPeriod()

Defines first period for the phase.

int32 last_period = 3;

Returns
Type Description
PricePhase.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPeriodType()

public PricePhase.Builder clearPeriodType()

Defines the phase period type.

.google.cloud.channel.v1.PeriodType period_type = 1;

Returns
Type Description
PricePhase.Builder

This builder for chaining.

clearPrice()

public PricePhase.Builder clearPrice()

Price of the phase. Present if there are no price tiers.

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

Returns
Type Description
PricePhase.Builder

clearPriceTiers()

public PricePhase.Builder clearPriceTiers()

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Returns
Type Description
PricePhase.Builder

clone()

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

getDefaultInstanceForType()

public PricePhase getDefaultInstanceForType()
Returns
Type Description
PricePhase

getDescriptorForType()

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

getFirstPeriod()

public int getFirstPeriod()

Defines first period for the phase.

int32 first_period = 2;

Returns
Type Description
int

The firstPeriod.

getLastPeriod()

public int getLastPeriod()

Defines first period for the phase.

int32 last_period = 3;

Returns
Type Description
int

The lastPeriod.

getPeriodType()

public PeriodType getPeriodType()

Defines the phase period type.

.google.cloud.channel.v1.PeriodType period_type = 1;

Returns
Type Description
PeriodType

The periodType.

getPeriodTypeValue()

public int getPeriodTypeValue()

Defines the phase period type.

.google.cloud.channel.v1.PeriodType period_type = 1;

Returns
Type Description
int

The enum numeric value on the wire for periodType.

getPrice()

public Price getPrice()

Price of the phase. Present if there are no price tiers.

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

Returns
Type Description
Price

The price.

getPriceBuilder()

public Price.Builder getPriceBuilder()

Price of the phase. Present if there are no price tiers.

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

Returns
Type Description
Price.Builder

getPriceOrBuilder()

public PriceOrBuilder getPriceOrBuilder()

Price of the phase. Present if there are no price tiers.

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

Returns
Type Description
PriceOrBuilder

getPriceTiers(int index)

public PriceTier getPriceTiers(int index)

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Parameter
Name Description
index int
Returns
Type Description
PriceTier

getPriceTiersBuilder(int index)

public PriceTier.Builder getPriceTiersBuilder(int index)

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Parameter
Name Description
index int
Returns
Type Description
PriceTier.Builder

getPriceTiersBuilderList()

public List<PriceTier.Builder> getPriceTiersBuilderList()

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Returns
Type Description
List<Builder>

getPriceTiersCount()

public int getPriceTiersCount()

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Returns
Type Description
int

getPriceTiersList()

public List<PriceTier> getPriceTiersList()

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Returns
Type Description
List<PriceTier>

getPriceTiersOrBuilder(int index)

public PriceTierOrBuilder getPriceTiersOrBuilder(int index)

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Parameter
Name Description
index int
Returns
Type Description
PriceTierOrBuilder

getPriceTiersOrBuilderList()

public List<? extends PriceTierOrBuilder> getPriceTiersOrBuilderList()

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Returns
Type Description
List<? extends com.google.cloud.channel.v1.PriceTierOrBuilder>

hasPrice()

public boolean hasPrice()

Price of the phase. Present if there are no price tiers.

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

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(PricePhase other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergePrice(Price value)

public PricePhase.Builder mergePrice(Price value)

Price of the phase. Present if there are no price tiers.

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

Parameter
Name Description
value Price
Returns
Type Description
PricePhase.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removePriceTiers(int index)

public PricePhase.Builder removePriceTiers(int index)

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Parameter
Name Description
index int
Returns
Type Description
PricePhase.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setFirstPeriod(int value)

public PricePhase.Builder setFirstPeriod(int value)

Defines first period for the phase.

int32 first_period = 2;

Parameter
Name Description
value int

The firstPeriod to set.

Returns
Type Description
PricePhase.Builder

This builder for chaining.

setLastPeriod(int value)

public PricePhase.Builder setLastPeriod(int value)

Defines first period for the phase.

int32 last_period = 3;

Parameter
Name Description
value int

The lastPeriod to set.

Returns
Type Description
PricePhase.Builder

This builder for chaining.

setPeriodType(PeriodType value)

public PricePhase.Builder setPeriodType(PeriodType value)

Defines the phase period type.

.google.cloud.channel.v1.PeriodType period_type = 1;

Parameter
Name Description
value PeriodType

The periodType to set.

Returns
Type Description
PricePhase.Builder

This builder for chaining.

setPeriodTypeValue(int value)

public PricePhase.Builder setPeriodTypeValue(int value)

Defines the phase period type.

.google.cloud.channel.v1.PeriodType period_type = 1;

Parameter
Name Description
value int

The enum numeric value on the wire for periodType to set.

Returns
Type Description
PricePhase.Builder

This builder for chaining.

setPrice(Price value)

public PricePhase.Builder setPrice(Price value)

Price of the phase. Present if there are no price tiers.

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

Parameter
Name Description
value Price
Returns
Type Description
PricePhase.Builder

setPrice(Price.Builder builderForValue)

public PricePhase.Builder setPrice(Price.Builder builderForValue)

Price of the phase. Present if there are no price tiers.

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

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

setPriceTiers(int index, PriceTier value)

public PricePhase.Builder setPriceTiers(int index, PriceTier value)

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Parameters
Name Description
index int
value PriceTier
Returns
Type Description
PricePhase.Builder

setPriceTiers(int index, PriceTier.Builder builderForValue)

public PricePhase.Builder setPriceTiers(int index, PriceTier.Builder builderForValue)

Price by the resource tiers.

repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;

Parameters
Name Description
index int
builderForValue PriceTier.Builder
Returns
Type Description
PricePhase.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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