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

197 lines
No EOL
6.6 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.
##
## #/components/schemas/Guest
class_name TwitchGuest
## ID representing this guests slot assignment.
##
## * Host is always in slot "0"
## * Guests are assigned the following consecutive IDs (e.g, "1", "2", "3", etc)
## * Screen Share is represented as a special guest with the ID "SCREENSHARE"
## * The identifier here matches the ID referenced in browser source links used in broadcasting software.
@export var slot_id: String:
set(val):
slot_id = val
track_data(&"slot_id", val)
## Flag determining whether or not the guest is visible in the browser source in the hosts streaming software.
@export var is_live: bool:
set(val):
is_live = val
track_data(&"is_live", val)
## User ID of the guest assigned to this slot.
@export var user_id: String:
set(val):
user_id = val
track_data(&"user_id", val)
## Display name of the guest assigned to this slot.
@export var user_display_name: String:
set(val):
user_display_name = val
track_data(&"user_display_name", val)
## Login of the guest assigned to this slot.
@export var user_login: String:
set(val):
user_login = val
track_data(&"user_login", val)
## Value from 0 to 100 representing the hosts volume setting for this guest.
@export var volume: int:
set(val):
volume = val
track_data(&"volume", val)
## Timestamp when this guest was assigned a slot in the session.
@export var assigned_at: String:
set(val):
assigned_at = val
track_data(&"assigned_at", val)
## Information about the guests audio settings
@export var audio_settings: AudioSettings:
set(val):
audio_settings = val
track_data(&"audio_settings", val)
## Information about the guests video settings
@export var video_settings: VideoSettings:
set(val):
video_settings = val
track_data(&"video_settings", val)
var response: BufferedHTTPClient.ResponseData
## Constructor with all required fields.
static func create(_slot_id: String, _is_live: bool, _user_id: String, _user_display_name: String, _user_login: String, _volume: int, _assigned_at: String, _audio_settings: AudioSettings, _video_settings: VideoSettings) -> TwitchGuest:
var twitch_guest: TwitchGuest = TwitchGuest.new()
twitch_guest.slot_id = _slot_id
twitch_guest.is_live = _is_live
twitch_guest.user_id = _user_id
twitch_guest.user_display_name = _user_display_name
twitch_guest.user_login = _user_login
twitch_guest.volume = _volume
twitch_guest.assigned_at = _assigned_at
twitch_guest.audio_settings = _audio_settings
twitch_guest.video_settings = _video_settings
return twitch_guest
static func from_json(d: Dictionary) -> TwitchGuest:
var result: TwitchGuest = TwitchGuest.new()
if d.get("slot_id", null) != null:
result.slot_id = d["slot_id"]
if d.get("is_live", null) != null:
result.is_live = d["is_live"]
if d.get("user_id", null) != null:
result.user_id = d["user_id"]
if d.get("user_display_name", null) != null:
result.user_display_name = d["user_display_name"]
if d.get("user_login", null) != null:
result.user_login = d["user_login"]
if d.get("volume", null) != null:
result.volume = d["volume"]
if d.get("assigned_at", null) != null:
result.assigned_at = d["assigned_at"]
if d.get("audio_settings", null) != null:
result.audio_settings = AudioSettings.from_json(d["audio_settings"])
if d.get("video_settings", null) != null:
result.video_settings = VideoSettings.from_json(d["video_settings"])
return result
## Information about the guests audio settings
## #/components/schemas/Guest/AudioSettings
class AudioSettings extends TwitchData:
## Flag determining whether the host is allowing the guests audio to be seen or heard within the session.
@export var is_host_enabled: bool:
set(val):
is_host_enabled = val
track_data(&"is_host_enabled", val)
## Flag determining whether the guest is allowing their audio to be transmitted to the session.
@export var is_guest_enabled: bool:
set(val):
is_guest_enabled = val
track_data(&"is_guest_enabled", val)
## Flag determining whether the guest has an appropriate audio device available to be transmitted to the session.
@export var is_available: bool:
set(val):
is_available = val
track_data(&"is_available", val)
## Constructor with all required fields.
static func create(_is_host_enabled: bool, _is_guest_enabled: bool, _is_available: bool) -> AudioSettings:
var audio_settings: AudioSettings = AudioSettings.new()
audio_settings.is_host_enabled = _is_host_enabled
audio_settings.is_guest_enabled = _is_guest_enabled
audio_settings.is_available = _is_available
return audio_settings
static func from_json(d: Dictionary) -> AudioSettings:
var result: AudioSettings = AudioSettings.new()
if d.get("is_host_enabled", null) != null:
result.is_host_enabled = d["is_host_enabled"]
if d.get("is_guest_enabled", null) != null:
result.is_guest_enabled = d["is_guest_enabled"]
if d.get("is_available", null) != null:
result.is_available = d["is_available"]
return result
## Information about the guests video settings
## #/components/schemas/Guest/VideoSettings
class VideoSettings extends TwitchData:
## Flag determining whether the host is allowing the guests video to be seen or heard within the session.
@export var is_host_enabled: bool:
set(val):
is_host_enabled = val
track_data(&"is_host_enabled", val)
## Flag determining whether the guest is allowing their video to be transmitted to the session.
@export var is_guest_enabled: bool:
set(val):
is_guest_enabled = val
track_data(&"is_guest_enabled", val)
## Flag determining whether the guest has an appropriate video device available to be transmitted to the session.
@export var is_available: bool:
set(val):
is_available = val
track_data(&"is_available", val)
## Constructor with all required fields.
static func create(_is_host_enabled: bool, _is_guest_enabled: bool, _is_available: bool) -> VideoSettings:
var video_settings: VideoSettings = VideoSettings.new()
video_settings.is_host_enabled = _is_host_enabled
video_settings.is_guest_enabled = _is_guest_enabled
video_settings.is_available = _is_available
return video_settings
static func from_json(d: Dictionary) -> VideoSettings:
var result: VideoSettings = VideoSettings.new()
if d.get("is_host_enabled", null) != null:
result.is_host_enabled = d["is_host_enabled"]
if d.get("is_guest_enabled", null) != null:
result.is_guest_enabled = d["is_guest_enabled"]
if d.get("is_available", null) != null:
result.is_available = d["is_available"]
return result