-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathcreate_instance_request.py
More file actions
558 lines (415 loc) · 18.1 KB
/
create_instance_request.py
File metadata and controls
558 lines (415 loc) · 18.1 KB
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
# coding: utf-8
"""
VRChat API Documentation
The version of the OpenAPI document: 1.20.7
Contact: [email protected]
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
from vrchatapi.configuration import Configuration
class CreateInstanceRequest(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {
'age_gate': 'bool',
'calendar_entry_id': 'str',
'can_request_invite': 'bool',
'closed_at': 'datetime',
'content_settings': 'InstanceContentSettings',
'display_name': 'str',
'group_access_type': 'GroupAccessType',
'hard_close': 'bool',
'instance_persistence_enabled': 'bool',
'invite_only': 'bool',
'owner_id': 'str',
'player_persistence_enabled': 'bool',
'queue_enabled': 'bool',
'region': 'InstanceRegion',
'role_ids': 'list[str]',
'type': 'InstanceType',
'world_id': 'str'
}
attribute_map = {
'age_gate': 'ageGate',
'calendar_entry_id': 'calendarEntryId',
'can_request_invite': 'canRequestInvite',
'closed_at': 'closedAt',
'content_settings': 'contentSettings',
'display_name': 'displayName',
'group_access_type': 'groupAccessType',
'hard_close': 'hardClose',
'instance_persistence_enabled': 'instancePersistenceEnabled',
'invite_only': 'inviteOnly',
'owner_id': 'ownerId',
'player_persistence_enabled': 'playerPersistenceEnabled',
'queue_enabled': 'queueEnabled',
'region': 'region',
'role_ids': 'roleIds',
'type': 'type',
'world_id': 'worldId'
}
def __init__(self, age_gate=False, calendar_entry_id=None, can_request_invite=False, closed_at=None, content_settings=None, display_name=None, group_access_type=None, hard_close=False, instance_persistence_enabled=None, invite_only=False, owner_id=None, player_persistence_enabled=None, queue_enabled=False, region=None, role_ids=None, type=None, world_id=None, local_vars_configuration=None): # noqa: E501
"""CreateInstanceRequest - a model defined in OpenAPI""" # noqa: E501
if local_vars_configuration is None:
local_vars_configuration = Configuration.get_default_copy()
self.local_vars_configuration = local_vars_configuration
self._age_gate = None
self._calendar_entry_id = None
self._can_request_invite = None
self._closed_at = None
self._content_settings = None
self._display_name = None
self._group_access_type = None
self._hard_close = None
self._instance_persistence_enabled = None
self._invite_only = None
self._owner_id = None
self._player_persistence_enabled = None
self._queue_enabled = None
self._region = None
self._role_ids = None
self._type = None
self._world_id = None
self.discriminator = None
if age_gate is not None:
self.age_gate = age_gate
if calendar_entry_id is not None:
self.calendar_entry_id = calendar_entry_id
if can_request_invite is not None:
self.can_request_invite = can_request_invite
if closed_at is not None:
self.closed_at = closed_at
if content_settings is not None:
self.content_settings = content_settings
self.display_name = display_name
if group_access_type is not None:
self.group_access_type = group_access_type
if hard_close is not None:
self.hard_close = hard_close
self.instance_persistence_enabled = instance_persistence_enabled
if invite_only is not None:
self.invite_only = invite_only
self.owner_id = owner_id
self.player_persistence_enabled = player_persistence_enabled
if queue_enabled is not None:
self.queue_enabled = queue_enabled
self.region = region
if role_ids is not None:
self.role_ids = role_ids
self.type = type
self.world_id = world_id
@property
def age_gate(self):
"""Gets the age_gate of this CreateInstanceRequest. # noqa: E501
:return: The age_gate of this CreateInstanceRequest. # noqa: E501
:rtype: bool
"""
return self._age_gate
@age_gate.setter
def age_gate(self, age_gate):
"""Sets the age_gate of this CreateInstanceRequest.
:param age_gate: The age_gate of this CreateInstanceRequest. # noqa: E501
:type age_gate: bool
"""
self._age_gate = age_gate
@property
def calendar_entry_id(self):
"""Gets the calendar_entry_id of this CreateInstanceRequest. # noqa: E501
:return: The calendar_entry_id of this CreateInstanceRequest. # noqa: E501
:rtype: str
"""
return self._calendar_entry_id
@calendar_entry_id.setter
def calendar_entry_id(self, calendar_entry_id):
"""Sets the calendar_entry_id of this CreateInstanceRequest.
:param calendar_entry_id: The calendar_entry_id of this CreateInstanceRequest. # noqa: E501
:type calendar_entry_id: str
"""
self._calendar_entry_id = calendar_entry_id
@property
def can_request_invite(self):
"""Gets the can_request_invite of this CreateInstanceRequest. # noqa: E501
Only applies to invite type instances to make them invite+ # noqa: E501
:return: The can_request_invite of this CreateInstanceRequest. # noqa: E501
:rtype: bool
"""
return self._can_request_invite
@can_request_invite.setter
def can_request_invite(self, can_request_invite):
"""Sets the can_request_invite of this CreateInstanceRequest.
Only applies to invite type instances to make them invite+ # noqa: E501
:param can_request_invite: The can_request_invite of this CreateInstanceRequest. # noqa: E501
:type can_request_invite: bool
"""
self._can_request_invite = can_request_invite
@property
def closed_at(self):
"""Gets the closed_at of this CreateInstanceRequest. # noqa: E501
The time after which users won't be allowed to join the instance. This doesn't work for public instances. # noqa: E501
:return: The closed_at of this CreateInstanceRequest. # noqa: E501
:rtype: datetime
"""
return self._closed_at
@closed_at.setter
def closed_at(self, closed_at):
"""Sets the closed_at of this CreateInstanceRequest.
The time after which users won't be allowed to join the instance. This doesn't work for public instances. # noqa: E501
:param closed_at: The closed_at of this CreateInstanceRequest. # noqa: E501
:type closed_at: datetime
"""
self._closed_at = closed_at
@property
def content_settings(self):
"""Gets the content_settings of this CreateInstanceRequest. # noqa: E501
:return: The content_settings of this CreateInstanceRequest. # noqa: E501
:rtype: InstanceContentSettings
"""
return self._content_settings
@content_settings.setter
def content_settings(self, content_settings):
"""Sets the content_settings of this CreateInstanceRequest.
:param content_settings: The content_settings of this CreateInstanceRequest. # noqa: E501
:type content_settings: InstanceContentSettings
"""
self._content_settings = content_settings
@property
def display_name(self):
"""Gets the display_name of this CreateInstanceRequest. # noqa: E501
:return: The display_name of this CreateInstanceRequest. # noqa: E501
:rtype: str
"""
return self._display_name
@display_name.setter
def display_name(self, display_name):
"""Sets the display_name of this CreateInstanceRequest.
:param display_name: The display_name of this CreateInstanceRequest. # noqa: E501
:type display_name: str
"""
self._display_name = display_name
@property
def group_access_type(self):
"""Gets the group_access_type of this CreateInstanceRequest. # noqa: E501
:return: The group_access_type of this CreateInstanceRequest. # noqa: E501
:rtype: GroupAccessType
"""
return self._group_access_type
@group_access_type.setter
def group_access_type(self, group_access_type):
"""Sets the group_access_type of this CreateInstanceRequest.
:param group_access_type: The group_access_type of this CreateInstanceRequest. # noqa: E501
:type group_access_type: GroupAccessType
"""
self._group_access_type = group_access_type
@property
def hard_close(self):
"""Gets the hard_close of this CreateInstanceRequest. # noqa: E501
Currently unused, but will eventually be a flag to set if the closing of the instance should kick people. # noqa: E501
:return: The hard_close of this CreateInstanceRequest. # noqa: E501
:rtype: bool
"""
return self._hard_close
@hard_close.setter
def hard_close(self, hard_close):
"""Sets the hard_close of this CreateInstanceRequest.
Currently unused, but will eventually be a flag to set if the closing of the instance should kick people. # noqa: E501
:param hard_close: The hard_close of this CreateInstanceRequest. # noqa: E501
:type hard_close: bool
"""
self._hard_close = hard_close
@property
def instance_persistence_enabled(self):
"""Gets the instance_persistence_enabled of this CreateInstanceRequest. # noqa: E501
:return: The instance_persistence_enabled of this CreateInstanceRequest. # noqa: E501
:rtype: bool
"""
return self._instance_persistence_enabled
@instance_persistence_enabled.setter
def instance_persistence_enabled(self, instance_persistence_enabled):
"""Sets the instance_persistence_enabled of this CreateInstanceRequest.
:param instance_persistence_enabled: The instance_persistence_enabled of this CreateInstanceRequest. # noqa: E501
:type instance_persistence_enabled: bool
"""
self._instance_persistence_enabled = instance_persistence_enabled
@property
def invite_only(self):
"""Gets the invite_only of this CreateInstanceRequest. # noqa: E501
:return: The invite_only of this CreateInstanceRequest. # noqa: E501
:rtype: bool
"""
return self._invite_only
@invite_only.setter
def invite_only(self, invite_only):
"""Sets the invite_only of this CreateInstanceRequest.
:param invite_only: The invite_only of this CreateInstanceRequest. # noqa: E501
:type invite_only: bool
"""
self._invite_only = invite_only
@property
def owner_id(self):
"""Gets the owner_id of this CreateInstanceRequest. # noqa: E501
A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise # noqa: E501
:return: The owner_id of this CreateInstanceRequest. # noqa: E501
:rtype: str
"""
return self._owner_id
@owner_id.setter
def owner_id(self, owner_id):
"""Sets the owner_id of this CreateInstanceRequest.
A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise # noqa: E501
:param owner_id: The owner_id of this CreateInstanceRequest. # noqa: E501
:type owner_id: str
"""
self._owner_id = owner_id
@property
def player_persistence_enabled(self):
"""Gets the player_persistence_enabled of this CreateInstanceRequest. # noqa: E501
:return: The player_persistence_enabled of this CreateInstanceRequest. # noqa: E501
:rtype: bool
"""
return self._player_persistence_enabled
@player_persistence_enabled.setter
def player_persistence_enabled(self, player_persistence_enabled):
"""Sets the player_persistence_enabled of this CreateInstanceRequest.
:param player_persistence_enabled: The player_persistence_enabled of this CreateInstanceRequest. # noqa: E501
:type player_persistence_enabled: bool
"""
self._player_persistence_enabled = player_persistence_enabled
@property
def queue_enabled(self):
"""Gets the queue_enabled of this CreateInstanceRequest. # noqa: E501
:return: The queue_enabled of this CreateInstanceRequest. # noqa: E501
:rtype: bool
"""
return self._queue_enabled
@queue_enabled.setter
def queue_enabled(self, queue_enabled):
"""Sets the queue_enabled of this CreateInstanceRequest.
:param queue_enabled: The queue_enabled of this CreateInstanceRequest. # noqa: E501
:type queue_enabled: bool
"""
self._queue_enabled = queue_enabled
@property
def region(self):
"""Gets the region of this CreateInstanceRequest. # noqa: E501
:return: The region of this CreateInstanceRequest. # noqa: E501
:rtype: InstanceRegion
"""
return self._region
@region.setter
def region(self, region):
"""Sets the region of this CreateInstanceRequest.
:param region: The region of this CreateInstanceRequest. # noqa: E501
:type region: InstanceRegion
"""
if self.local_vars_configuration.client_side_validation and region is None: # noqa: E501
raise ValueError("Invalid value for `region`, must not be `None`") # noqa: E501
self._region = region
@property
def role_ids(self):
"""Gets the role_ids of this CreateInstanceRequest. # noqa: E501
Group roleIds that are allowed to join if the type is \"group\" and groupAccessType is \"member\" # noqa: E501
:return: The role_ids of this CreateInstanceRequest. # noqa: E501
:rtype: list[str]
"""
return self._role_ids
@role_ids.setter
def role_ids(self, role_ids):
"""Sets the role_ids of this CreateInstanceRequest.
Group roleIds that are allowed to join if the type is \"group\" and groupAccessType is \"member\" # noqa: E501
:param role_ids: The role_ids of this CreateInstanceRequest. # noqa: E501
:type role_ids: list[str]
"""
self._role_ids = role_ids
@property
def type(self):
"""Gets the type of this CreateInstanceRequest. # noqa: E501
:return: The type of this CreateInstanceRequest. # noqa: E501
:rtype: InstanceType
"""
return self._type
@type.setter
def type(self, type):
"""Sets the type of this CreateInstanceRequest.
:param type: The type of this CreateInstanceRequest. # noqa: E501
:type type: InstanceType
"""
if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501
raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
self._type = type
@property
def world_id(self):
"""Gets the world_id of this CreateInstanceRequest. # noqa: E501
WorldID be \"offline\" on User profiles if you are not friends with that user. # noqa: E501
:return: The world_id of this CreateInstanceRequest. # noqa: E501
:rtype: str
"""
return self._world_id
@world_id.setter
def world_id(self, world_id):
"""Sets the world_id of this CreateInstanceRequest.
WorldID be \"offline\" on User profiles if you are not friends with that user. # noqa: E501
:param world_id: The world_id of this CreateInstanceRequest. # noqa: E501
:type world_id: str
"""
if self.local_vars_configuration.client_side_validation and world_id is None: # noqa: E501
raise ValueError("Invalid value for `world_id`, must not be `None`") # noqa: E501
self._world_id = world_id
def to_dict(self, serialize=False):
"""Returns the model properties as a dict"""
result = {}
def convert(x):
if hasattr(x, "to_dict"):
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:
return x.to_dict(serialize)
else:
return x
for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
attr = self.attribute_map.get(attr, attr) if serialize else attr
if isinstance(value, list):
result[attr] = list(map(
lambda x: convert(x),
value
))
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], convert(item[1])),
value.items()
))
else:
result[attr] = convert(value)
return result
def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())
def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, CreateInstanceRequest):
return False
return self.to_dict() == other.to_dict()
def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, CreateInstanceRequest):
return True
return self.to_dict() != other.to_dict()