...
1
8
9
10
11 package openapi
12
13 import (
14 "encoding/json"
15 )
16
17
18 type Replay struct {
19 Title *string `json:"Title,omitempty"`
20 GameMap *float32 `json:"GameMap,omitempty"`
21 Time *float32 `json:"Time,omitempty"`
22 Lap *float32 `json:"Lap,omitempty"`
23 PlayerEntries []PlayerEntry `json:"PlayerEntries,omitempty"`
24 }
25
26
27
28
29
30 func NewReplay() *Replay {
31 this := Replay{}
32 return &this
33 }
34
35
36
37
38 func NewReplayWithDefaults() *Replay {
39 this := Replay{}
40 return &this
41 }
42
43
44 func (o *Replay) GetTitle() string {
45 if o == nil || o.Title == nil {
46 var ret string
47 return ret
48 }
49 return *o.Title
50 }
51
52
53
54 func (o *Replay) GetTitleOk() (*string, bool) {
55 if o == nil || o.Title == nil {
56 return nil, false
57 }
58 return o.Title, true
59 }
60
61
62 func (o *Replay) HasTitle() bool {
63 if o != nil && o.Title != nil {
64 return true
65 }
66
67 return false
68 }
69
70
71 func (o *Replay) SetTitle(v string) {
72 o.Title = &v
73 }
74
75
76 func (o *Replay) GetGameMap() float32 {
77 if o == nil || o.GameMap == nil {
78 var ret float32
79 return ret
80 }
81 return *o.GameMap
82 }
83
84
85
86 func (o *Replay) GetGameMapOk() (*float32, bool) {
87 if o == nil || o.GameMap == nil {
88 return nil, false
89 }
90 return o.GameMap, true
91 }
92
93
94 func (o *Replay) HasGameMap() bool {
95 if o != nil && o.GameMap != nil {
96 return true
97 }
98
99 return false
100 }
101
102
103 func (o *Replay) SetGameMap(v float32) {
104 o.GameMap = &v
105 }
106
107
108 func (o *Replay) GetTime() float32 {
109 if o == nil || o.Time == nil {
110 var ret float32
111 return ret
112 }
113 return *o.Time
114 }
115
116
117
118 func (o *Replay) GetTimeOk() (*float32, bool) {
119 if o == nil || o.Time == nil {
120 return nil, false
121 }
122 return o.Time, true
123 }
124
125
126 func (o *Replay) HasTime() bool {
127 if o != nil && o.Time != nil {
128 return true
129 }
130
131 return false
132 }
133
134
135 func (o *Replay) SetTime(v float32) {
136 o.Time = &v
137 }
138
139
140 func (o *Replay) GetLap() float32 {
141 if o == nil || o.Lap == nil {
142 var ret float32
143 return ret
144 }
145 return *o.Lap
146 }
147
148
149
150 func (o *Replay) GetLapOk() (*float32, bool) {
151 if o == nil || o.Lap == nil {
152 return nil, false
153 }
154 return o.Lap, true
155 }
156
157
158 func (o *Replay) HasLap() bool {
159 if o != nil && o.Lap != nil {
160 return true
161 }
162
163 return false
164 }
165
166
167 func (o *Replay) SetLap(v float32) {
168 o.Lap = &v
169 }
170
171
172 func (o *Replay) GetPlayerEntries() []PlayerEntry {
173 if o == nil || o.PlayerEntries == nil {
174 var ret []PlayerEntry
175 return ret
176 }
177 return o.PlayerEntries
178 }
179
180
181
182 func (o *Replay) GetPlayerEntriesOk() ([]PlayerEntry, bool) {
183 if o == nil || o.PlayerEntries == nil {
184 return nil, false
185 }
186 return o.PlayerEntries, true
187 }
188
189
190 func (o *Replay) HasPlayerEntries() bool {
191 if o != nil && o.PlayerEntries != nil {
192 return true
193 }
194
195 return false
196 }
197
198
199 func (o *Replay) SetPlayerEntries(v []PlayerEntry) {
200 o.PlayerEntries = v
201 }
202
203 func (o Replay) MarshalJSON() ([]byte, error) {
204 toSerialize := map[string]interface{}{}
205 if o.Title != nil {
206 toSerialize["Title"] = o.Title
207 }
208 if o.GameMap != nil {
209 toSerialize["GameMap"] = o.GameMap
210 }
211 if o.Time != nil {
212 toSerialize["Time"] = o.Time
213 }
214 if o.Lap != nil {
215 toSerialize["Lap"] = o.Lap
216 }
217 if o.PlayerEntries != nil {
218 toSerialize["PlayerEntries"] = o.PlayerEntries
219 }
220 return json.Marshal(toSerialize)
221 }
222
223 type NullableReplay struct {
224 value *Replay
225 isSet bool
226 }
227
228 func (v NullableReplay) Get() *Replay {
229 return v.value
230 }
231
232 func (v *NullableReplay) Set(val *Replay) {
233 v.value = val
234 v.isSet = true
235 }
236
237 func (v NullableReplay) IsSet() bool {
238 return v.isSet
239 }
240
241 func (v *NullableReplay) Unset() {
242 v.value = nil
243 v.isSet = false
244 }
245
246 func NewNullableReplay(val *Replay) *NullableReplay {
247 return &NullableReplay{value: val, isSet: true}
248 }
249
250 func (v NullableReplay) MarshalJSON() ([]byte, error) {
251 return json.Marshal(v.value)
252 }
253
254 func (v *NullableReplay) UnmarshalJSON(src []byte) error {
255 v.isSet = true
256 return json.Unmarshal(src, &v.value)
257 }
258
259
260
View as plain text