Class PricePhase (3.34.0)

public final class PricePhase extends GeneratedMessageV3 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 Fields

FIRST_PERIOD_FIELD_NUMBER

public static final int FIRST_PERIOD_FIELD_NUMBER
Field Value
TypeDescription
int

LAST_PERIOD_FIELD_NUMBER

public static final int LAST_PERIOD_FIELD_NUMBER
Field Value
TypeDescription
int

PERIOD_TYPE_FIELD_NUMBER

public static final int PERIOD_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

PRICE_FIELD_NUMBER

public static final int PRICE_FIELD_NUMBER
Field Value
TypeDescription
int

PRICE_TIERS_FIELD_NUMBER

public static final int PRICE_TIERS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static PricePhase getDefaultInstance()
Returns
TypeDescription
PricePhase

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static PricePhase.Builder newBuilder()
Returns
TypeDescription
PricePhase.Builder

newBuilder(PricePhase prototype)

public static PricePhase.Builder newBuilder(PricePhase prototype)
Parameter
NameDescription
prototypePricePhase
Returns
TypeDescription
PricePhase.Builder

parseDelimitedFrom(InputStream input)

public static PricePhase parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
PricePhase
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PricePhase parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PricePhase
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static PricePhase parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
PricePhase
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static PricePhase parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PricePhase
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static PricePhase parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
PricePhase
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static PricePhase parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PricePhase
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static PricePhase parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
PricePhase
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static PricePhase parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PricePhase
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static PricePhase parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
PricePhase
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PricePhase parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PricePhase
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static PricePhase parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
PricePhase
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static PricePhase parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PricePhase
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<PricePhase> parser()
Returns
TypeDescription
Parser<PricePhase>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public PricePhase getDefaultInstanceForType()
Returns
TypeDescription
PricePhase

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.

getParserForType()

public Parser<PricePhase> getParserForType()
Returns
TypeDescription
Parser<PricePhase>
Overrides

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.

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

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>

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public PricePhase.Builder newBuilderForType()
Returns
TypeDescription
PricePhase.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected PricePhase.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
PricePhase.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public PricePhase.Builder toBuilder()
Returns
TypeDescription
PricePhase.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException