Class Price (3.43.0)

public final class Price extends GeneratedMessageV3 implements PriceOrBuilder

Represents the price of the Offer.

Protobuf type google.cloud.channel.v1.Price

Implements

PriceOrBuilder

Static Fields

BASE_PRICE_FIELD_NUMBER

public static final int BASE_PRICE_FIELD_NUMBER
Field Value
TypeDescription
int

DISCOUNT_FIELD_NUMBER

public static final int DISCOUNT_FIELD_NUMBER
Field Value
TypeDescription
int

EFFECTIVE_PRICE_FIELD_NUMBER

public static final int EFFECTIVE_PRICE_FIELD_NUMBER
Field Value
TypeDescription
int

EXTERNAL_PRICE_URI_FIELD_NUMBER

public static final int EXTERNAL_PRICE_URI_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Price getDefaultInstance()
Returns
TypeDescription
Price

getDescriptor()

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

newBuilder()

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

newBuilder(Price prototype)

public static Price.Builder newBuilder(Price prototype)
Parameter
NameDescription
prototypePrice
Returns
TypeDescription
Price.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getBasePrice()

public Money getBasePrice()

Base price.

.google.type.Money base_price = 1;

Returns
TypeDescription
com.google.type.Money

The basePrice.

getBasePriceOrBuilder()

public MoneyOrBuilder getBasePriceOrBuilder()

Base price.

.google.type.Money base_price = 1;

Returns
TypeDescription
com.google.type.MoneyOrBuilder

getDefaultInstanceForType()

public Price getDefaultInstanceForType()
Returns
TypeDescription
Price

getDiscount()

public double getDiscount()

Discount percentage, represented as decimal. For example, a 20% discount will be represent as 0.2.

double discount = 2;

Returns
TypeDescription
double

The discount.

getEffectivePrice()

public Money getEffectivePrice()

Effective Price after applying the discounts.

.google.type.Money effective_price = 3;

Returns
TypeDescription
com.google.type.Money

The effectivePrice.

getEffectivePriceOrBuilder()

public MoneyOrBuilder getEffectivePriceOrBuilder()

Effective Price after applying the discounts.

.google.type.Money effective_price = 3;

Returns
TypeDescription
com.google.type.MoneyOrBuilder

getExternalPriceUri()

public String getExternalPriceUri()

Link to external price list, such as link to Google Voice rate card.

string external_price_uri = 4;

Returns
TypeDescription
String

The externalPriceUri.

getExternalPriceUriBytes()

public ByteString getExternalPriceUriBytes()

Link to external price list, such as link to Google Voice rate card.

string external_price_uri = 4;

Returns
TypeDescription
ByteString

The bytes for externalPriceUri.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasBasePrice()

public boolean hasBasePrice()

Base price.

.google.type.Money base_price = 1;

Returns
TypeDescription
boolean

Whether the basePrice field is set.

hasEffectivePrice()

public boolean hasEffectivePrice()

Effective Price after applying the discounts.

.google.type.Money effective_price = 3;

Returns
TypeDescription
boolean

Whether the effectivePrice 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 Price.Builder newBuilderForType()
Returns
TypeDescription
Price.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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