71 lines
2 KiB
GDScript
71 lines
2 KiB
GDScript
@tool
|
|
extends TwitchData
|
|
|
|
# CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY.
|
|
|
|
##
|
|
## #/components/schemas/UserExtension
|
|
class_name TwitchUserExtension
|
|
|
|
## An ID that identifies the extension.
|
|
@export var id: String:
|
|
set(val):
|
|
id = val
|
|
track_data(&"id", val)
|
|
|
|
## The extension's version.
|
|
@export var version: String:
|
|
set(val):
|
|
version = val
|
|
track_data(&"version", val)
|
|
|
|
## The extension's name.
|
|
@export var name: String:
|
|
set(val):
|
|
name = val
|
|
track_data(&"name", val)
|
|
|
|
## A Boolean value that determines whether the extension is configured and can be activated. Is **true** if the extension is configured and can be activated.
|
|
@export var can_activate: bool:
|
|
set(val):
|
|
can_activate = val
|
|
track_data(&"can_activate", val)
|
|
|
|
## The extension types that you can activate for this extension. Possible values are:
|
|
##
|
|
## * component
|
|
## * mobile
|
|
## * overlay
|
|
## * panel
|
|
@export var type: Array[String]:
|
|
set(val):
|
|
type = val
|
|
track_data(&"type", val)
|
|
var response: BufferedHTTPClient.ResponseData
|
|
|
|
|
|
## Constructor with all required fields.
|
|
static func create(_id: String, _version: String, _name: String, _can_activate: bool, _type: Array[String]) -> TwitchUserExtension:
|
|
var twitch_user_extension: TwitchUserExtension = TwitchUserExtension.new()
|
|
twitch_user_extension.id = _id
|
|
twitch_user_extension.version = _version
|
|
twitch_user_extension.name = _name
|
|
twitch_user_extension.can_activate = _can_activate
|
|
twitch_user_extension.type = _type
|
|
return twitch_user_extension
|
|
|
|
|
|
static func from_json(d: Dictionary) -> TwitchUserExtension:
|
|
var result: TwitchUserExtension = TwitchUserExtension.new()
|
|
if d.get("id", null) != null:
|
|
result.id = d["id"]
|
|
if d.get("version", null) != null:
|
|
result.version = d["version"]
|
|
if d.get("name", null) != null:
|
|
result.name = d["name"]
|
|
if d.get("can_activate", null) != null:
|
|
result.can_activate = d["can_activate"]
|
|
if d.get("type", null) != null:
|
|
for value in d["type"]:
|
|
result.type.append(value)
|
|
return result
|