-
Notifications
You must be signed in to change notification settings - Fork 6
/
models_config.go
121 lines (89 loc) · 3.09 KB
/
models_config.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
// Code generated by go-swagger; DO NOT EDIT.
package lobbyclientmodels
// 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"
)
// ModelsConfig models config
//
// swagger:model models.Config
type ModelsConfig struct {
// allow invite non connected user
AllowInviteNonConnectedUser bool `json:"allowInviteNonConnectedUser"`
// allow join party during matchmaking
AllowJoinPartyDuringMatchmaking bool `json:"allowJoinPartyDuringMatchmaking"`
// auto kick on disconnect
AutoKickOnDisconnect bool `json:"autoKickOnDisconnect"`
// auto kick on disconnect delay
AutoKickOnDisconnectDelay int64 `json:"autoKickOnDisconnectDelay,omitempty"`
// cancel ticket on disconnect
CancelTicketOnDisconnect bool `json:"cancelTicketOnDisconnect"`
// chat rate limit burst
ChatRateLimitBurst int32 `json:"chatRateLimitBurst,omitempty"`
// chat rate limit duration
ChatRateLimitDuration int64 `json:"chatRateLimitDuration,omitempty"`
// concurrent users limit
ConcurrentUsersLimit int32 `json:"concurrentUsersLimit,omitempty"`
// disable invitation on join party
DisableInvitationOnJoinParty bool `json:"disableInvitationOnJoinParty"`
// enable chat
EnableChat bool `json:"enableChat"`
// entitlement check
EntitlementCheck bool `json:"entitlementCheck"`
// entitlement item ID
EntitlementItemID string `json:"entitlementItemID,omitempty"`
// general rate limit burst
GeneralRateLimitBurst int32 `json:"generalRateLimitBurst,omitempty"`
// general rate limit duration
GeneralRateLimitDuration int64 `json:"generalRateLimitDuration,omitempty"`
// keep presence activity on disconnect
KeepPresenceActivityOnDisconnect bool `json:"keepPresenceActivityOnDisconnect"`
// max d s wait time
// Required: true
MaxDSWaitTime *int64 `json:"maxDSWaitTime"`
// max party member
MaxPartyMember int32 `json:"maxPartyMember,omitempty"`
// namespace
Namespace string `json:"namespace,omitempty"`
// profanity filter
ProfanityFilter bool `json:"profanityFilter"`
// ready consent timeout
ReadyConsentTimeout int64 `json:"readyConsentTimeout,omitempty"`
}
// Validate validates this models config
func (m *ModelsConfig) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateMaxDSWaitTime(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ModelsConfig) validateMaxDSWaitTime(formats strfmt.Registry) error {
if err := validate.Required("maxDSWaitTime", "body", m.MaxDSWaitTime); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (m *ModelsConfig) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ModelsConfig) UnmarshalBinary(b []byte) error {
var res ModelsConfig
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}