Interface PromotionOrBuilder (0.9.0)

public interface PromotionOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getAttributes()

public abstract Attributes getAttributes()

Optional. A list of promotion attributes.

.google.shopping.merchant.promotions.v1beta.Attributes attributes = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attributes

The attributes.

getAttributesOrBuilder()

public abstract AttributesOrBuilder getAttributesOrBuilder()

Optional. A list of promotion attributes.

.google.shopping.merchant.promotions.v1beta.Attributes attributes = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AttributesOrBuilder

getContentLanguage()

public abstract String getContentLanguage()

Required. The two-letter ISO 639-1 language code for the promotion.

Promotions is only for selected languages.

string content_language = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The contentLanguage.

getContentLanguageBytes()

public abstract ByteString getContentLanguageBytes()

Required. The two-letter ISO 639-1 language code for the promotion.

Promotions is only for selected languages.

string content_language = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for contentLanguage.

getCustomAttributes(int index)

public abstract CustomAttribute getCustomAttributes(int index)

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
com.google.shopping.type.CustomAttribute

getCustomAttributesCount()

public abstract int getCustomAttributesCount()

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getCustomAttributesList()

public abstract List<CustomAttribute> getCustomAttributesList()

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<com.google.shopping.type.CustomAttribute>

getCustomAttributesOrBuilder(int index)

public abstract CustomAttributeOrBuilder getCustomAttributesOrBuilder(int index)

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
com.google.shopping.type.CustomAttributeOrBuilder

getCustomAttributesOrBuilderList()

public abstract List<? extends CustomAttributeOrBuilder> getCustomAttributesOrBuilderList()

Optional. A list of custom (merchant-provided) attributes. It can also be used for submitting any attribute of the data specification in its generic form (for example, { "name": "size type", "value": "regular" }). This is useful for submitting attributes not explicitly exposed by the API.

repeated .google.shopping.type.CustomAttribute custom_attributes = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.shopping.type.CustomAttributeOrBuilder>

getDataSource()

public abstract String getDataSource()

Output only. The primary data source of the promotion.

string data_source = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The dataSource.

getDataSourceBytes()

public abstract ByteString getDataSourceBytes()

Output only. The primary data source of the promotion.

string data_source = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for dataSource.

getName()

public abstract String getName()

Identifier. The name of the promotion. Format: accounts/{account}/promotions/{promotion}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public abstract ByteString getNameBytes()

Identifier. The name of the promotion. Format: accounts/{account}/promotions/{promotion}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getPromotionId()

public abstract String getPromotionId()

Required. The user provided promotion ID to uniquely identify the promotion. Follow minimum requirements to prevent promotion disapprovals.

string promotion_id = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The promotionId.

getPromotionIdBytes()

public abstract ByteString getPromotionIdBytes()

Required. The user provided promotion ID to uniquely identify the promotion. Follow minimum requirements to prevent promotion disapprovals.

string promotion_id = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for promotionId.

getPromotionStatus()

public abstract PromotionStatus getPromotionStatus()

Output only. The status of a promotion, data validation issues, that is, information about a promotion computed asynchronously.

.google.shopping.merchant.promotions.v1beta.PromotionStatus promotion_status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
PromotionStatus

The promotionStatus.

getPromotionStatusOrBuilder()

public abstract PromotionStatusOrBuilder getPromotionStatusOrBuilder()

Output only. The status of a promotion, data validation issues, that is, information about a promotion computed asynchronously.

.google.shopping.merchant.promotions.v1beta.PromotionStatus promotion_status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
PromotionStatusOrBuilder

getRedemptionChannel(int index)

public abstract RedemptionChannel getRedemptionChannel(int index)

Required. Redemption channel for the promotion. At least one channel is required.

repeated .google.shopping.merchant.promotions.v1beta.RedemptionChannel redemption_channel = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
RedemptionChannel

The redemptionChannel at the given index.

getRedemptionChannelCount()

public abstract int getRedemptionChannelCount()

Required. Redemption channel for the promotion. At least one channel is required.

repeated .google.shopping.merchant.promotions.v1beta.RedemptionChannel redemption_channel = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of redemptionChannel.

getRedemptionChannelList()

public abstract List<RedemptionChannel> getRedemptionChannelList()

Required. Redemption channel for the promotion. At least one channel is required.

repeated .google.shopping.merchant.promotions.v1beta.RedemptionChannel redemption_channel = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<RedemptionChannel>

A list containing the redemptionChannel.

getRedemptionChannelValue(int index)

public abstract int getRedemptionChannelValue(int index)

Required. Redemption channel for the promotion. At least one channel is required.

repeated .google.shopping.merchant.promotions.v1beta.RedemptionChannel redemption_channel = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of redemptionChannel at the given index.

getRedemptionChannelValueList()

public abstract List<Integer> getRedemptionChannelValueList()

Required. Redemption channel for the promotion. At least one channel is required.

repeated .google.shopping.merchant.promotions.v1beta.RedemptionChannel redemption_channel = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for redemptionChannel.

getTargetCountry()

public abstract String getTargetCountry()

Required. The target country used as part of the unique identifier. Represented as a CLDR territory code.

Promotions are only available in selected countries, Free Listings and Shopping ads Local Inventory ads

string target_country = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The targetCountry.

getTargetCountryBytes()

public abstract ByteString getTargetCountryBytes()

Required. The target country used as part of the unique identifier. Represented as a CLDR territory code.

Promotions are only available in selected countries, Free Listings and Shopping ads Local Inventory ads

string target_country = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for targetCountry.

getVersionNumber()

public abstract long getVersionNumber()

Optional. Represents the existing version (freshness) of the promotion, which can be used to preserve the right order when multiple updates are done at the same time.

If set, the insertion is prevented when version number is lower than the current version number of the existing promotion. Re-insertion (for example, promotion refresh after 30 days) can be performed with the current version_number.

If the operation is prevented, the aborted exception will be thrown.

optional int64 version_number = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The versionNumber.

hasAttributes()

public abstract boolean hasAttributes()

Optional. A list of promotion attributes.

.google.shopping.merchant.promotions.v1beta.Attributes attributes = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the attributes field is set.

hasPromotionStatus()

public abstract boolean hasPromotionStatus()

Output only. The status of a promotion, data validation issues, that is, information about a promotion computed asynchronously.

.google.shopping.merchant.promotions.v1beta.PromotionStatus promotion_status = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the promotionStatus field is set.

hasVersionNumber()

public abstract boolean hasVersionNumber()

Optional. Represents the existing version (freshness) of the promotion, which can be used to preserve the right order when multiple updates are done at the same time.

If set, the insertion is prevented when version number is lower than the current version number of the existing promotion. Re-insertion (for example, promotion refresh after 30 days) can be performed with the current version_number.

If the operation is prevented, the aborted exception will be thrown.

optional int64 version_number = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the versionNumber field is set.