pokepurple/addons/twitcher/generated/twitch_update_shield_mode_status.gd
Mario Steele c11a4ebbc2 Initial Commit
Initial commit of Code Base.
2025-06-12 14:31:14 -05:00

125 lines
No EOL
3.7 KiB
GDScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@tool
extends TwitchData
# CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY.
class_name TwitchUpdateShieldModeStatus
##
## #/components/schemas/UpdateShieldModeStatusBody
class Body extends TwitchData:
## A Boolean value that determines whether to activate Shield Mode. Set to **true** to activate Shield Mode; otherwise, **false** to deactivate Shield Mode.
@export var is_active: bool:
set(val):
is_active = val
track_data(&"is_active", val)
var response: BufferedHTTPClient.ResponseData
## Constructor with all required fields.
static func create(_is_active: bool) -> Body:
var body: Body = Body.new()
body.is_active = _is_active
return body
static func from_json(d: Dictionary) -> Body:
var result: Body = Body.new()
if d.get("is_active", null) != null:
result.is_active = d["is_active"]
return result
##
## #/components/schemas/UpdateShieldModeStatusResponse
class Response extends TwitchData:
## A list that contains a single object with the broadcasters updated Shield Mode status.
@export var data: Array[ResponseData]:
set(val):
data = val
track_data(&"data", val)
var response: BufferedHTTPClient.ResponseData
## Constructor with all required fields.
static func create(_data: Array[ResponseData]) -> Response:
var response: Response = Response.new()
response.data = _data
return response
static func from_json(d: Dictionary) -> Response:
var result: Response = Response.new()
if d.get("data", null) != null:
for value in d["data"]:
result.data.append(ResponseData.from_json(value))
return result
## A list that contains a single object with the broadcasters updated Shield Mode status.
## #/components/schemas/UpdateShieldModeStatusResponse/Data
class ResponseData extends TwitchData:
## A Boolean value that determines whether Shield Mode is active. Is **true** if Shield Mode is active; otherwise, **false**.
@export var is_active: bool:
set(val):
is_active = val
track_data(&"is_active", val)
## An ID that identifies the moderator that last activated Shield Mode.
@export var moderator_id: String:
set(val):
moderator_id = val
track_data(&"moderator_id", val)
## The moderators login name.
@export var moderator_login: String:
set(val):
moderator_login = val
track_data(&"moderator_login", val)
## The moderators display name.
@export var moderator_name: String:
set(val):
moderator_name = val
track_data(&"moderator_name", val)
## The UTC timestamp (in RFC3339 format) of when Shield Mode was last activated.
@export var last_activated_at: String:
set(val):
last_activated_at = val
track_data(&"last_activated_at", val)
## Constructor with all required fields.
static func create(_is_active: bool, _moderator_id: String, _moderator_login: String, _moderator_name: String, _last_activated_at: String) -> ResponseData:
var response_data: ResponseData = ResponseData.new()
response_data.is_active = _is_active
response_data.moderator_id = _moderator_id
response_data.moderator_login = _moderator_login
response_data.moderator_name = _moderator_name
response_data.last_activated_at = _last_activated_at
return response_data
static func from_json(d: Dictionary) -> ResponseData:
var result: ResponseData = ResponseData.new()
if d.get("is_active", null) != null:
result.is_active = d["is_active"]
if d.get("moderator_id", null) != null:
result.moderator_id = d["moderator_id"]
if d.get("moderator_login", null) != null:
result.moderator_login = d["moderator_login"]
if d.get("moderator_name", null) != null:
result.moderator_name = d["moderator_name"]
if d.get("last_activated_at", null) != null:
result.last_activated_at = d["last_activated_at"]
return result