203 lines
6.7 KiB
GDScript3
203 lines
6.7 KiB
GDScript3
|
|
@tool
|
|||
|
|
extends TwitchData
|
|||
|
|
|
|||
|
|
# CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY.
|
|||
|
|
|
|||
|
|
class_name TwitchCreateChannelStreamScheduleSegment
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
##
|
|||
|
|
## #/components/schemas/CreateChannelStreamScheduleSegmentBody
|
|||
|
|
class Body extends TwitchData:
|
|||
|
|
|
|||
|
|
## The date and time that the broadcast segment starts. Specify the date and time in RFC3339 format (for example, 2021-07-01T18:00:00Z).
|
|||
|
|
@export var start_time: String:
|
|||
|
|
set(val):
|
|||
|
|
start_time = val
|
|||
|
|
track_data(&"start_time", val)
|
|||
|
|
|
|||
|
|
## The time zone where the broadcast takes place. Specify the time zone using [IANA time zone database](https://www.iana.org/time-zones) format (for example, America/New\_York).
|
|||
|
|
@export var timezone: String:
|
|||
|
|
set(val):
|
|||
|
|
timezone = val
|
|||
|
|
track_data(&"timezone", val)
|
|||
|
|
|
|||
|
|
## The length of time, in minutes, that the broadcast is scheduled to run. The duration must be in the range 30 through 1380 (23 hours).
|
|||
|
|
@export var duration: String:
|
|||
|
|
set(val):
|
|||
|
|
duration = val
|
|||
|
|
track_data(&"duration", val)
|
|||
|
|
|
|||
|
|
## A Boolean value that determines whether the broadcast recurs weekly. Is **true** if the broadcast recurs weekly. Only partners and affiliates may add non-recurring broadcasts.
|
|||
|
|
@export var is_recurring: bool:
|
|||
|
|
set(val):
|
|||
|
|
is_recurring = val
|
|||
|
|
track_data(&"is_recurring", val)
|
|||
|
|
|
|||
|
|
## The ID of the category that best represents the broadcast’s content. To get the category ID, use the [Search Categories](https://dev.twitch.tv/docs/api/reference#search-categories) endpoint.
|
|||
|
|
@export var category_id: String:
|
|||
|
|
set(val):
|
|||
|
|
category_id = val
|
|||
|
|
track_data(&"category_id", val)
|
|||
|
|
|
|||
|
|
## The broadcast’s title. The title may contain a maximum of 140 characters.
|
|||
|
|
@export var title: String:
|
|||
|
|
set(val):
|
|||
|
|
title = val
|
|||
|
|
track_data(&"title", val)
|
|||
|
|
var response: BufferedHTTPClient.ResponseData
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Constructor with all required fields.
|
|||
|
|
static func create(_start_time: String, _timezone: String, _duration: String) -> Body:
|
|||
|
|
var body: Body = Body.new()
|
|||
|
|
body.start_time = _start_time
|
|||
|
|
body.timezone = _timezone
|
|||
|
|
body.duration = _duration
|
|||
|
|
return body
|
|||
|
|
|
|||
|
|
|
|||
|
|
static func from_json(d: Dictionary) -> Body:
|
|||
|
|
var result: Body = Body.new()
|
|||
|
|
if d.get("start_time", null) != null:
|
|||
|
|
result.start_time = d["start_time"]
|
|||
|
|
if d.get("timezone", null) != null:
|
|||
|
|
result.timezone = d["timezone"]
|
|||
|
|
if d.get("duration", null) != null:
|
|||
|
|
result.duration = d["duration"]
|
|||
|
|
if d.get("is_recurring", null) != null:
|
|||
|
|
result.is_recurring = d["is_recurring"]
|
|||
|
|
if d.get("category_id", null) != null:
|
|||
|
|
result.category_id = d["category_id"]
|
|||
|
|
if d.get("title", null) != null:
|
|||
|
|
result.title = d["title"]
|
|||
|
|
return result
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
##
|
|||
|
|
## #/components/schemas/CreateChannelStreamScheduleSegmentResponse
|
|||
|
|
class Response extends TwitchData:
|
|||
|
|
|
|||
|
|
## The broadcaster’s streaming scheduled.
|
|||
|
|
@export var data: ResponseData:
|
|||
|
|
set(val):
|
|||
|
|
data = val
|
|||
|
|
track_data(&"data", val)
|
|||
|
|
var response: BufferedHTTPClient.ResponseData
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Constructor with all required fields.
|
|||
|
|
static func create(_data: 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:
|
|||
|
|
result.data = ResponseData.from_json(d["data"])
|
|||
|
|
return result
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
## The broadcaster’s streaming scheduled.
|
|||
|
|
## #/components/schemas/CreateChannelStreamScheduleSegmentResponse/Data
|
|||
|
|
class ResponseData extends TwitchData:
|
|||
|
|
|
|||
|
|
## A list that contains the single broadcast segment that you added.
|
|||
|
|
@export var segments: Array[TwitchChannelStreamScheduleSegment]:
|
|||
|
|
set(val):
|
|||
|
|
segments = val
|
|||
|
|
track_data(&"segments", val)
|
|||
|
|
|
|||
|
|
## The ID of the broadcaster that owns the broadcast schedule.
|
|||
|
|
@export var broadcaster_id: String:
|
|||
|
|
set(val):
|
|||
|
|
broadcaster_id = val
|
|||
|
|
track_data(&"broadcaster_id", val)
|
|||
|
|
|
|||
|
|
## The broadcaster’s display name.
|
|||
|
|
@export var broadcaster_name: String:
|
|||
|
|
set(val):
|
|||
|
|
broadcaster_name = val
|
|||
|
|
track_data(&"broadcaster_name", val)
|
|||
|
|
|
|||
|
|
## The broadcaster’s login name.
|
|||
|
|
@export var broadcaster_login: String:
|
|||
|
|
set(val):
|
|||
|
|
broadcaster_login = val
|
|||
|
|
track_data(&"broadcaster_login", val)
|
|||
|
|
|
|||
|
|
## The dates when the broadcaster is on vacation and not streaming. Is set to **null** if vacation mode is not enabled.
|
|||
|
|
@export var vacation: ResponseVacation:
|
|||
|
|
set(val):
|
|||
|
|
vacation = val
|
|||
|
|
track_data(&"vacation", val)
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Constructor with all required fields.
|
|||
|
|
static func create(_segments: Array[TwitchChannelStreamScheduleSegment], _broadcaster_id: String, _broadcaster_name: String, _broadcaster_login: String, _vacation: ResponseVacation) -> ResponseData:
|
|||
|
|
var response_data: ResponseData = ResponseData.new()
|
|||
|
|
response_data.segments = _segments
|
|||
|
|
response_data.broadcaster_id = _broadcaster_id
|
|||
|
|
response_data.broadcaster_name = _broadcaster_name
|
|||
|
|
response_data.broadcaster_login = _broadcaster_login
|
|||
|
|
response_data.vacation = _vacation
|
|||
|
|
return response_data
|
|||
|
|
|
|||
|
|
|
|||
|
|
static func from_json(d: Dictionary) -> ResponseData:
|
|||
|
|
var result: ResponseData = ResponseData.new()
|
|||
|
|
if d.get("segments", null) != null:
|
|||
|
|
for value in d["segments"]:
|
|||
|
|
result.segments.append(TwitchChannelStreamScheduleSegment.from_json(value))
|
|||
|
|
if d.get("broadcaster_id", null) != null:
|
|||
|
|
result.broadcaster_id = d["broadcaster_id"]
|
|||
|
|
if d.get("broadcaster_name", null) != null:
|
|||
|
|
result.broadcaster_name = d["broadcaster_name"]
|
|||
|
|
if d.get("broadcaster_login", null) != null:
|
|||
|
|
result.broadcaster_login = d["broadcaster_login"]
|
|||
|
|
if d.get("vacation", null) != null:
|
|||
|
|
result.vacation = ResponseVacation.from_json(d["vacation"])
|
|||
|
|
return result
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
## The dates when the broadcaster is on vacation and not streaming. Is set to **null** if vacation mode is not enabled.
|
|||
|
|
## #/components/schemas/CreateChannelStreamScheduleSegmentResponse/Data/Vacation
|
|||
|
|
class ResponseVacation extends TwitchData:
|
|||
|
|
|
|||
|
|
## The UTC date and time (in RFC3339 format) of when the broadcaster’s vacation starts.
|
|||
|
|
@export var start_time: String:
|
|||
|
|
set(val):
|
|||
|
|
start_time = val
|
|||
|
|
track_data(&"start_time", val)
|
|||
|
|
|
|||
|
|
## The UTC date and time (in RFC3339 format) of when the broadcaster’s vacation ends.
|
|||
|
|
@export var end_time: String:
|
|||
|
|
set(val):
|
|||
|
|
end_time = val
|
|||
|
|
track_data(&"end_time", val)
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Constructor with all required fields.
|
|||
|
|
static func create(_start_time: String, _end_time: String) -> ResponseVacation:
|
|||
|
|
var response_vacation: ResponseVacation = ResponseVacation.new()
|
|||
|
|
response_vacation.start_time = _start_time
|
|||
|
|
response_vacation.end_time = _end_time
|
|||
|
|
return response_vacation
|
|||
|
|
|
|||
|
|
|
|||
|
|
static func from_json(d: Dictionary) -> ResponseVacation:
|
|||
|
|
var result: ResponseVacation = ResponseVacation.new()
|
|||
|
|
if d.get("start_time", null) != null:
|
|||
|
|
result.start_time = d["start_time"]
|
|||
|
|
if d.get("end_time", null) != null:
|
|||
|
|
result.end_time = d["end_time"]
|
|||
|
|
return result
|
|||
|
|
|