-
Notifications
You must be signed in to change notification settings - Fork 6
/
in_game_item_sync.go
98 lines (75 loc) · 2.21 KB
/
in_game_item_sync.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
// Code generated by go-swagger; DO NOT EDIT.
package platformclientmodels
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// InGameItemSync in game item sync
//
// swagger:model InGameItemSync
type InGameItemSync struct {
// the new category path for the synced item, A path separated by "/", will not show in store if it set to blank
// Required: true
CategoryPath *string `json:"categoryPath"`
// item id in game namespace
// Required: true
TargetItemID *string `json:"targetItemId"`
// game namespace
// Required: true
TargetNamespace *string `json:"targetNamespace"`
}
// Validate validates this in game item sync
func (m *InGameItemSync) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCategoryPath(formats); err != nil {
res = append(res, err)
}
if err := m.validateTargetItemID(formats); err != nil {
res = append(res, err)
}
if err := m.validateTargetNamespace(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *InGameItemSync) validateCategoryPath(formats strfmt.Registry) error {
if err := validate.Required("categoryPath", "body", m.CategoryPath); err != nil {
return err
}
return nil
}
func (m *InGameItemSync) validateTargetItemID(formats strfmt.Registry) error {
if err := validate.Required("targetItemId", "body", m.TargetItemID); err != nil {
return err
}
return nil
}
func (m *InGameItemSync) validateTargetNamespace(formats strfmt.Registry) error {
if err := validate.Required("targetNamespace", "body", m.TargetNamespace); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (m *InGameItemSync) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *InGameItemSync) UnmarshalBinary(b []byte) error {
var res InGameItemSync
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}