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

80 lines
No EOL
2.4 KiB
GDScript
Raw 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 TwitchSnoozeNextAd
##
## #/components/schemas/SnoozeNextAdResponse
class Response extends TwitchData:
## A list that contains information about the channels snoozes and next upcoming ad after successfully snoozing.
@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 information about the channels snoozes and next upcoming ad after successfully snoozing.
## #/components/schemas/SnoozeNextAdResponse/Data
class ResponseData extends TwitchData:
## The number of snoozes available for the broadcaster.
@export var snooze_count: int:
set(val):
snooze_count = val
track_data(&"snooze_count", val)
## The UTC timestamp when the broadcaster will gain an additional snooze, in RFC3339 format.
@export var snooze_refresh_at: String:
set(val):
snooze_refresh_at = val
track_data(&"snooze_refresh_at", val)
## The UTC timestamp of the broadcasters next scheduled ad, in RFC3339 format.
@export var next_ad_at: String:
set(val):
next_ad_at = val
track_data(&"next_ad_at", val)
## Constructor with all required fields.
static func create(_snooze_count: int, _snooze_refresh_at: String, _next_ad_at: String) -> ResponseData:
var response_data: ResponseData = ResponseData.new()
response_data.snooze_count = _snooze_count
response_data.snooze_refresh_at = _snooze_refresh_at
response_data.next_ad_at = _next_ad_at
return response_data
static func from_json(d: Dictionary) -> ResponseData:
var result: ResponseData = ResponseData.new()
if d.get("snooze_count", null) != null:
result.snooze_count = d["snooze_count"]
if d.get("snooze_refresh_at", null) != null:
result.snooze_refresh_at = d["snooze_refresh_at"]
if d.get("next_ad_at", null) != null:
result.next_ad_at = d["next_ad_at"]
return result