@tool
extends TwitchData

# CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY.

## 
## #/components/schemas/GuestStarInvite
class_name TwitchGuestStarInvite
	
## Twitch User ID corresponding to the invited guest
@export var user_id: String:
	set(val): 
		user_id = val
		track_data(&"user_id", val)

## Timestamp when this user was invited to the session.
@export var invited_at: String:
	set(val): 
		invited_at = val
		track_data(&"invited_at", val)

## Status representing the invited user’s join state. Can be one of the following:   
##   
## * `INVITED`: The user has been invited to the session but has not acknowledged it.
## * `ACCEPTED`: The invited user has acknowledged the invite and joined the waiting room, but may still be setting up their media devices or otherwise preparing to join the call.
## * `READY`: The invited user has signaled they are ready to join the call from the waiting room.
@export var status: String:
	set(val): 
		status = val
		track_data(&"status", val)

## Flag signaling that the invited user has chosen to disable their local video device. The user has hidden themselves, but they may choose to reveal their video feed upon joining the session.
@export var is_video_enabled: bool:
	set(val): 
		is_video_enabled = val
		track_data(&"is_video_enabled", val)

## Flag signaling that the invited user has chosen to disable their local audio device. The user has muted themselves, but they may choose to unmute their audio feed upon joining the session.
@export var is_audio_enabled: bool:
	set(val): 
		is_audio_enabled = val
		track_data(&"is_audio_enabled", val)

## Flag signaling that the invited user has a video device available for sharing.
@export var is_video_available: bool:
	set(val): 
		is_video_available = val
		track_data(&"is_video_available", val)

## Flag signaling that the invited user has an audio device available for sharing.
@export var is_audio_available: bool:
	set(val): 
		is_audio_available = val
		track_data(&"is_audio_available", val)
var response: BufferedHTTPClient.ResponseData


## Constructor with all required fields.
static func create(_user_id: String, _invited_at: String, _status: String, _is_video_enabled: bool, _is_audio_enabled: bool, _is_video_available: bool, _is_audio_available: bool) -> TwitchGuestStarInvite:
	var twitch_guest_star_invite: TwitchGuestStarInvite = TwitchGuestStarInvite.new()
	twitch_guest_star_invite.user_id = _user_id
	twitch_guest_star_invite.invited_at = _invited_at
	twitch_guest_star_invite.status = _status
	twitch_guest_star_invite.is_video_enabled = _is_video_enabled
	twitch_guest_star_invite.is_audio_enabled = _is_audio_enabled
	twitch_guest_star_invite.is_video_available = _is_video_available
	twitch_guest_star_invite.is_audio_available = _is_audio_available
	return twitch_guest_star_invite


static func from_json(d: Dictionary) -> TwitchGuestStarInvite:
	var result: TwitchGuestStarInvite = TwitchGuestStarInvite.new()
	if d.get("user_id", null) != null:
		result.user_id = d["user_id"]
	if d.get("invited_at", null) != null:
		result.invited_at = d["invited_at"]
	if d.get("status", null) != null:
		result.status = d["status"]
	if d.get("is_video_enabled", null) != null:
		result.is_video_enabled = d["is_video_enabled"]
	if d.get("is_audio_enabled", null) != null:
		result.is_audio_enabled = d["is_audio_enabled"]
	if d.get("is_video_available", null) != null:
		result.is_video_available = d["is_video_available"]
	if d.get("is_audio_available", null) != null:
		result.is_audio_available = d["is_audio_available"]
	return result
