Class LoyaltyProgram.Builder (0.11.0)

public static final class LoyaltyProgram.Builder extends GeneratedMessageV3.Builder<LoyaltyProgram.Builder> implements LoyaltyProgramOrBuilder

A message that represents loyalty program.

Protobuf type google.shopping.merchant.products.v1beta.LoyaltyProgram

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public LoyaltyProgram build()
Returns
Type Description
LoyaltyProgram

buildPartial()

public LoyaltyProgram buildPartial()
Returns
Type Description
LoyaltyProgram

clear()

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

clearCashbackForFutureUse()

public LoyaltyProgram.Builder clearCashbackForFutureUse()

The cashback that can be used for future purchases.

optional .google.shopping.type.Price cashback_for_future_use = 4;

Returns
Type Description
LoyaltyProgram.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearLoyaltyPoints()

public LoyaltyProgram.Builder clearLoyaltyPoints()

The amount of loyalty points earned on a purchase.

optional int64 loyalty_points = 5;

Returns
Type Description
LoyaltyProgram.Builder

This builder for chaining.

clearMemberPriceEffectiveDate()

public LoyaltyProgram.Builder clearMemberPriceEffectiveDate()

A date range during which the item is eligible for member price. If not specified, the member price is always applicable. The date range is represented by a pair of ISO 8601 dates separated by a space, comma, or slash.

optional .google.type.Interval member_price_effective_date = 6;

Returns
Type Description
LoyaltyProgram.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPrice()

public LoyaltyProgram.Builder clearPrice()

The price for members of the given tier, that is, the instant discount price. Must be smaller or equal to the regular price.

optional .google.shopping.type.Price price = 3;

Returns
Type Description
LoyaltyProgram.Builder

clearProgramLabel()

public LoyaltyProgram.Builder clearProgramLabel()

The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a merchant entity and a loyalty program entity. The label must be provided so that the system can associate the assets below (for example, price and points) with a merchant. The corresponding program must be linked to the merchant account.

optional string program_label = 1;

Returns
Type Description
LoyaltyProgram.Builder

This builder for chaining.

clearShippingLabel()

public LoyaltyProgram.Builder clearShippingLabel()

The label of the shipping benefit. If the field has value, this offer has loyalty shipping benefit. If the field value isn't provided, the item is not eligible for loyalty shipping for the given loyalty tier.

optional string shipping_label = 7;

Returns
Type Description
LoyaltyProgram.Builder

This builder for chaining.

clearTierLabel()

public LoyaltyProgram.Builder clearTierLabel()

The label of the tier within the loyalty program. Must match one of the labels within the program.

optional string tier_label = 2;

Returns
Type Description
LoyaltyProgram.Builder

This builder for chaining.

clone()

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

getCashbackForFutureUse()

public Price getCashbackForFutureUse()

The cashback that can be used for future purchases.

optional .google.shopping.type.Price cashback_for_future_use = 4;

Returns
Type Description
com.google.shopping.type.Price

The cashbackForFutureUse.

getCashbackForFutureUseBuilder()

public Price.Builder getCashbackForFutureUseBuilder()

The cashback that can be used for future purchases.

optional .google.shopping.type.Price cashback_for_future_use = 4;

Returns
Type Description
com.google.shopping.type.Price.Builder

getCashbackForFutureUseOrBuilder()

public PriceOrBuilder getCashbackForFutureUseOrBuilder()

The cashback that can be used for future purchases.

optional .google.shopping.type.Price cashback_for_future_use = 4;

Returns
Type Description
com.google.shopping.type.PriceOrBuilder

getDefaultInstanceForType()

public LoyaltyProgram getDefaultInstanceForType()
Returns
Type Description
LoyaltyProgram

getDescriptorForType()

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

getLoyaltyPoints()

public long getLoyaltyPoints()

The amount of loyalty points earned on a purchase.

optional int64 loyalty_points = 5;

Returns
Type Description
long

The loyaltyPoints.

getMemberPriceEffectiveDate()

public Interval getMemberPriceEffectiveDate()

A date range during which the item is eligible for member price. If not specified, the member price is always applicable. The date range is represented by a pair of ISO 8601 dates separated by a space, comma, or slash.

optional .google.type.Interval member_price_effective_date = 6;

Returns
Type Description
com.google.type.Interval

The memberPriceEffectiveDate.

getMemberPriceEffectiveDateBuilder()

public Interval.Builder getMemberPriceEffectiveDateBuilder()

A date range during which the item is eligible for member price. If not specified, the member price is always applicable. The date range is represented by a pair of ISO 8601 dates separated by a space, comma, or slash.

optional .google.type.Interval member_price_effective_date = 6;

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

getMemberPriceEffectiveDateOrBuilder()

public IntervalOrBuilder getMemberPriceEffectiveDateOrBuilder()

A date range during which the item is eligible for member price. If not specified, the member price is always applicable. The date range is represented by a pair of ISO 8601 dates separated by a space, comma, or slash.

optional .google.type.Interval member_price_effective_date = 6;

Returns
Type Description
com.google.type.IntervalOrBuilder

getPrice()

public Price getPrice()

The price for members of the given tier, that is, the instant discount price. Must be smaller or equal to the regular price.

optional .google.shopping.type.Price price = 3;

Returns
Type Description
com.google.shopping.type.Price

The price.

getPriceBuilder()

public Price.Builder getPriceBuilder()

The price for members of the given tier, that is, the instant discount price. Must be smaller or equal to the regular price.

optional .google.shopping.type.Price price = 3;

Returns
Type Description
com.google.shopping.type.Price.Builder

getPriceOrBuilder()

public PriceOrBuilder getPriceOrBuilder()

The price for members of the given tier, that is, the instant discount price. Must be smaller or equal to the regular price.

optional .google.shopping.type.Price price = 3;

Returns
Type Description
com.google.shopping.type.PriceOrBuilder

getProgramLabel()

public String getProgramLabel()

The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a merchant entity and a loyalty program entity. The label must be provided so that the system can associate the assets below (for example, price and points) with a merchant. The corresponding program must be linked to the merchant account.

optional string program_label = 1;

Returns
Type Description
String

The programLabel.

getProgramLabelBytes()

public ByteString getProgramLabelBytes()

The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a merchant entity and a loyalty program entity. The label must be provided so that the system can associate the assets below (for example, price and points) with a merchant. The corresponding program must be linked to the merchant account.

optional string program_label = 1;

Returns
Type Description
ByteString

The bytes for programLabel.

getShippingLabel()

public String getShippingLabel()

The label of the shipping benefit. If the field has value, this offer has loyalty shipping benefit. If the field value isn't provided, the item is not eligible for loyalty shipping for the given loyalty tier.

optional string shipping_label = 7;

Returns
Type Description
String

The shippingLabel.

getShippingLabelBytes()

public ByteString getShippingLabelBytes()

The label of the shipping benefit. If the field has value, this offer has loyalty shipping benefit. If the field value isn't provided, the item is not eligible for loyalty shipping for the given loyalty tier.

optional string shipping_label = 7;

Returns
Type Description
ByteString

The bytes for shippingLabel.

getTierLabel()

public String getTierLabel()

The label of the tier within the loyalty program. Must match one of the labels within the program.

optional string tier_label = 2;

Returns
Type Description
String

The tierLabel.

getTierLabelBytes()

public ByteString getTierLabelBytes()

The label of the tier within the loyalty program. Must match one of the labels within the program.

optional string tier_label = 2;

Returns
Type Description
ByteString

The bytes for tierLabel.

hasCashbackForFutureUse()

public boolean hasCashbackForFutureUse()

The cashback that can be used for future purchases.

optional .google.shopping.type.Price cashback_for_future_use = 4;

Returns
Type Description
boolean

Whether the cashbackForFutureUse field is set.

hasLoyaltyPoints()

public boolean hasLoyaltyPoints()

The amount of loyalty points earned on a purchase.

optional int64 loyalty_points = 5;

Returns
Type Description
boolean

Whether the loyaltyPoints field is set.

hasMemberPriceEffectiveDate()

public boolean hasMemberPriceEffectiveDate()

A date range during which the item is eligible for member price. If not specified, the member price is always applicable. The date range is represented by a pair of ISO 8601 dates separated by a space, comma, or slash.

optional .google.type.Interval member_price_effective_date = 6;

Returns
Type Description
boolean

Whether the memberPriceEffectiveDate field is set.

hasPrice()

public boolean hasPrice()

The price for members of the given tier, that is, the instant discount price. Must be smaller or equal to the regular price.

optional .google.shopping.type.Price price = 3;

Returns
Type Description
boolean

Whether the price field is set.

hasProgramLabel()

public boolean hasProgramLabel()

The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a merchant entity and a loyalty program entity. The label must be provided so that the system can associate the assets below (for example, price and points) with a merchant. The corresponding program must be linked to the merchant account.

optional string program_label = 1;

Returns
Type Description
boolean

Whether the programLabel field is set.

hasShippingLabel()

public boolean hasShippingLabel()

The label of the shipping benefit. If the field has value, this offer has loyalty shipping benefit. If the field value isn't provided, the item is not eligible for loyalty shipping for the given loyalty tier.

optional string shipping_label = 7;

Returns
Type Description
boolean

Whether the shippingLabel field is set.

hasTierLabel()

public boolean hasTierLabel()

The label of the tier within the loyalty program. Must match one of the labels within the program.

optional string tier_label = 2;

Returns
Type Description
boolean

Whether the tierLabel field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCashbackForFutureUse(Price value)

public LoyaltyProgram.Builder mergeCashbackForFutureUse(Price value)

The cashback that can be used for future purchases.

optional .google.shopping.type.Price cashback_for_future_use = 4;

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(LoyaltyProgram other)

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

mergeMemberPriceEffectiveDate(Interval value)

public LoyaltyProgram.Builder mergeMemberPriceEffectiveDate(Interval value)

A date range during which the item is eligible for member price. If not specified, the member price is always applicable. The date range is represented by a pair of ISO 8601 dates separated by a space, comma, or slash.

optional .google.type.Interval member_price_effective_date = 6;

Parameter
Name Description
value com.google.type.Interval
Returns
Type Description
LoyaltyProgram.Builder

mergePrice(Price value)

public LoyaltyProgram.Builder mergePrice(Price value)

The price for members of the given tier, that is, the instant discount price. Must be smaller or equal to the regular price.

optional .google.shopping.type.Price price = 3;

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setCashbackForFutureUse(Price value)

public LoyaltyProgram.Builder setCashbackForFutureUse(Price value)

The cashback that can be used for future purchases.

optional .google.shopping.type.Price cashback_for_future_use = 4;

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

setCashbackForFutureUse(Price.Builder builderForValue)

public LoyaltyProgram.Builder setCashbackForFutureUse(Price.Builder builderForValue)

The cashback that can be used for future purchases.

optional .google.shopping.type.Price cashback_for_future_use = 4;

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setLoyaltyPoints(long value)

public LoyaltyProgram.Builder setLoyaltyPoints(long value)

The amount of loyalty points earned on a purchase.

optional int64 loyalty_points = 5;

Parameter
Name Description
value long

The loyaltyPoints to set.

Returns
Type Description
LoyaltyProgram.Builder

This builder for chaining.

setMemberPriceEffectiveDate(Interval value)

public LoyaltyProgram.Builder setMemberPriceEffectiveDate(Interval value)

A date range during which the item is eligible for member price. If not specified, the member price is always applicable. The date range is represented by a pair of ISO 8601 dates separated by a space, comma, or slash.

optional .google.type.Interval member_price_effective_date = 6;

Parameter
Name Description
value com.google.type.Interval
Returns
Type Description
LoyaltyProgram.Builder

setMemberPriceEffectiveDate(Interval.Builder builderForValue)

public LoyaltyProgram.Builder setMemberPriceEffectiveDate(Interval.Builder builderForValue)

A date range during which the item is eligible for member price. If not specified, the member price is always applicable. The date range is represented by a pair of ISO 8601 dates separated by a space, comma, or slash.

optional .google.type.Interval member_price_effective_date = 6;

Parameter
Name Description
builderForValue com.google.type.Interval.Builder
Returns
Type Description
LoyaltyProgram.Builder

setPrice(Price value)

public LoyaltyProgram.Builder setPrice(Price value)

The price for members of the given tier, that is, the instant discount price. Must be smaller or equal to the regular price.

optional .google.shopping.type.Price price = 3;

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

setPrice(Price.Builder builderForValue)

public LoyaltyProgram.Builder setPrice(Price.Builder builderForValue)

The price for members of the given tier, that is, the instant discount price. Must be smaller or equal to the regular price.

optional .google.shopping.type.Price price = 3;

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

setProgramLabel(String value)

public LoyaltyProgram.Builder setProgramLabel(String value)

The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a merchant entity and a loyalty program entity. The label must be provided so that the system can associate the assets below (for example, price and points) with a merchant. The corresponding program must be linked to the merchant account.

optional string program_label = 1;

Parameter
Name Description
value String

The programLabel to set.

Returns
Type Description
LoyaltyProgram.Builder

This builder for chaining.

setProgramLabelBytes(ByteString value)

public LoyaltyProgram.Builder setProgramLabelBytes(ByteString value)

The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a merchant entity and a loyalty program entity. The label must be provided so that the system can associate the assets below (for example, price and points) with a merchant. The corresponding program must be linked to the merchant account.

optional string program_label = 1;

Parameter
Name Description
value ByteString

The bytes for programLabel to set.

Returns
Type Description
LoyaltyProgram.Builder

This builder for chaining.

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

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

setShippingLabel(String value)

public LoyaltyProgram.Builder setShippingLabel(String value)

The label of the shipping benefit. If the field has value, this offer has loyalty shipping benefit. If the field value isn't provided, the item is not eligible for loyalty shipping for the given loyalty tier.

optional string shipping_label = 7;

Parameter
Name Description
value String

The shippingLabel to set.

Returns
Type Description
LoyaltyProgram.Builder

This builder for chaining.

setShippingLabelBytes(ByteString value)

public LoyaltyProgram.Builder setShippingLabelBytes(ByteString value)

The label of the shipping benefit. If the field has value, this offer has loyalty shipping benefit. If the field value isn't provided, the item is not eligible for loyalty shipping for the given loyalty tier.

optional string shipping_label = 7;

Parameter
Name Description
value ByteString

The bytes for shippingLabel to set.

Returns
Type Description
LoyaltyProgram.Builder

This builder for chaining.

setTierLabel(String value)

public LoyaltyProgram.Builder setTierLabel(String value)

The label of the tier within the loyalty program. Must match one of the labels within the program.

optional string tier_label = 2;

Parameter
Name Description
value String

The tierLabel to set.

Returns
Type Description
LoyaltyProgram.Builder

This builder for chaining.

setTierLabelBytes(ByteString value)

public LoyaltyProgram.Builder setTierLabelBytes(ByteString value)

The label of the tier within the loyalty program. Must match one of the labels within the program.

optional string tier_label = 2;

Parameter
Name Description
value ByteString

The bytes for tierLabel to set.

Returns
Type Description
LoyaltyProgram.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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