Class Price.Builder (3.46.0)

public static final class Price.Builder extends GeneratedMessageV3.Builder<Price.Builder> implements PriceOrBuilder

Represents the price of the Offer.

Protobuf type google.cloud.channel.v1.Price

Implements

PriceOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Price build()
Returns
Type Description
Price

buildPartial()

public Price buildPartial()
Returns
Type Description
Price

clear()

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

clearBasePrice()

public Price.Builder clearBasePrice()

Base price.

.google.type.Money base_price = 1;

Returns
Type Description
Price.Builder

clearDiscount()

public Price.Builder clearDiscount()

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

double discount = 2;

Returns
Type Description
Price.Builder

This builder for chaining.

clearEffectivePrice()

public Price.Builder clearEffectivePrice()

Effective Price after applying the discounts.

.google.type.Money effective_price = 3;

Returns
Type Description
Price.Builder

clearExternalPriceUri()

public Price.Builder clearExternalPriceUri()

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

string external_price_uri = 4;

Returns
Type Description
Price.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getBasePrice()

public Money getBasePrice()

Base price.

.google.type.Money base_price = 1;

Returns
Type Description
com.google.type.Money

The basePrice.

getBasePriceBuilder()

public Money.Builder getBasePriceBuilder()

Base price.

.google.type.Money base_price = 1;

Returns
Type Description
com.google.type.Money.Builder

getBasePriceOrBuilder()

public MoneyOrBuilder getBasePriceOrBuilder()

Base price.

.google.type.Money base_price = 1;

Returns
Type Description
com.google.type.MoneyOrBuilder

getDefaultInstanceForType()

public Price getDefaultInstanceForType()
Returns
Type Description
Price

getDescriptorForType()

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

getDiscount()

public double getDiscount()

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

double discount = 2;

Returns
Type Description
double

The discount.

getEffectivePrice()

public Money getEffectivePrice()

Effective Price after applying the discounts.

.google.type.Money effective_price = 3;

Returns
Type Description
com.google.type.Money

The effectivePrice.

getEffectivePriceBuilder()

public Money.Builder getEffectivePriceBuilder()

Effective Price after applying the discounts.

.google.type.Money effective_price = 3;

Returns
Type Description
com.google.type.Money.Builder

getEffectivePriceOrBuilder()

public MoneyOrBuilder getEffectivePriceOrBuilder()

Effective Price after applying the discounts.

.google.type.Money effective_price = 3;

Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for externalPriceUri.

hasBasePrice()

public boolean hasBasePrice()

Base price.

.google.type.Money base_price = 1;

Returns
Type Description
boolean

Whether the basePrice field is set.

hasEffectivePrice()

public boolean hasEffectivePrice()

Effective Price after applying the discounts.

.google.type.Money effective_price = 3;

Returns
Type Description
boolean

Whether the effectivePrice field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeBasePrice(Money value)

public Price.Builder mergeBasePrice(Money value)

Base price.

.google.type.Money base_price = 1;

Parameter
Name Description
value com.google.type.Money
Returns
Type Description
Price.Builder

mergeEffectivePrice(Money value)

public Price.Builder mergeEffectivePrice(Money value)

Effective Price after applying the discounts.

.google.type.Money effective_price = 3;

Parameter
Name Description
value com.google.type.Money
Returns
Type Description
Price.Builder

mergeFrom(Price other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setBasePrice(Money value)

public Price.Builder setBasePrice(Money value)

Base price.

.google.type.Money base_price = 1;

Parameter
Name Description
value com.google.type.Money
Returns
Type Description
Price.Builder

setBasePrice(Money.Builder builderForValue)

public Price.Builder setBasePrice(Money.Builder builderForValue)

Base price.

.google.type.Money base_price = 1;

Parameter
Name Description
builderForValue com.google.type.Money.Builder
Returns
Type Description
Price.Builder

setDiscount(double value)

public Price.Builder setDiscount(double value)

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

double discount = 2;

Parameter
Name Description
value double

The discount to set.

Returns
Type Description
Price.Builder

This builder for chaining.

setEffectivePrice(Money value)

public Price.Builder setEffectivePrice(Money value)

Effective Price after applying the discounts.

.google.type.Money effective_price = 3;

Parameter
Name Description
value com.google.type.Money
Returns
Type Description
Price.Builder

setEffectivePrice(Money.Builder builderForValue)

public Price.Builder setEffectivePrice(Money.Builder builderForValue)

Effective Price after applying the discounts.

.google.type.Money effective_price = 3;

Parameter
Name Description
builderForValue com.google.type.Money.Builder
Returns
Type Description
Price.Builder

setExternalPriceUri(String value)

public Price.Builder setExternalPriceUri(String value)

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

string external_price_uri = 4;

Parameter
Name Description
value String

The externalPriceUri to set.

Returns
Type Description
Price.Builder

This builder for chaining.

setExternalPriceUriBytes(ByteString value)

public Price.Builder setExternalPriceUriBytes(ByteString value)

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

string external_price_uri = 4;

Parameter
Name Description
value ByteString

The bytes for externalPriceUri to set.

Returns
Type Description
Price.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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