Class PricePhase.Builder (3.7.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.channel.v1.PriceTier>
Returns
TypeDescription
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
NameDescription
valuePriceTier
Returns
TypeDescription
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
NameDescription
builderForValuePriceTier.Builder
Returns
TypeDescription
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
NameDescription
indexint
valuePriceTier
Returns
TypeDescription
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
NameDescription
indexint
builderForValuePriceTier.Builder
Returns
TypeDescription
PricePhase.Builder

addPriceTiersBuilder()

public PriceTier.Builder addPriceTiersBuilder()

Price by the resource tiers.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
PriceTier.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PricePhase.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
PricePhase.Builder
Overrides

build()

public PricePhase build()
Returns
TypeDescription
PricePhase

buildPartial()

public PricePhase buildPartial()
Returns
TypeDescription
PricePhase

clear()

public PricePhase.Builder clear()
Returns
TypeDescription
PricePhase.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public PricePhase.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
PricePhase.Builder
Overrides

clearFirstPeriod()

public PricePhase.Builder clearFirstPeriod()

Defines first period for the phase.

int32 first_period = 2;

Returns
TypeDescription
PricePhase.Builder

This builder for chaining.

clearLastPeriod()

public PricePhase.Builder clearLastPeriod()

Defines first period for the phase.

int32 last_period = 3;

Returns
TypeDescription
PricePhase.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public PricePhase.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
PricePhase.Builder
Overrides

clearPeriodType()

public PricePhase.Builder clearPeriodType()

Defines the phase period type.

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

Returns
TypeDescription
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
TypeDescription
PricePhase.Builder

clearPriceTiers()

public PricePhase.Builder clearPriceTiers()

Price by the resource tiers.

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

Returns
TypeDescription
PricePhase.Builder

clone()

public PricePhase.Builder clone()
Returns
TypeDescription
PricePhase.Builder
Overrides

getDefaultInstanceForType()

public PricePhase getDefaultInstanceForType()
Returns
TypeDescription
PricePhase

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFirstPeriod()

public int getFirstPeriod()

Defines first period for the phase.

int32 first_period = 2;

Returns
TypeDescription
int

The firstPeriod.

getLastPeriod()

public int getLastPeriod()

Defines first period for the phase.

int32 last_period = 3;

Returns
TypeDescription
int

The lastPeriod.

getPeriodType()

public PeriodType getPeriodType()

Defines the phase period type.

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

Returns
TypeDescription
PeriodType

The periodType.

getPeriodTypeValue()

public int getPeriodTypeValue()

Defines the phase period type.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
PriceOrBuilder

getPriceTiers(int index)

public PriceTier getPriceTiers(int index)

Price by the resource tiers.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
PriceTier.Builder

getPriceTiersBuilderList()

public List<PriceTier.Builder> getPriceTiersBuilderList()

Price by the resource tiers.

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

Returns
TypeDescription
List<Builder>

getPriceTiersCount()

public int getPriceTiersCount()

Price by the resource tiers.

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

Returns
TypeDescription
int

getPriceTiersList()

public List<PriceTier> getPriceTiersList()

Price by the resource tiers.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
PriceTierOrBuilder

getPriceTiersOrBuilderList()

public List<? extends PriceTierOrBuilder> getPriceTiersOrBuilderList()

Price by the resource tiers.

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

Returns
TypeDescription
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
TypeDescription
boolean

Whether the price field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(PricePhase other)

public PricePhase.Builder mergeFrom(PricePhase other)
Parameter
NameDescription
otherPricePhase
Returns
TypeDescription
PricePhase.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PricePhase.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PricePhase.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public PricePhase.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valuePrice
Returns
TypeDescription
PricePhase.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PricePhase.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
PricePhase.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public PricePhase.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
PricePhase.Builder
Overrides

setFirstPeriod(int value)

public PricePhase.Builder setFirstPeriod(int value)

Defines first period for the phase.

int32 first_period = 2;

Parameter
NameDescription
valueint

The firstPeriod to set.

Returns
TypeDescription
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
NameDescription
valueint

The lastPeriod to set.

Returns
TypeDescription
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
NameDescription
valuePeriodType

The periodType to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valuePrice
Returns
TypeDescription
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
NameDescription
builderForValuePrice.Builder
Returns
TypeDescription
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
NameDescription
indexint
valuePriceTier
Returns
TypeDescription
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
NameDescription
indexint
builderForValuePriceTier.Builder
Returns
TypeDescription
PricePhase.Builder

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

public PricePhase.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
PricePhase.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final PricePhase.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
PricePhase.Builder
Overrides