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_v1beta_promotions_common_proto
var File_google_shopping_merchant_promotions_v1beta_promotions_common_proto protoreflect.FileDescriptor
File_google_shopping_merchant_promotions_v1beta_promotions_proto
var File_google_shopping_merchant_promotions_v1beta_promotions_proto protoreflect.FileDescriptor
Functions
func RegisterPromotionsServiceServer
func RegisterPromotionsServiceServer(s *grpc.Server, srv PromotionsServiceServer)
Attributes
type Attributes struct {
ProductApplicability ProductApplicability "" /* 191 byte string literal not displayed */
OfferType OfferType "" /* 147 byte string literal not displayed */
GenericRedemptionCode string `protobuf:"bytes,3,opt,name=generic_redemption_code,json=genericRedemptionCode,proto3" json:"generic_redemption_code,omitempty"`
LongTitle string `protobuf:"bytes,4,opt,name=long_title,json=longTitle,proto3" json:"long_title,omitempty"`
CouponValueType CouponValueType "" /* 173 byte string literal not displayed */
PromotionDestinations []typepb.Destination_DestinationEnum "" /* 186 byte string literal not displayed */
ItemIdInclusion []string `protobuf:"bytes,7,rep,name=item_id_inclusion,json=itemIdInclusion,proto3" json:"item_id_inclusion,omitempty"`
BrandInclusion []string `protobuf:"bytes,8,rep,name=brand_inclusion,json=brandInclusion,proto3" json:"brand_inclusion,omitempty"`
ItemGroupIdInclusion []string `protobuf:"bytes,9,rep,name=item_group_id_inclusion,json=itemGroupIdInclusion,proto3" json:"item_group_id_inclusion,omitempty"`
ProductTypeInclusion []string `protobuf:"bytes,10,rep,name=product_type_inclusion,json=productTypeInclusion,proto3" json:"product_type_inclusion,omitempty"`
ItemIdExclusion []string `protobuf:"bytes,11,rep,name=item_id_exclusion,json=itemIdExclusion,proto3" json:"item_id_exclusion,omitempty"`
BrandExclusion []string `protobuf:"bytes,12,rep,name=brand_exclusion,json=brandExclusion,proto3" json:"brand_exclusion,omitempty"`
ItemGroupIdExclusion []string `protobuf:"bytes,13,rep,name=item_group_id_exclusion,json=itemGroupIdExclusion,proto3" json:"item_group_id_exclusion,omitempty"`
ProductTypeExclusion []string `protobuf:"bytes,14,rep,name=product_type_exclusion,json=productTypeExclusion,proto3" json:"product_type_exclusion,omitempty"`
MinimumPurchaseAmount *typepb.Price "" /* 127 byte string literal not displayed */
MinimumPurchaseQuantity int64 "" /* 134 byte string literal not displayed */
LimitQuantity int64 `protobuf:"varint,17,opt,name=limit_quantity,json=limitQuantity,proto3" json:"limit_quantity,omitempty"`
LimitValue *typepb.Price `protobuf:"bytes,18,opt,name=limit_value,json=limitValue,proto3" json:"limit_value,omitempty"`
PercentOff int64 `protobuf:"varint,19,opt,name=percent_off,json=percentOff,proto3" json:"percent_off,omitempty"`
MoneyOffAmount *typepb.Price `protobuf:"bytes,20,opt,name=money_off_amount,json=moneyOffAmount,proto3" json:"money_off_amount,omitempty"`
GetThisQuantityDiscounted int64 "" /* 142 byte string literal not displayed */
FreeGiftValue *typepb.Price `protobuf:"bytes,22,opt,name=free_gift_value,json=freeGiftValue,proto3" json:"free_gift_value,omitempty"`
FreeGiftDescription string `protobuf:"bytes,23,opt,name=free_gift_description,json=freeGiftDescription,proto3" json:"free_gift_description,omitempty"`
FreeGiftItemId string `protobuf:"bytes,24,opt,name=free_gift_item_id,json=freeGiftItemId,proto3" json:"free_gift_item_id,omitempty"`
PromotionEffectiveTimePeriod *interval.Interval "" /* 150 byte string literal not displayed */
PromotionDisplayTimePeriod *interval.Interval "" /* 144 byte string literal not displayed */
StoreApplicability StoreApplicability "" /* 184 byte string literal not displayed */
StoreCodesInclusion []string `protobuf:"bytes,29,rep,name=store_codes_inclusion,json=storeCodesInclusion,proto3" json:"store_codes_inclusion,omitempty"`
StoreCodesExclusion []string `protobuf:"bytes,30,rep,name=store_codes_exclusion,json=storeCodesExclusion,proto3" json:"store_codes_exclusion,omitempty"`
PromotionUrl string `protobuf:"bytes,31,opt,name=promotion_url,json=promotionUrl,proto3" json:"promotion_url,omitempty"`
}
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.
CouponValueType_FREE_SHIPPING_STANDARD CouponValueType = 10
// Overnight free shipping coupon value type.
CouponValueType_FREE_SHIPPING_OVERNIGHT CouponValueType = 11
// Two day free shipping coupon value type.
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"`
// Output only. The maximum number of promotions to return. The service may
// return fewer than this value. The maximum value is 1000; values above 1000
// will be coerced to 1000. 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"`
// Output only. 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 {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
PromotionId string `protobuf:"bytes,2,opt,name=promotion_id,json=promotionId,proto3" json:"promotion_id,omitempty"`
ContentLanguage string `protobuf:"bytes,3,opt,name=content_language,json=contentLanguage,proto3" json:"content_language,omitempty"`
TargetCountry string `protobuf:"bytes,4,opt,name=target_country,json=targetCountry,proto3" json:"target_country,omitempty"`
RedemptionChannel []RedemptionChannel "" /* 186 byte string literal not displayed */
DataSource string `protobuf:"bytes,6,opt,name=data_source,json=dataSource,proto3" json:"data_source,omitempty"`
Attributes *Attributes `protobuf:"bytes,7,opt,name=attributes,proto3" json:"attributes,omitempty"`
CustomAttributes []*typepb.CustomAttribute `protobuf:"bytes,8,rep,name=custom_attributes,json=customAttributes,proto3" json:"custom_attributes,omitempty"`
PromotionStatus *PromotionStatus `protobuf:"bytes,9,opt,name=promotion_status,json=promotionStatus,proto3" json:"promotion_status,omitempty"`
VersionNumber *int64 `protobuf:"varint,10,opt,name=version_number,json=versionNumber,proto3,oneof" json:"version_number,omitempty"`
}
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 {
ReportingContext typepb.ReportingContext_ReportingContextEnum "" /* 174 byte string literal not displayed */
Status PromotionStatus_DestinationStatus_State "" /* 154 byte string literal not displayed */
}
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 {
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`
Severity PromotionStatus_ItemLevelIssue_Severity "" /* 158 byte string literal not displayed */
Resolution string `protobuf:"bytes,3,opt,name=resolution,proto3" json:"resolution,omitempty"`
Attribute string `protobuf:"bytes,4,opt,name=attribute,proto3" json:"attribute,omitempty"`
ReportingContext typepb.ReportingContext_ReportingContextEnum "" /* 174 byte string literal not displayed */
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
Detail string `protobuf:"bytes,7,opt,name=detail,proto3" json:"detail,omitempty"`
Documentation string `protobuf:"bytes,8,opt,name=documentation,proto3" json:"documentation,omitempty"`
ApplicableCountries []string `protobuf:"bytes,9,rep,name=applicable_countries,json=applicableCountries,proto3" json:"applicable_countries,omitempty"`
}
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)