Class LoyaltyProgram (0.11.0)

public final class LoyaltyProgram extends GeneratedMessageV3 implements LoyaltyProgramOrBuilder

A message that represents loyalty program.

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

Static Fields

CASHBACK_FOR_FUTURE_USE_FIELD_NUMBER

public static final int CASHBACK_FOR_FUTURE_USE_FIELD_NUMBER
Field Value
Type Description
int

LOYALTY_POINTS_FIELD_NUMBER

public static final int LOYALTY_POINTS_FIELD_NUMBER
Field Value
Type Description
int

MEMBER_PRICE_EFFECTIVE_DATE_FIELD_NUMBER

public static final int MEMBER_PRICE_EFFECTIVE_DATE_FIELD_NUMBER
Field Value
Type Description
int

PRICE_FIELD_NUMBER

public static final int PRICE_FIELD_NUMBER
Field Value
Type Description
int

PROGRAM_LABEL_FIELD_NUMBER

public static final int PROGRAM_LABEL_FIELD_NUMBER
Field Value
Type Description
int

SHIPPING_LABEL_FIELD_NUMBER

public static final int SHIPPING_LABEL_FIELD_NUMBER
Field Value
Type Description
int

TIER_LABEL_FIELD_NUMBER

public static final int TIER_LABEL_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static LoyaltyProgram getDefaultInstance()
Returns
Type Description
LoyaltyProgram

getDescriptor()

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

newBuilder()

public static LoyaltyProgram.Builder newBuilder()
Returns
Type Description
LoyaltyProgram.Builder

newBuilder(LoyaltyProgram prototype)

public static LoyaltyProgram.Builder newBuilder(LoyaltyProgram prototype)
Parameter
Name Description
prototype LoyaltyProgram
Returns
Type Description
LoyaltyProgram.Builder

parseDelimitedFrom(InputStream input)

public static LoyaltyProgram parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
LoyaltyProgram
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LoyaltyProgram parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LoyaltyProgram
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static LoyaltyProgram parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
LoyaltyProgram
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static LoyaltyProgram parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LoyaltyProgram
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static LoyaltyProgram parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
LoyaltyProgram
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static LoyaltyProgram parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LoyaltyProgram
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static LoyaltyProgram parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
LoyaltyProgram
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static LoyaltyProgram parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LoyaltyProgram
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static LoyaltyProgram parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
LoyaltyProgram
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LoyaltyProgram parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LoyaltyProgram
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static LoyaltyProgram parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
LoyaltyProgram
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static LoyaltyProgram parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LoyaltyProgram
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<LoyaltyProgram> parser()
Returns
Type Description
Parser<LoyaltyProgram>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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.

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

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.

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

getParserForType()

public Parser<LoyaltyProgram> getParserForType()
Returns
Type Description
Parser<LoyaltyProgram>
Overrides

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.

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.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public LoyaltyProgram.Builder newBuilderForType()
Returns
Type Description
LoyaltyProgram.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected LoyaltyProgram.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
LoyaltyProgram.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public LoyaltyProgram.Builder toBuilder()
Returns
Type Description
LoyaltyProgram.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException