Variables
ProductApplicability_name, ProductApplicability_value
var (
ProductApplicability_name = map[int32]string{
0: "PRODUCT_APPLICABILITY_UNSPECIFIED",
1: "ALL_PRODUCTS",
2: "SPECIFIC_PRODUCTS",
}
ProductApplicability_value = map[string]int32{
"PRODUCT_APPLICABILITY_UNSPECIFIED": 0,
"ALL_PRODUCTS": 1,
"SPECIFIC_PRODUCTS": 2,
}
)
Enum value maps for ProductApplicability.
StoreApplicability_name, StoreApplicability_value
var (
StoreApplicability_name = map[int32]string{
0: "STORE_APPLICABILITY_UNSPECIFIED",
1: "ALL_STORES",
2: "SPECIFIC_STORES",
}
StoreApplicability_value = map[string]int32{
"STORE_APPLICABILITY_UNSPECIFIED": 0,
"ALL_STORES": 1,
"SPECIFIC_STORES": 2,
}
)
Enum value maps for StoreApplicability.
OfferType_name, OfferType_value
var (
OfferType_name = map[int32]string{
0: "OFFER_TYPE_UNSPECIFIED",
1: "NO_CODE",
2: "GENERIC_CODE",
}
OfferType_value = map[string]int32{
"OFFER_TYPE_UNSPECIFIED": 0,
"NO_CODE": 1,
"GENERIC_CODE": 2,
}
)
Enum value maps for OfferType.
RedemptionChannel_name, RedemptionChannel_value
var (
RedemptionChannel_name = map[int32]string{
0: "REDEMPTION_CHANNEL_UNSPECIFIED",
1: "IN_STORE",
2: "ONLINE",
}
RedemptionChannel_value = map[string]int32{
"REDEMPTION_CHANNEL_UNSPECIFIED": 0,
"IN_STORE": 1,
"ONLINE": 2,
}
)
Enum value maps for RedemptionChannel.
CouponValueType_name, CouponValueType_value
var (
CouponValueType_name = map[int32]string{
0: "COUPON_VALUE_TYPE_UNSPECIFIED",
1: "MONEY_OFF",
2: "PERCENT_OFF",
3: "BUY_M_GET_N_MONEY_OFF",
4: "BUY_M_GET_N_PERCENT_OFF",
5: "BUY_M_GET_MONEY_OFF",
6: "BUY_M_GET_PERCENT_OFF",
7: "FREE_GIFT",
8: "FREE_GIFT_WITH_VALUE",
9: "FREE_GIFT_WITH_ITEM_ID",
10: "FREE_SHIPPING_STANDARD",
11: "FREE_SHIPPING_OVERNIGHT",
12: "FREE_SHIPPING_TWO_DAY",
}
CouponValueType_value = map[string]int32{
"COUPON_VALUE_TYPE_UNSPECIFIED": 0,
"MONEY_OFF": 1,
"PERCENT_OFF": 2,
"BUY_M_GET_N_MONEY_OFF": 3,
"BUY_M_GET_N_PERCENT_OFF": 4,
"BUY_M_GET_MONEY_OFF": 5,
"BUY_M_GET_PERCENT_OFF": 6,
"FREE_GIFT": 7,
"FREE_GIFT_WITH_VALUE": 8,
"FREE_GIFT_WITH_ITEM_ID": 9,
"FREE_SHIPPING_STANDARD": 10,
"FREE_SHIPPING_OVERNIGHT": 11,
"FREE_SHIPPING_TWO_DAY": 12,
}
)
Enum value maps for CouponValueType.
PromotionStatus_DestinationStatus_State_name, PromotionStatus_DestinationStatus_State_value
var (
PromotionStatus_DestinationStatus_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "IN_REVIEW",
2: "REJECTED",
3: "LIVE",
4: "STOPPED",
5: "EXPIRED",
6: "PENDING",
}
PromotionStatus_DestinationStatus_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"IN_REVIEW": 1,
"REJECTED": 2,
"LIVE": 3,
"STOPPED": 4,
"EXPIRED": 5,
"PENDING": 6,
}
)
Enum value maps for PromotionStatus_DestinationStatus_State.
PromotionStatus_ItemLevelIssue_Severity_name, PromotionStatus_ItemLevelIssue_Severity_value
var (
PromotionStatus_ItemLevelIssue_Severity_name = map[int32]string{
0: "SEVERITY_UNSPECIFIED",
1: "NOT_IMPACTED",
2: "DEMOTED",
3: "DISAPPROVED",
}
PromotionStatus_ItemLevelIssue_Severity_value = map[string]int32{
"SEVERITY_UNSPECIFIED": 0,
"NOT_IMPACTED": 1,
"DEMOTED": 2,
"DISAPPROVED": 3,
}
)
Enum value maps for PromotionStatus_ItemLevelIssue_Severity.
File_google_shopping_merchant_promotions_v1_promotions_common_proto
var File_google_shopping_merchant_promotions_v1_promotions_common_proto protoreflect.FileDescriptor
File_google_shopping_merchant_promotions_v1_promotions_proto
var File_google_shopping_merchant_promotions_v1_promotions_proto protoreflect.FileDescriptor
Functions
func RegisterPromotionsServiceServer
func RegisterPromotionsServiceServer(s *grpc.Server, srv PromotionsServiceServer)
Attributes
type Attributes struct {
// Required. Applicability of the promotion to either all products or
// [only specific
// products](https://support.google.com/merchants/answer/6396257?ref_topic=6396150&sjid=17642868584668136159-NC).
ProductApplicability ProductApplicability `protobuf:"varint,1,opt,name=product_applicability,json=productApplicability,proto3,enum=google.shopping.merchant.promotions.v1.ProductApplicability" json:"product_applicability,omitempty"`
// Required.
// [Type](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC)
// of the promotion. Use this attribute to indicate whether or not customers
// need a coupon code to redeem your promotion.
OfferType OfferType `protobuf:"varint,2,opt,name=offer_type,json=offerType,proto3,enum=google.shopping.merchant.promotions.v1.OfferType" json:"offer_type,omitempty"`
// Optional. Generic redemption code for the promotion. To be used with the
// `offerType` field and must meet the [minimum
// requirements](https://support.google.com/merchants/answer/13837405?ref_topic=13773355&sjid=17642868584668136159-NC).
GenericRedemptionCode string `protobuf:"bytes,3,opt,name=generic_redemption_code,json=genericRedemptionCode,proto3" json:"generic_redemption_code,omitempty"`
// Required. [Long
// title](https://support.google.com/merchants/answer/13838102?ref_topic=13773355&sjid=17642868584668136159-NC)
// for the promotion.
LongTitle string `protobuf:"bytes,4,opt,name=long_title,json=longTitle,proto3" json:"long_title,omitempty"`
// Required. The [coupon value type]
// (https://support.google.com/merchants/answer/13861986?ref_topic=13773355&sjid=17642868584668136159-NC)
// attribute to signal the type of promotion that you are running. Depending
// on type of the selected coupon value [some attributes are
// required](https://support.google.com/merchants/answer/6393006?ref_topic=7322920).
CouponValueType CouponValueType `protobuf:"varint,5,opt,name=coupon_value_type,json=couponValueType,proto3,enum=google.shopping.merchant.promotions.v1.CouponValueType" json:"coupon_value_type,omitempty"`
// Required. The list of destinations (also known as [Marketing
// methods](https://support.google.com/merchants/answer/15130232)) where the
// promotion applies to. If you don't specify a destination by including a
// supported value in your data source, your promotion will display in
// Shopping ads and free listings by default.
//
// You may have previously submitted the following values as destinations for
// your products: Shopping Actions, Surfaces across Google, Local surfaces
// across Google. To represent these values use `FREE_LISTINGS`,
// `FREE_LOCAL_LISTINGS`, `LOCAL_INVENTORY_ADS`. For more details see
// [Promotion
// destination](https://support.google.com/merchants/answer/13837465?sjid=5155774230887277618-NC)
PromotionDestinations []typepb.Destination_DestinationEnum `protobuf:"varint,6,rep,packed,name=promotion_destinations,json=promotionDestinations,proto3,enum=google.shopping.type.Destination_DestinationEnum" json:"promotion_destinations,omitempty"`
// Optional. Product filter by [item
// ID](https://support.google.com/merchants/answer/13861565?ref_topic=13773355&sjid=17642868584668136159-NC)
// for the promotion. The product filter attributes only applies when the
// products eligible for promotion product applicability
// `product_applicability` attribute is set to
// [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
ItemIdInclusion []string `protobuf:"bytes,7,rep,name=item_id_inclusion,json=itemIdInclusion,proto3" json:"item_id_inclusion,omitempty"`
// Optional. Product filter by brand for the promotion. The product filter
// attributes only applies when the products eligible for promotion product
// applicability `product_applicability` attribute is set to
// [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
BrandInclusion []string `protobuf:"bytes,8,rep,name=brand_inclusion,json=brandInclusion,proto3" json:"brand_inclusion,omitempty"`
// Optional. Product filter by item group ID for the promotion. The product
// filter attributes only applies when the products eligible for promotion
// product applicability [product_applicability] attribute is set to
// [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
ItemGroupIdInclusion []string `protobuf:"bytes,9,rep,name=item_group_id_inclusion,json=itemGroupIdInclusion,proto3" json:"item_group_id_inclusion,omitempty"`
// Optional. Product filter by product type for the promotion. The product
// filter attributes only applies when the products eligible for promotion
// product applicability `product_applicability` attribute is set to
// [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
ProductTypeInclusion []string `protobuf:"bytes,10,rep,name=product_type_inclusion,json=productTypeInclusion,proto3" json:"product_type_inclusion,omitempty"`
// Optional. Product filter by [item ID
// exclusion](https://support.google.com/merchants/answer/13863524?ref_topic=13773355&sjid=17642868584668136159-NC)
// for the promotion. The product filter attributes only applies when the
// products eligible for promotion product applicability
// `product_applicability` attribute is set to
// [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
ItemIdExclusion []string `protobuf:"bytes,11,rep,name=item_id_exclusion,json=itemIdExclusion,proto3" json:"item_id_exclusion,omitempty"`
// Optional. Product filter by [brand
// exclusion](https://support.google.com/merchants/answer/13861679?ref_topic=13773355&sjid=17642868584668136159-NC)
// for the promotion. The product filter attributes only applies when the
// products eligible for promotion product applicability
// `product_applicability` attribute is set to
// [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
BrandExclusion []string `protobuf:"bytes,12,rep,name=brand_exclusion,json=brandExclusion,proto3" json:"brand_exclusion,omitempty"`
// Optional. Product filter by [item group
// ID](https://support.google.com/merchants/answer/13837298?ref_topic=13773355&sjid=17642868584668136159-NC).
// The product filter attributes only applies when the products eligible for
// promotion product applicability `product_applicability` attribute is set to
// [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
// exclusion for the promotion.
ItemGroupIdExclusion []string `protobuf:"bytes,13,rep,name=item_group_id_exclusion,json=itemGroupIdExclusion,proto3" json:"item_group_id_exclusion,omitempty"`
// Optional. Product filter by [product type
// exclusion](https://support.google.com/merchants/answer/13863746?ref_topic=13773355&sjid=17642868584668136159-NC)
// for the promotion. The product filter attributes only applies when the
// products eligible for promotion product applicability
// `product_applicability` attribute is set to
// [specific_products](https://support.google.com/merchants/answer/13837299?ref_topic=13773355&sjid=17642868584668136159-NC).
ProductTypeExclusion []string `protobuf:"bytes,14,rep,name=product_type_exclusion,json=productTypeExclusion,proto3" json:"product_type_exclusion,omitempty"`
// Optional. [Minimum purchase
// amount](https://support.google.com/merchants/answer/13837705?ref_topic=13773355&sjid=17642868584668136159-NC)
// for the promotion.
MinimumPurchaseAmount *typepb.Price `protobuf:"bytes,15,opt,name=minimum_purchase_amount,json=minimumPurchaseAmount,proto3" json:"minimum_purchase_amount,omitempty"`
MinimumPurchaseQuantity int64 `protobuf:"varint,16,opt,name=minimum_purchase_quantity,json=minimumPurchaseQuantity,proto3" json:"minimum_purchase_quantity,omitempty"`
// Optional. [Maximum purchase
// quantity](https://support.google.com/merchants/answer/13861564?ref_topic=13773355&sjid=17642868584668136159-NC)
// for the promotion.
LimitQuantity int64 `protobuf:"varint,17,opt,name=limit_quantity,json=limitQuantity,proto3" json:"limit_quantity,omitempty"`
// Optional. [Maximum product
// price](https://support.google.com/merchants/answer/2906014) for
// promotion.
LimitValue *typepb.Price `protobuf:"bytes,18,opt,name=limit_value,json=limitValue,proto3" json:"limit_value,omitempty"`
// Optional. The [percentage
// discount](https://support.google.com/merchants/answer/13837404?sjid=17642868584668136159-NC)
// offered in the promotion.
PercentOff int64 `protobuf:"varint,19,opt,name=percent_off,json=percentOff,proto3" json:"percent_off,omitempty"`
// Optional. The [money off
// amount](https://support.google.com/merchants/answer/13838101?ref_topic=13773355&sjid=17642868584668136159-NC)
// offered in the promotion.
MoneyOffAmount *typepb.Price `protobuf:"bytes,20,opt,name=money_off_amount,json=moneyOffAmount,proto3" json:"money_off_amount,omitempty"`
// Optional. The number of items discounted in the promotion. The attribute is
// set when `couponValueType` is equal to `buy_m_get_n_money_off` or
// `buy_m_get_n_percent_off`.
GetThisQuantityDiscounted int64 `protobuf:"varint,21,opt,name=get_this_quantity_discounted,json=getThisQuantityDiscounted,proto3" json:"get_this_quantity_discounted,omitempty"`
// Optional. [Free gift
// value](https://support.google.com/merchants/answer/13844477?ref_topic=13773355&sjid=17642868584668136159-NC)
// for the promotion.
FreeGiftValue *typepb.Price `protobuf:"bytes,22,opt,name=free_gift_value,json=freeGiftValue,proto3" json:"free_gift_value,omitempty"`
// Optional. [Free gift
// description](https://support.google.com/merchants/answer/13847245?ref_topic=13773355&sjid=17642868584668136159-NC)
// for the promotion.
FreeGiftDescription string `protobuf:"bytes,23,opt,name=free_gift_description,json=freeGiftDescription,proto3" json:"free_gift_description,omitempty"`
// Optional. [Free gift item
// ID](https://support.google.com/merchants/answer/13857152?ref_topic=13773355&sjid=17642868584668136159-NC)
// for the promotion.
FreeGiftItemId string `protobuf:"bytes,24,opt,name=free_gift_item_id,json=freeGiftItemId,proto3" json:"free_gift_item_id,omitempty"`
// Required. `TimePeriod` representation of the promotion's effective dates.
// This attribute specifies that the promotion can be tested on your online
// store during this time period.
PromotionEffectiveTimePeriod *interval.Interval `protobuf:"bytes,25,opt,name=promotion_effective_time_period,json=promotionEffectiveTimePeriod,proto3" json:"promotion_effective_time_period,omitempty"`
// Optional. `TimePeriod` representation of the promotion's display dates.
// This attribute specifies the date and time frame when the promotion will be
// live on Google.com and Shopping ads. If the display time period for
// promotion `promotion_display_time_period` attribute is not specified, the
// promotion effective time period `promotion_effective_time_period`
// determines the date and time frame when the promotion will be live on
// Google.com and Shopping ads.
PromotionDisplayTimePeriod *interval.Interval `protobuf:"bytes,26,opt,name=promotion_display_time_period,json=promotionDisplayTimePeriod,proto3" json:"promotion_display_time_period,omitempty"`
// Optional. Whether the promotion applies to [all stores, or only specified
// stores](https://support.google.com/merchants/answer/13857563?sjid=17642868584668136159-NC).
// Local Inventory ads promotions throw an error if no store applicability is
// included. An `INVALID_ARGUMENT` error is thrown if `store_applicability` is
// set to `ALL_STORES` and `store_codes_inclusion` or `score_code_exclusion`
// is set to a value.
StoreApplicability StoreApplicability `protobuf:"varint,28,opt,name=store_applicability,json=storeApplicability,proto3,enum=google.shopping.merchant.promotions.v1.StoreApplicability" json:"store_applicability,omitempty"`
// Optional. [Store codes to
// include](https://support.google.com/merchants/answer/13857470?ref_topic=13773355&sjid=17642868584668136159-NC)
// for the promotion. The store filter attributes only applies when the
// `store_applicability` attribute is set to
// [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
//
// Store code (the store ID from
// your Business Profile) of the physical store the product is sold in. See
// the [Local product inventory data
// specification](https://support.google.com/merchants/answer/3061342) for
// more information.
StoreCodesInclusion []string `protobuf:"bytes,29,rep,name=store_codes_inclusion,json=storeCodesInclusion,proto3" json:"store_codes_inclusion,omitempty"`
// Optional. [Store codes to
// exclude](https://support.google.com/merchants/answer/13859586?ref_topic=13773355&sjid=17642868584668136159-NC)
// for the promotion. The store filter attributes only applies when the
// `store_applicability` attribute is set to
// [specific_stores](https://support.google.com/merchants/answer/13857563?ref_topic=13773355&sjid=17642868584668136159-NC).
StoreCodesExclusion []string `protobuf:"bytes,30,rep,name=store_codes_exclusion,json=storeCodesExclusion,proto3" json:"store_codes_exclusion,omitempty"`
// Optional. URL to the page on the merchant's site where the promotion shows.
// Local Inventory ads promotions throw an error if no `promotion_url` is
// included. URL is used to confirm that the promotion is valid and can be
// redeemed.
PromotionUrl string `protobuf:"bytes,31,opt,name=promotion_url,json=promotionUrl,proto3" json:"promotion_url,omitempty"`
// contains filtered or unexported fields
}
Attributes.
func (*Attributes) Descriptor
func (*Attributes) Descriptor() ([]byte, []int)
Deprecated: Use Attributes.ProtoReflect.Descriptor instead.
func (*Attributes) GetBrandExclusion
func (x *Attributes) GetBrandExclusion() []string
func (*Attributes) GetBrandInclusion
func (x *Attributes) GetBrandInclusion() []string
func (*Attributes) GetCouponValueType
func (x *Attributes) GetCouponValueType() CouponValueType
func (*Attributes) GetFreeGiftDescription
func (x *Attributes) GetFreeGiftDescription() string
func (*Attributes) GetFreeGiftItemId
func (x *Attributes) GetFreeGiftItemId() string
func (*Attributes) GetFreeGiftValue
func (x *Attributes) GetFreeGiftValue() *typepb.Price
func (*Attributes) GetGenericRedemptionCode
func (x *Attributes) GetGenericRedemptionCode() string
func (*Attributes) GetGetThisQuantityDiscounted
func (x *Attributes) GetGetThisQuantityDiscounted() int64
func (*Attributes) GetItemGroupIdExclusion
func (x *Attributes) GetItemGroupIdExclusion() []string
func (*Attributes) GetItemGroupIdInclusion
func (x *Attributes) GetItemGroupIdInclusion() []string
func (*Attributes) GetItemIdExclusion
func (x *Attributes) GetItemIdExclusion() []string
func (*Attributes) GetItemIdInclusion
func (x *Attributes) GetItemIdInclusion() []string
func (*Attributes) GetLimitQuantity
func (x *Attributes) GetLimitQuantity() int64
func (*Attributes) GetLimitValue
func (x *Attributes) GetLimitValue() *typepb.Price
func (*Attributes) GetLongTitle
func (x *Attributes) GetLongTitle() string
func (*Attributes) GetMinimumPurchaseAmount
func (x *Attributes) GetMinimumPurchaseAmount() *typepb.Price
func (*Attributes) GetMinimumPurchaseQuantity
func (x *Attributes) GetMinimumPurchaseQuantity() int64
func (*Attributes) GetMoneyOffAmount
func (x *Attributes) GetMoneyOffAmount() *typepb.Price
func (*Attributes) GetOfferType
func (x *Attributes) GetOfferType() OfferType
func (*Attributes) GetPercentOff
func (x *Attributes) GetPercentOff() int64
func (*Attributes) GetProductApplicability
func (x *Attributes) GetProductApplicability() ProductApplicability
func (*Attributes) GetProductTypeExclusion
func (x *Attributes) GetProductTypeExclusion() []string
func (*Attributes) GetProductTypeInclusion
func (x *Attributes) GetProductTypeInclusion() []string
func (*Attributes) GetPromotionDestinations
func (x *Attributes) GetPromotionDestinations() []typepb.Destination_DestinationEnum
func (*Attributes) GetPromotionDisplayTimePeriod
func (x *Attributes) GetPromotionDisplayTimePeriod() *interval.Interval
func (*Attributes) GetPromotionEffectiveTimePeriod
func (x *Attributes) GetPromotionEffectiveTimePeriod() *interval.Interval
func (*Attributes) GetPromotionUrl
func (x *Attributes) GetPromotionUrl() string
func (*Attributes) GetStoreApplicability
func (x *Attributes) GetStoreApplicability() StoreApplicability
func (*Attributes) GetStoreCodesExclusion
func (x *Attributes) GetStoreCodesExclusion() []string
func (*Attributes) GetStoreCodesInclusion
func (x *Attributes) GetStoreCodesInclusion() []string
func (*Attributes) ProtoMessage
func (*Attributes) ProtoMessage()
func (*Attributes) ProtoReflect
func (x *Attributes) ProtoReflect() protoreflect.Message
func (*Attributes) Reset
func (x *Attributes) Reset()
func (*Attributes) String
func (x *Attributes) String() string
CouponValueType
type CouponValueType int32
Coupon value type of a promotion.
CouponValueType_COUPON_VALUE_TYPE_UNSPECIFIED, CouponValueType_MONEY_OFF, CouponValueType_PERCENT_OFF, CouponValueType_BUY_M_GET_N_MONEY_OFF, CouponValueType_BUY_M_GET_N_PERCENT_OFF, CouponValueType_BUY_M_GET_MONEY_OFF, CouponValueType_BUY_M_GET_PERCENT_OFF, CouponValueType_FREE_GIFT, CouponValueType_FREE_GIFT_WITH_VALUE, CouponValueType_FREE_GIFT_WITH_ITEM_ID, CouponValueType_FREE_SHIPPING_STANDARD, CouponValueType_FREE_SHIPPING_OVERNIGHT, CouponValueType_FREE_SHIPPING_TWO_DAY
const (
// Indicates that the coupon value type is unspecified.
CouponValueType_COUPON_VALUE_TYPE_UNSPECIFIED CouponValueType = 0
// Money off coupon value type.
CouponValueType_MONEY_OFF CouponValueType = 1
// Percent off coupon value type.
CouponValueType_PERCENT_OFF CouponValueType = 2
// Buy M quantity, get N money off coupon value type.
// `minimum_purchase_quantity` and `get_this_quantity_discounted` must be
// present. `money_off_amount` must also be present.
CouponValueType_BUY_M_GET_N_MONEY_OFF CouponValueType = 3
// Buy M quantity, get N percent off coupon value type.
// `minimum_purchase_quantity` and `get_this_quantity_discounted` must be
// present. `percent_off_percentage` must also be present.
CouponValueType_BUY_M_GET_N_PERCENT_OFF CouponValueType = 4
// Buy M quantity, get money off. `minimum_purchase_quantity` and
// `money_off_amount` must be present.
CouponValueType_BUY_M_GET_MONEY_OFF CouponValueType = 5
// Buy M quantity, get money off. `minimum_purchase_quantity` and
// `percent_off_percentage` must be present.
CouponValueType_BUY_M_GET_PERCENT_OFF CouponValueType = 6
// Free gift with description only.
CouponValueType_FREE_GIFT CouponValueType = 7
// Free gift with monetary value.
CouponValueType_FREE_GIFT_WITH_VALUE CouponValueType = 8
// Free gift with item ID.
CouponValueType_FREE_GIFT_WITH_ITEM_ID CouponValueType = 9
// Standard free shipping coupon value type. Only available for online
// promotions.
CouponValueType_FREE_SHIPPING_STANDARD CouponValueType = 10
// Overnight free shipping coupon value type. Only available for online
// promotions.
CouponValueType_FREE_SHIPPING_OVERNIGHT CouponValueType = 11
// Two day free shipping coupon value type. Only available for online
// promotions.
CouponValueType_FREE_SHIPPING_TWO_DAY CouponValueType = 12
)
func (CouponValueType) Descriptor
func (CouponValueType) Descriptor() protoreflect.EnumDescriptor
func (CouponValueType) Enum
func (x CouponValueType) Enum() *CouponValueType
func (CouponValueType) EnumDescriptor
func (CouponValueType) EnumDescriptor() ([]byte, []int)
Deprecated: Use CouponValueType.Descriptor instead.
func (CouponValueType) Number
func (x CouponValueType) Number() protoreflect.EnumNumber
func (CouponValueType) String
func (x CouponValueType) String() string
func (CouponValueType) Type
func (CouponValueType) Type() protoreflect.EnumType
GetPromotionRequest
type GetPromotionRequest struct {
// Required. The name of the promotion to retrieve.
// Format: `accounts/{account}/promotions/{promotions}`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
Request message for the GetPromotion
method.
func (*GetPromotionRequest) Descriptor
func (*GetPromotionRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPromotionRequest.ProtoReflect.Descriptor instead.
func (*GetPromotionRequest) GetName
func (x *GetPromotionRequest) GetName() string
func (*GetPromotionRequest) ProtoMessage
func (*GetPromotionRequest) ProtoMessage()
func (*GetPromotionRequest) ProtoReflect
func (x *GetPromotionRequest) ProtoReflect() protoreflect.Message
func (*GetPromotionRequest) Reset
func (x *GetPromotionRequest) Reset()
func (*GetPromotionRequest) String
func (x *GetPromotionRequest) String() string
InsertPromotionRequest
type InsertPromotionRequest struct {
// Required. The account where the promotion will be inserted.
// Format: accounts/{account}
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The promotion to insert.
Promotion *Promotion `protobuf:"bytes,2,opt,name=promotion,proto3" json:"promotion,omitempty"`
// Required. The data source of the
// [promotion](https://support.google.com/merchants/answer/6396268?sjid=5155774230887277618-NC)
// Format:
// `accounts/{account}/dataSources/{datasource}`.
DataSource string `protobuf:"bytes,3,opt,name=data_source,json=dataSource,proto3" json:"data_source,omitempty"`
// contains filtered or unexported fields
}
Request message for the InsertPromotion
method.
func (*InsertPromotionRequest) Descriptor
func (*InsertPromotionRequest) Descriptor() ([]byte, []int)
Deprecated: Use InsertPromotionRequest.ProtoReflect.Descriptor instead.
func (*InsertPromotionRequest) GetDataSource
func (x *InsertPromotionRequest) GetDataSource() string
func (*InsertPromotionRequest) GetParent
func (x *InsertPromotionRequest) GetParent() string
func (*InsertPromotionRequest) GetPromotion
func (x *InsertPromotionRequest) GetPromotion() *Promotion
func (*InsertPromotionRequest) ProtoMessage
func (*InsertPromotionRequest) ProtoMessage()
func (*InsertPromotionRequest) ProtoReflect
func (x *InsertPromotionRequest) ProtoReflect() protoreflect.Message
func (*InsertPromotionRequest) Reset
func (x *InsertPromotionRequest) Reset()
func (*InsertPromotionRequest) String
func (x *InsertPromotionRequest) String() string
ListPromotionsRequest
type ListPromotionsRequest struct {
// Required. The account to list processed promotions for.
// Format: `accounts/{account}`
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. The maximum number of promotions to return. The service may
// return fewer than this value. The maximum value is 250; values above 250
// will be coerced to 250. If unspecified, the maximum number of promotions
// will be returned.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. A page token, received from a previous `ListPromotions` call.
// Provide this to retrieve the subsequent page.
//
// When paginating, all other parameters provided to `ListPromotions` must
// match the call that provided the page token.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// contains filtered or unexported fields
}
Request message for the ListPromotions
method.
func (*ListPromotionsRequest) Descriptor
func (*ListPromotionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListPromotionsRequest.ProtoReflect.Descriptor instead.
func (*ListPromotionsRequest) GetPageSize
func (x *ListPromotionsRequest) GetPageSize() int32
func (*ListPromotionsRequest) GetPageToken
func (x *ListPromotionsRequest) GetPageToken() string
func (*ListPromotionsRequest) GetParent
func (x *ListPromotionsRequest) GetParent() string
func (*ListPromotionsRequest) ProtoMessage
func (*ListPromotionsRequest) ProtoMessage()
func (*ListPromotionsRequest) ProtoReflect
func (x *ListPromotionsRequest) ProtoReflect() protoreflect.Message
func (*ListPromotionsRequest) Reset
func (x *ListPromotionsRequest) Reset()
func (*ListPromotionsRequest) String
func (x *ListPromotionsRequest) String() string
ListPromotionsResponse
type ListPromotionsResponse struct {
// The processed promotions from the specified account.
Promotions []*Promotion `protobuf:"bytes,1,rep,name=promotions,proto3" json:"promotions,omitempty"`
// A token, which can be sent as `page_token` to retrieve the next page.
// If this field is omitted, there are no subsequent pages.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// contains filtered or unexported fields
}
Response message for the ListPromotions
method.
func (*ListPromotionsResponse) Descriptor
func (*ListPromotionsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListPromotionsResponse.ProtoReflect.Descriptor instead.
func (*ListPromotionsResponse) GetNextPageToken
func (x *ListPromotionsResponse) GetNextPageToken() string
func (*ListPromotionsResponse) GetPromotions
func (x *ListPromotionsResponse) GetPromotions() []*Promotion
func (*ListPromotionsResponse) ProtoMessage
func (*ListPromotionsResponse) ProtoMessage()
func (*ListPromotionsResponse) ProtoReflect
func (x *ListPromotionsResponse) ProtoReflect() protoreflect.Message
func (*ListPromotionsResponse) Reset
func (x *ListPromotionsResponse) Reset()
func (*ListPromotionsResponse) String
func (x *ListPromotionsResponse) String() string
OfferType
type OfferType int32
Offer type of a promotion.
OfferType_OFFER_TYPE_UNSPECIFIED, OfferType_NO_CODE, OfferType_GENERIC_CODE
const (
// Unknown offer type.
OfferType_OFFER_TYPE_UNSPECIFIED OfferType = 0
// Offer type without a code.
OfferType_NO_CODE OfferType = 1
// Offer type with a code. Generic redemption code for the promotion is
// required when `offerType` = `GENERIC_CODE`.
OfferType_GENERIC_CODE OfferType = 2
)
func (OfferType) Descriptor
func (OfferType) Descriptor() protoreflect.EnumDescriptor
func (OfferType) Enum
func (OfferType) EnumDescriptor
Deprecated: Use OfferType.Descriptor instead.
func (OfferType) Number
func (x OfferType) Number() protoreflect.EnumNumber
func (OfferType) String
func (OfferType) Type
func (OfferType) Type() protoreflect.EnumType
ProductApplicability
type ProductApplicability int32
Which product or list of products the promotion applies to.
ProductApplicability_PRODUCT_APPLICABILITY_UNSPECIFIED, ProductApplicability_ALL_PRODUCTS, ProductApplicability_SPECIFIC_PRODUCTS
const (
// Which products the promotion applies to is unknown.
ProductApplicability_PRODUCT_APPLICABILITY_UNSPECIFIED ProductApplicability = 0
// Applicable to all products.
ProductApplicability_ALL_PRODUCTS ProductApplicability = 1
// Applicable to only a single product or list of products.
ProductApplicability_SPECIFIC_PRODUCTS ProductApplicability = 2
)
func (ProductApplicability) Descriptor
func (ProductApplicability) Descriptor() protoreflect.EnumDescriptor
func (ProductApplicability) Enum
func (x ProductApplicability) Enum() *ProductApplicability
func (ProductApplicability) EnumDescriptor
func (ProductApplicability) EnumDescriptor() ([]byte, []int)
Deprecated: Use ProductApplicability.Descriptor instead.
func (ProductApplicability) Number
func (x ProductApplicability) Number() protoreflect.EnumNumber
func (ProductApplicability) String
func (x ProductApplicability) String() string
func (ProductApplicability) Type
func (ProductApplicability) Type() protoreflect.EnumType
Promotion
type Promotion struct {
// Identifier. The name of the promotion.
// Format: `accounts/{account}/promotions/{promotion}`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. The user provided promotion ID to uniquely identify the
// promotion. Follow [minimum
// requirements](https://support.google.com/merchants/answer/7050148?ref_topic=7322920&sjid=871860036916537104-NC#minimum_requirements)
// to prevent promotion disapprovals.
PromotionId string `protobuf:"bytes,2,opt,name=promotion_id,json=promotionId,proto3" json:"promotion_id,omitempty"`
// Required. The two-letter [ISO
// 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the
// promotion.
//
// Promotions is only for [selected
// languages](https://support.google.com/merchants/answer/4588281?ref_topic=6396150&sjid=18314938579342094533-NC#option3&zippy=).
ContentLanguage string `protobuf:"bytes,3,opt,name=content_language,json=contentLanguage,proto3" json:"content_language,omitempty"`
// Required. The target country used as part of the unique identifier.
// Represented as a [CLDR territory
// code](https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml).
//
// Promotions are only available in selected
// countries, [Free Listings and Shopping
// ads](https://support.google.com/merchants/answer/4588460) [Local Inventory
// ads](https://support.google.com/merchants/answer/10146326)
TargetCountry string `protobuf:"bytes,4,opt,name=target_country,json=targetCountry,proto3" json:"target_country,omitempty"`
// Required. [Redemption
// channel](https://support.google.com/merchants/answer/13837674?ref_topic=13773355&sjid=17642868584668136159-NC)
// for the promotion. At least one channel is required.
RedemptionChannel []RedemptionChannel `protobuf:"varint,5,rep,packed,name=redemption_channel,json=redemptionChannel,proto3,enum=google.shopping.merchant.promotions.v1.RedemptionChannel" json:"redemption_channel,omitempty"`
// Output only. The primary data source of the promotion.
DataSource string `protobuf:"bytes,6,opt,name=data_source,json=dataSource,proto3" json:"data_source,omitempty"`
// Optional. A list of promotion attributes.
Attributes *Attributes `protobuf:"bytes,7,opt,name=attributes,proto3" json:"attributes,omitempty"`
// 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.
CustomAttributes []*typepb.CustomAttribute `protobuf:"bytes,8,rep,name=custom_attributes,json=customAttributes,proto3" json:"custom_attributes,omitempty"`
// Output only. The [status of a
// promotion](https://support.google.com/merchants/answer/3398326?ref_topic=7322924&sjid=5155774230887277618-NC),
// data validation issues, that is, information about a promotion computed
// asynchronously.
PromotionStatus *PromotionStatus `protobuf:"bytes,9,opt,name=promotion_status,json=promotionStatus,proto3" json:"promotion_status,omitempty"`
// 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.
VersionNumber *int64 `protobuf:"varint,10,opt,name=version_number,json=versionNumber,proto3,oneof" json:"version_number,omitempty"`
// contains filtered or unexported fields
}
Represents a promotion. See the following articles for more details.
Required promotion input attributes to pass data validation checks are primarily defined below:
After inserting, updating a promotion input, it may take several minutes before the final promotion can be retrieved.
func (*Promotion) Descriptor
Deprecated: Use Promotion.ProtoReflect.Descriptor instead.
func (*Promotion) GetAttributes
func (x *Promotion) GetAttributes() *Attributes
func (*Promotion) GetContentLanguage
func (*Promotion) GetCustomAttributes
func (x *Promotion) GetCustomAttributes() []*typepb.CustomAttribute
func (*Promotion) GetDataSource
func (*Promotion) GetName
func (*Promotion) GetPromotionId
func (*Promotion) GetPromotionStatus
func (x *Promotion) GetPromotionStatus() *PromotionStatus
func (*Promotion) GetRedemptionChannel
func (x *Promotion) GetRedemptionChannel() []RedemptionChannel
func (*Promotion) GetTargetCountry
func (*Promotion) GetVersionNumber
func (*Promotion) ProtoMessage
func (*Promotion) ProtoMessage()
func (*Promotion) ProtoReflect
func (x *Promotion) ProtoReflect() protoreflect.Message
func (*Promotion) Reset
func (x *Promotion) Reset()
func (*Promotion) String
PromotionStatus
type PromotionStatus struct {
// Output only. The intended destinations for the promotion.
DestinationStatuses []*PromotionStatus_DestinationStatus `protobuf:"bytes,1,rep,name=destination_statuses,json=destinationStatuses,proto3" json:"destination_statuses,omitempty"`
// Output only. A list of issues associated with the promotion.
ItemLevelIssues []*PromotionStatus_ItemLevelIssue `protobuf:"bytes,2,rep,name=item_level_issues,json=itemLevelIssues,proto3" json:"item_level_issues,omitempty"`
// Output only. Date on which the promotion has been created
// in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time,
// and offset, for example `2020-01-02T09:00:00+01:00` or
// `2020-01-02T09:00:00Z`
CreationDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=creation_date,json=creationDate,proto3" json:"creation_date,omitempty"`
// Output only. Date on which the promotion status has been last updated
// in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format: Date, time,
// and offset, for example `2020-01-02T09:00:00+01:00` or
// `2020-01-02T09:00:00Z`
LastUpdateDate *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_update_date,json=lastUpdateDate,proto3" json:"last_update_date,omitempty"`
// contains filtered or unexported fields
}
The status of the promotion.
func (*PromotionStatus) Descriptor
func (*PromotionStatus) Descriptor() ([]byte, []int)
Deprecated: Use PromotionStatus.ProtoReflect.Descriptor instead.
func (*PromotionStatus) GetCreationDate
func (x *PromotionStatus) GetCreationDate() *timestamppb.Timestamp
func (*PromotionStatus) GetDestinationStatuses
func (x *PromotionStatus) GetDestinationStatuses() []*PromotionStatus_DestinationStatus
func (*PromotionStatus) GetItemLevelIssues
func (x *PromotionStatus) GetItemLevelIssues() []*PromotionStatus_ItemLevelIssue
func (*PromotionStatus) GetLastUpdateDate
func (x *PromotionStatus) GetLastUpdateDate() *timestamppb.Timestamp
func (*PromotionStatus) ProtoMessage
func (*PromotionStatus) ProtoMessage()
func (*PromotionStatus) ProtoReflect
func (x *PromotionStatus) ProtoReflect() protoreflect.Message
func (*PromotionStatus) Reset
func (x *PromotionStatus) Reset()
func (*PromotionStatus) String
func (x *PromotionStatus) String() string
PromotionStatus_DestinationStatus
type PromotionStatus_DestinationStatus struct {
// Output only. The name of the promotion destination.
ReportingContext typepb.ReportingContext_ReportingContextEnum `protobuf:"varint,1,opt,name=reporting_context,json=reportingContext,proto3,enum=google.shopping.type.ReportingContext_ReportingContextEnum" json:"reporting_context,omitempty"`
// Output only. The status for the specified destination.
Status PromotionStatus_DestinationStatus_State `protobuf:"varint,2,opt,name=status,proto3,enum=google.shopping.merchant.promotions.v1.PromotionStatus_DestinationStatus_State" json:"status,omitempty"`
// contains filtered or unexported fields
}
The status for the specified destination.
func (*PromotionStatus_DestinationStatus) Descriptor
func (*PromotionStatus_DestinationStatus) Descriptor() ([]byte, []int)
Deprecated: Use PromotionStatus_DestinationStatus.ProtoReflect.Descriptor instead.
func (*PromotionStatus_DestinationStatus) GetReportingContext
func (x *PromotionStatus_DestinationStatus) GetReportingContext() typepb.ReportingContext_ReportingContextEnum
func (*PromotionStatus_DestinationStatus) GetStatus
func (x *PromotionStatus_DestinationStatus) GetStatus() PromotionStatus_DestinationStatus_State
func (*PromotionStatus_DestinationStatus) ProtoMessage
func (*PromotionStatus_DestinationStatus) ProtoMessage()
func (*PromotionStatus_DestinationStatus) ProtoReflect
func (x *PromotionStatus_DestinationStatus) ProtoReflect() protoreflect.Message
func (*PromotionStatus_DestinationStatus) Reset
func (x *PromotionStatus_DestinationStatus) Reset()
func (*PromotionStatus_DestinationStatus) String
func (x *PromotionStatus_DestinationStatus) String() string
PromotionStatus_DestinationStatus_State
type PromotionStatus_DestinationStatus_State int32
The current state of the promotion.
PromotionStatus_DestinationStatus_STATE_UNSPECIFIED, PromotionStatus_DestinationStatus_IN_REVIEW, PromotionStatus_DestinationStatus_REJECTED, PromotionStatus_DestinationStatus_LIVE, PromotionStatus_DestinationStatus_STOPPED, PromotionStatus_DestinationStatus_EXPIRED, PromotionStatus_DestinationStatus_PENDING
const (
// Unknown promotion state.
PromotionStatus_DestinationStatus_STATE_UNSPECIFIED PromotionStatus_DestinationStatus_State = 0
// The promotion is under review.
PromotionStatus_DestinationStatus_IN_REVIEW PromotionStatus_DestinationStatus_State = 1
// The promotion is disapproved.
PromotionStatus_DestinationStatus_REJECTED PromotionStatus_DestinationStatus_State = 2
// The promotion is approved and active.
PromotionStatus_DestinationStatus_LIVE PromotionStatus_DestinationStatus_State = 3
// The promotion is stopped by merchant.
PromotionStatus_DestinationStatus_STOPPED PromotionStatus_DestinationStatus_State = 4
// The promotion is no longer active.
PromotionStatus_DestinationStatus_EXPIRED PromotionStatus_DestinationStatus_State = 5
// The promotion is not stopped, and all reviews are approved, but the
// active date is in the future.
PromotionStatus_DestinationStatus_PENDING PromotionStatus_DestinationStatus_State = 6
)
func (PromotionStatus_DestinationStatus_State) Descriptor
func (PromotionStatus_DestinationStatus_State) Descriptor() protoreflect.EnumDescriptor
func (PromotionStatus_DestinationStatus_State) Enum
func (PromotionStatus_DestinationStatus_State) EnumDescriptor
func (PromotionStatus_DestinationStatus_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use PromotionStatus_DestinationStatus_State.Descriptor instead.
func (PromotionStatus_DestinationStatus_State) Number
func (x PromotionStatus_DestinationStatus_State) Number() protoreflect.EnumNumber
func (PromotionStatus_DestinationStatus_State) String
func (x PromotionStatus_DestinationStatus_State) String() string
func (PromotionStatus_DestinationStatus_State) Type
func (PromotionStatus_DestinationStatus_State) Type() protoreflect.EnumType
PromotionStatus_ItemLevelIssue
type PromotionStatus_ItemLevelIssue struct {
// Output only. The error code of the issue.
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
// Output only. How this issue affects serving of the promotion.
Severity PromotionStatus_ItemLevelIssue_Severity `protobuf:"varint,2,opt,name=severity,proto3,enum=google.shopping.merchant.promotions.v1.PromotionStatus_ItemLevelIssue_Severity" json:"severity,omitempty"`
// Output only. Whether the issue can be resolved by the merchant.
Resolution string `protobuf:"bytes,3,opt,name=resolution,proto3" json:"resolution,omitempty"`
// Output only. The attribute's name, if the issue is caused by a single
// attribute.
Attribute string `protobuf:"bytes,4,opt,name=attribute,proto3" json:"attribute,omitempty"`
// Output only. The destination the issue applies to.
ReportingContext typepb.ReportingContext_ReportingContextEnum `protobuf:"varint,5,opt,name=reporting_context,json=reportingContext,proto3,enum=google.shopping.type.ReportingContext_ReportingContextEnum" json:"reporting_context,omitempty"`
// Output only. A short issue description in English.
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
// Output only. A detailed issue description in English.
Detail string `protobuf:"bytes,7,opt,name=detail,proto3" json:"detail,omitempty"`
// Output only. The URL of a web page to help with resolving this issue.
Documentation string `protobuf:"bytes,8,opt,name=documentation,proto3" json:"documentation,omitempty"`
// Output only. List of country codes (ISO 3166-1 alpha-2) where issue
// applies to the offer.
ApplicableCountries []string `protobuf:"bytes,9,rep,name=applicable_countries,json=applicableCountries,proto3" json:"applicable_countries,omitempty"`
// contains filtered or unexported fields
}
The issue associated with the promotion.
func (*PromotionStatus_ItemLevelIssue) Descriptor
func (*PromotionStatus_ItemLevelIssue) Descriptor() ([]byte, []int)
Deprecated: Use PromotionStatus_ItemLevelIssue.ProtoReflect.Descriptor instead.
func (*PromotionStatus_ItemLevelIssue) GetApplicableCountries
func (x *PromotionStatus_ItemLevelIssue) GetApplicableCountries() []string
func (*PromotionStatus_ItemLevelIssue) GetAttribute
func (x *PromotionStatus_ItemLevelIssue) GetAttribute() string
func (*PromotionStatus_ItemLevelIssue) GetCode
func (x *PromotionStatus_ItemLevelIssue) GetCode() string
func (*PromotionStatus_ItemLevelIssue) GetDescription
func (x *PromotionStatus_ItemLevelIssue) GetDescription() string
func (*PromotionStatus_ItemLevelIssue) GetDetail
func (x *PromotionStatus_ItemLevelIssue) GetDetail() string
func (*PromotionStatus_ItemLevelIssue) GetDocumentation
func (x *PromotionStatus_ItemLevelIssue) GetDocumentation() string
func (*PromotionStatus_ItemLevelIssue) GetReportingContext
func (x *PromotionStatus_ItemLevelIssue) GetReportingContext() typepb.ReportingContext_ReportingContextEnum
func (*PromotionStatus_ItemLevelIssue) GetResolution
func (x *PromotionStatus_ItemLevelIssue) GetResolution() string
func (*PromotionStatus_ItemLevelIssue) GetSeverity
func (x *PromotionStatus_ItemLevelIssue) GetSeverity() PromotionStatus_ItemLevelIssue_Severity
func (*PromotionStatus_ItemLevelIssue) ProtoMessage
func (*PromotionStatus_ItemLevelIssue) ProtoMessage()
func (*PromotionStatus_ItemLevelIssue) ProtoReflect
func (x *PromotionStatus_ItemLevelIssue) ProtoReflect() protoreflect.Message
func (*PromotionStatus_ItemLevelIssue) Reset
func (x *PromotionStatus_ItemLevelIssue) Reset()
func (*PromotionStatus_ItemLevelIssue) String
func (x *PromotionStatus_ItemLevelIssue) String() string
PromotionStatus_ItemLevelIssue_Severity
type PromotionStatus_ItemLevelIssue_Severity int32
The severity of the issue.
PromotionStatus_ItemLevelIssue_SEVERITY_UNSPECIFIED, PromotionStatus_ItemLevelIssue_NOT_IMPACTED, PromotionStatus_ItemLevelIssue_DEMOTED, PromotionStatus_ItemLevelIssue_DISAPPROVED
const (
// Not specified.
PromotionStatus_ItemLevelIssue_SEVERITY_UNSPECIFIED PromotionStatus_ItemLevelIssue_Severity = 0
// This issue represents a warning and does not have a direct affect
// on the promotion.
PromotionStatus_ItemLevelIssue_NOT_IMPACTED PromotionStatus_ItemLevelIssue_Severity = 1
// The promotion is demoted and most likely have limited performance
// in search results
PromotionStatus_ItemLevelIssue_DEMOTED PromotionStatus_ItemLevelIssue_Severity = 2
// Issue disapproves the promotion.
PromotionStatus_ItemLevelIssue_DISAPPROVED PromotionStatus_ItemLevelIssue_Severity = 3
)
func (PromotionStatus_ItemLevelIssue_Severity) Descriptor
func (PromotionStatus_ItemLevelIssue_Severity) Descriptor() protoreflect.EnumDescriptor
func (PromotionStatus_ItemLevelIssue_Severity) Enum
func (PromotionStatus_ItemLevelIssue_Severity) EnumDescriptor
func (PromotionStatus_ItemLevelIssue_Severity) EnumDescriptor() ([]byte, []int)
Deprecated: Use PromotionStatus_ItemLevelIssue_Severity.Descriptor instead.
func (PromotionStatus_ItemLevelIssue_Severity) Number
func (x PromotionStatus_ItemLevelIssue_Severity) Number() protoreflect.EnumNumber
func (PromotionStatus_ItemLevelIssue_Severity) String
func (x PromotionStatus_ItemLevelIssue_Severity) String() string
func (PromotionStatus_ItemLevelIssue_Severity) Type
func (PromotionStatus_ItemLevelIssue_Severity) Type() protoreflect.EnumType
PromotionsServiceClient
type PromotionsServiceClient interface {
// Inserts a promotion for your Merchant Center account. If the promotion
// already exists, then it updates the promotion instead.
InsertPromotion(ctx context.Context, in *InsertPromotionRequest, opts ...grpc.CallOption) (*Promotion, error)
// Retrieves the promotion from your Merchant Center account.
//
// After inserting or updating a promotion input, it may take several
// minutes before the updated promotion can be retrieved.
GetPromotion(ctx context.Context, in *GetPromotionRequest, opts ...grpc.CallOption) (*Promotion, error)
// Lists the promotions in your Merchant Center account. The
// response might contain fewer items than specified by `pageSize`. Rely on
// `pageToken` to determine if there are more items to be requested.
//
// After inserting or updating a promotion, it may take several minutes before
// the updated processed promotion can be retrieved.
ListPromotions(ctx context.Context, in *ListPromotionsRequest, opts ...grpc.CallOption) (*ListPromotionsResponse, error)
}
PromotionsServiceClient is the client API for PromotionsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPromotionsServiceClient
func NewPromotionsServiceClient(cc grpc.ClientConnInterface) PromotionsServiceClient
PromotionsServiceServer
type PromotionsServiceServer interface {
// Inserts a promotion for your Merchant Center account. If the promotion
// already exists, then it updates the promotion instead.
InsertPromotion(context.Context, *InsertPromotionRequest) (*Promotion, error)
// Retrieves the promotion from your Merchant Center account.
//
// After inserting or updating a promotion input, it may take several
// minutes before the updated promotion can be retrieved.
GetPromotion(context.Context, *GetPromotionRequest) (*Promotion, error)
// Lists the promotions in your Merchant Center account. The
// response might contain fewer items than specified by `pageSize`. Rely on
// `pageToken` to determine if there are more items to be requested.
//
// After inserting or updating a promotion, it may take several minutes before
// the updated processed promotion can be retrieved.
ListPromotions(context.Context, *ListPromotionsRequest) (*ListPromotionsResponse, error)
}
PromotionsServiceServer is the server API for PromotionsService service.
RedemptionChannel
type RedemptionChannel int32
Channel of a promotion.
RedemptionChannel_REDEMPTION_CHANNEL_UNSPECIFIED, RedemptionChannel_IN_STORE, RedemptionChannel_ONLINE
const (
// Indicates that the channel is unspecified.
RedemptionChannel_REDEMPTION_CHANNEL_UNSPECIFIED RedemptionChannel = 0
// Indicates that the channel is in store.
// This is same as `local` channel used for `products`.
RedemptionChannel_IN_STORE RedemptionChannel = 1
// Indicates that the channel is online.
RedemptionChannel_ONLINE RedemptionChannel = 2
)
func (RedemptionChannel) Descriptor
func (RedemptionChannel) Descriptor() protoreflect.EnumDescriptor
func (RedemptionChannel) Enum
func (x RedemptionChannel) Enum() *RedemptionChannel
func (RedemptionChannel) EnumDescriptor
func (RedemptionChannel) EnumDescriptor() ([]byte, []int)
Deprecated: Use RedemptionChannel.Descriptor instead.
func (RedemptionChannel) Number
func (x RedemptionChannel) Number() protoreflect.EnumNumber
func (RedemptionChannel) String
func (x RedemptionChannel) String() string
func (RedemptionChannel) Type
func (RedemptionChannel) Type() protoreflect.EnumType
StoreApplicability
type StoreApplicability int32
Store codes or list of store codes the promotion applies to. Only for Local inventory ads promotions.
StoreApplicability_STORE_APPLICABILITY_UNSPECIFIED, StoreApplicability_ALL_STORES, StoreApplicability_SPECIFIC_STORES
const (
// Which store codes the promotion applies to is unknown.
StoreApplicability_STORE_APPLICABILITY_UNSPECIFIED StoreApplicability = 0
// Promotion applies to all stores.
StoreApplicability_ALL_STORES StoreApplicability = 1
// Promotion applies to only the specified stores.
StoreApplicability_SPECIFIC_STORES StoreApplicability = 2
)
func (StoreApplicability) Descriptor
func (StoreApplicability) Descriptor() protoreflect.EnumDescriptor
func (StoreApplicability) Enum
func (x StoreApplicability) Enum() *StoreApplicability
func (StoreApplicability) EnumDescriptor
func (StoreApplicability) EnumDescriptor() ([]byte, []int)
Deprecated: Use StoreApplicability.Descriptor instead.
func (StoreApplicability) Number
func (x StoreApplicability) Number() protoreflect.EnumNumber
func (StoreApplicability) String
func (x StoreApplicability) String() string
func (StoreApplicability) Type
func (StoreApplicability) Type() protoreflect.EnumType
UnimplementedPromotionsServiceServer
type UnimplementedPromotionsServiceServer struct {
}
UnimplementedPromotionsServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedPromotionsServiceServer) GetPromotion
func (*UnimplementedPromotionsServiceServer) GetPromotion(context.Context, *GetPromotionRequest) (*Promotion, error)
func (*UnimplementedPromotionsServiceServer) InsertPromotion
func (*UnimplementedPromotionsServiceServer) InsertPromotion(context.Context, *InsertPromotionRequest) (*Promotion, error)
func (*UnimplementedPromotionsServiceServer) ListPromotions
func (*UnimplementedPromotionsServiceServer) ListPromotions(context.Context, *ListPromotionsRequest) (*ListPromotionsResponse, error)