-
Notifications
You must be signed in to change notification settings - Fork 6
/
item_revocation.go
234 lines (176 loc) · 6.95 KB
/
item_revocation.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
// Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
// This is licensed software from AccelByte Inc, for limitations
// and restrictions contact your company contract manager.
// Code generated; DO NOT EDIT.
package platformclientmodels
import (
"encoding/json"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// ItemRevocation Item revocation
//
// swagger:model Item revocation.
type ItemRevocation struct {
// creditrevocations
CreditRevocations []*CreditRevocation `json:"creditRevocations,omitempty"`
// customrevocation
CustomRevocation interface{} `json:"customRevocation,omitempty"`
// entitlementorigin
// Enum: ['Epic', 'GooglePlay', 'IOS', 'Nintendo', 'Oculus', 'Other', 'Playstation', 'Steam', 'System', 'Twitch', 'Xbox']
EntitlementOrigin string `json:"entitlementOrigin,omitempty"`
// entitlementrevocations
EntitlementRevocations []*EntitlementRevocation `json:"entitlementRevocations,omitempty"`
// itemid
ItemID string `json:"itemId,omitempty"`
// itemrevocations
ItemRevocations []*ItemRevocation `json:"itemRevocations,omitempty"`
// itemsku
ItemSku string `json:"itemSku,omitempty"`
// itemtype
// Enum: ['APP', 'BUNDLE', 'CODE', 'COINS', 'EXTENSION', 'INGAMEITEM', 'LOOTBOX', 'MEDIA', 'OPTIONBOX', 'SEASON', 'SUBSCRIPTION']
ItemType string `json:"itemType,omitempty"`
// quantity
// Format: int64
Quantity int64 `json:"quantity,omitempty"`
// reason
Reason string `json:"reason,omitempty"`
// skipped
Skipped bool `json:"skipped"`
// status
// Enum: ['FAIL', 'SUCCESS']
Status string `json:"status,omitempty"`
// strategy
Strategy string `json:"strategy,omitempty"`
}
// Validate validates this Item revocation
func (m *ItemRevocation) Validate(formats strfmt.Registry) error {
var res []error
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
var itemRevocationTypeEntitlementOriginPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["EPIC", "GOOGLEPLAY", "IOS", "NINTENDO", "OCULUS", "OTHER", "PLAYSTATION", "STEAM", "SYSTEM", "TWITCH", "XBOX"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
itemRevocationTypeEntitlementOriginPropEnum = append(itemRevocationTypeEntitlementOriginPropEnum, v)
}
}
const (
// ItemRevocationEntitlementOriginEPIC captures enum value "EPIC"
ItemRevocationEntitlementOriginEPIC string = "EPIC"
// ItemRevocationEntitlementOriginGOOGLEPLAY captures enum value "GOOGLEPLAY"
ItemRevocationEntitlementOriginGOOGLEPLAY string = "GOOGLEPLAY"
// ItemRevocationEntitlementOriginIOS captures enum value "IOS"
ItemRevocationEntitlementOriginIOS string = "IOS"
// ItemRevocationEntitlementOriginNINTENDO captures enum value "NINTENDO"
ItemRevocationEntitlementOriginNINTENDO string = "NINTENDO"
// ItemRevocationEntitlementOriginOCULUS captures enum value "OCULUS"
ItemRevocationEntitlementOriginOCULUS string = "OCULUS"
// ItemRevocationEntitlementOriginOTHER captures enum value "OTHER"
ItemRevocationEntitlementOriginOTHER string = "OTHER"
// ItemRevocationEntitlementOriginPLAYSTATION captures enum value "PLAYSTATION"
ItemRevocationEntitlementOriginPLAYSTATION string = "PLAYSTATION"
// ItemRevocationEntitlementOriginSTEAM captures enum value "STEAM"
ItemRevocationEntitlementOriginSTEAM string = "STEAM"
// ItemRevocationEntitlementOriginSYSTEM captures enum value "SYSTEM"
ItemRevocationEntitlementOriginSYSTEM string = "SYSTEM"
// ItemRevocationEntitlementOriginTWITCH captures enum value "TWITCH"
ItemRevocationEntitlementOriginTWITCH string = "TWITCH"
// ItemRevocationEntitlementOriginXBOX captures enum value "XBOX"
ItemRevocationEntitlementOriginXBOX string = "XBOX"
)
// prop value enum
func (m *ItemRevocation) validateEntitlementOriginEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, itemRevocationTypeEntitlementOriginPropEnum, true); err != nil {
return err
}
return nil
}
var itemRevocationTypeItemTypePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["APP", "BUNDLE", "CODE", "COINS", "EXTENSION", "INGAMEITEM", "LOOTBOX", "MEDIA", "OPTIONBOX", "SEASON", "SUBSCRIPTION"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
itemRevocationTypeItemTypePropEnum = append(itemRevocationTypeItemTypePropEnum, v)
}
}
const (
// ItemRevocationItemTypeAPP captures enum value "APP"
ItemRevocationItemTypeAPP string = "APP"
// ItemRevocationItemTypeBUNDLE captures enum value "BUNDLE"
ItemRevocationItemTypeBUNDLE string = "BUNDLE"
// ItemRevocationItemTypeCODE captures enum value "CODE"
ItemRevocationItemTypeCODE string = "CODE"
// ItemRevocationItemTypeCOINS captures enum value "COINS"
ItemRevocationItemTypeCOINS string = "COINS"
// ItemRevocationItemTypeEXTENSION captures enum value "EXTENSION"
ItemRevocationItemTypeEXTENSION string = "EXTENSION"
// ItemRevocationItemTypeINGAMEITEM captures enum value "INGAMEITEM"
ItemRevocationItemTypeINGAMEITEM string = "INGAMEITEM"
// ItemRevocationItemTypeLOOTBOX captures enum value "LOOTBOX"
ItemRevocationItemTypeLOOTBOX string = "LOOTBOX"
// ItemRevocationItemTypeMEDIA captures enum value "MEDIA"
ItemRevocationItemTypeMEDIA string = "MEDIA"
// ItemRevocationItemTypeOPTIONBOX captures enum value "OPTIONBOX"
ItemRevocationItemTypeOPTIONBOX string = "OPTIONBOX"
// ItemRevocationItemTypeSEASON captures enum value "SEASON"
ItemRevocationItemTypeSEASON string = "SEASON"
// ItemRevocationItemTypeSUBSCRIPTION captures enum value "SUBSCRIPTION"
ItemRevocationItemTypeSUBSCRIPTION string = "SUBSCRIPTION"
)
// prop value enum
func (m *ItemRevocation) validateItemTypeEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, itemRevocationTypeItemTypePropEnum, true); err != nil {
return err
}
return nil
}
var itemRevocationTypeStatusPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["FAIL", "SUCCESS"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
itemRevocationTypeStatusPropEnum = append(itemRevocationTypeStatusPropEnum, v)
}
}
const (
// ItemRevocationStatusFAIL captures enum value "FAIL"
ItemRevocationStatusFAIL string = "FAIL"
// ItemRevocationStatusSUCCESS captures enum value "SUCCESS"
ItemRevocationStatusSUCCESS string = "SUCCESS"
)
// prop value enum
func (m *ItemRevocation) validateStatusEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, itemRevocationTypeStatusPropEnum, true); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (m *ItemRevocation) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ItemRevocation) UnmarshalBinary(b []byte) error {
var res ItemRevocation
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}