Class Price.Builder (3.25.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Price build()
Returns
TypeDescription
Price

buildPartial()

public Price buildPartial()
Returns
TypeDescription
Price

clear()

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

clearBasePrice()

public Price.Builder clearBasePrice()

Base price.

.google.type.Money base_price = 1;

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

This builder for chaining.

clearEffectivePrice()

public Price.Builder clearEffectivePrice()

Effective Price after applying the discounts.

.google.type.Money effective_price = 3;

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getBasePrice()

public Money getBasePrice()

Base price.

.google.type.Money base_price = 1;

Returns
TypeDescription
com.google.type.Money

The basePrice.

getBasePriceBuilder()

public Money.Builder getBasePriceBuilder()

Base price.

.google.type.Money base_price = 1;

Returns
TypeDescription
com.google.type.Money.Builder

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
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.

getEffectivePriceBuilder()

public Money.Builder getEffectivePriceBuilder()

Effective Price after applying the discounts.

.google.type.Money effective_price = 3;

Returns
TypeDescription
com.google.type.Money.Builder

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.

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeBasePrice(Money value)

public Price.Builder mergeBasePrice(Money value)

Base price.

.google.type.Money base_price = 1;

Parameter
NameDescription
valuecom.google.type.Money
Returns
TypeDescription
Price.Builder

mergeEffectivePrice(Money value)

public Price.Builder mergeEffectivePrice(Money value)

Effective Price after applying the discounts.

.google.type.Money effective_price = 3;

Parameter
NameDescription
valuecom.google.type.Money
Returns
TypeDescription
Price.Builder

mergeFrom(Price other)

public Price.Builder mergeFrom(Price other)
Parameter
NameDescription
otherPrice
Returns
TypeDescription
Price.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public Price.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Price.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Price.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Price.Builder
Overrides

setBasePrice(Money value)

public Price.Builder setBasePrice(Money value)

Base price.

.google.type.Money base_price = 1;

Parameter
NameDescription
valuecom.google.type.Money
Returns
TypeDescription
Price.Builder

setBasePrice(Money.Builder builderForValue)

public Price.Builder setBasePrice(Money.Builder builderForValue)

Base price.

.google.type.Money base_price = 1;

Parameter
NameDescription
builderForValuecom.google.type.Money.Builder
Returns
TypeDescription
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
NameDescription
valuedouble

The discount to set.

Returns
TypeDescription
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
NameDescription
valuecom.google.type.Money
Returns
TypeDescription
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
NameDescription
builderForValuecom.google.type.Money.Builder
Returns
TypeDescription
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
NameDescription
valueString

The externalPriceUri to set.

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

The bytes for externalPriceUri to set.

Returns
TypeDescription
Price.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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