80 lines
No EOL
2.4 KiB
GDScript
80 lines
No EOL
2.4 KiB
GDScript
@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 channel’s 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 channel’s 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 broadcaster’s 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
|
||
|