@tool
extends TwitchData

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

## 
## #/components/schemas/ChannelInformation
class_name TwitchChannelInformation
	
## An ID that uniquely identifies the broadcaster.
@export var broadcaster_id: String:
	set(val): 
		broadcaster_id = val
		track_data(&"broadcaster_id", val)

## The broadcaster’s login name.
@export var broadcaster_login: String:
	set(val): 
		broadcaster_login = val
		track_data(&"broadcaster_login", val)

## The broadcaster’s display name.
@export var broadcaster_name: String:
	set(val): 
		broadcaster_name = val
		track_data(&"broadcaster_name", val)

## The broadcaster’s preferred language. The value is an ISO 639-1 two-letter language code (for example, _en_ for English). The value is set to “other” if the language is not a Twitch supported language.
@export var broadcaster_language: String:
	set(val): 
		broadcaster_language = val
		track_data(&"broadcaster_language", val)

## The name of the game that the broadcaster is playing or last played. The value is an empty string if the broadcaster has never played a game.
@export var game_name: String:
	set(val): 
		game_name = val
		track_data(&"game_name", val)

## An ID that uniquely identifies the game that the broadcaster is playing or last played. The value is an empty string if the broadcaster has never played a game.
@export var game_id: String:
	set(val): 
		game_id = val
		track_data(&"game_id", val)

## The title of the stream that the broadcaster is currently streaming or last streamed. The value is an empty string if the broadcaster has never streamed.
@export var title: String:
	set(val): 
		title = val
		track_data(&"title", val)

## The value of the broadcaster’s stream delay setting, in seconds. This field’s value defaults to zero unless 1) the request specifies a user access token, 2) the ID in the _broadcaster\_id_ query parameter matches the user ID in the access token, and 3) the broadcaster has partner status and they set a non-zero stream delay value.
@export var delay: int:
	set(val): 
		delay = val
		track_data(&"delay", val)

## The tags applied to the channel.
@export var tags: Array[String]:
	set(val): 
		tags = val
		track_data(&"tags", val)

## The CCLs applied to the channel.
@export var content_classification_labels: Array[String]:
	set(val): 
		content_classification_labels = val
		track_data(&"content_classification_labels", val)

## Boolean flag indicating if the channel has branded content.
@export var is_branded_content: bool:
	set(val): 
		is_branded_content = val
		track_data(&"is_branded_content", val)
var response: BufferedHTTPClient.ResponseData


## Constructor with all required fields.
static func create(_broadcaster_id: String, _broadcaster_login: String, _broadcaster_name: String, _broadcaster_language: String, _game_name: String, _game_id: String, _title: String, _delay: int, _tags: Array[String], _content_classification_labels: Array[String], _is_branded_content: bool) -> TwitchChannelInformation:
	var twitch_channel_information: TwitchChannelInformation = TwitchChannelInformation.new()
	twitch_channel_information.broadcaster_id = _broadcaster_id
	twitch_channel_information.broadcaster_login = _broadcaster_login
	twitch_channel_information.broadcaster_name = _broadcaster_name
	twitch_channel_information.broadcaster_language = _broadcaster_language
	twitch_channel_information.game_name = _game_name
	twitch_channel_information.game_id = _game_id
	twitch_channel_information.title = _title
	twitch_channel_information.delay = _delay
	twitch_channel_information.tags = _tags
	twitch_channel_information.content_classification_labels = _content_classification_labels
	twitch_channel_information.is_branded_content = _is_branded_content
	return twitch_channel_information


static func from_json(d: Dictionary) -> TwitchChannelInformation:
	var result: TwitchChannelInformation = TwitchChannelInformation.new()
	if d.get("broadcaster_id", null) != null:
		result.broadcaster_id = d["broadcaster_id"]
	if d.get("broadcaster_login", null) != null:
		result.broadcaster_login = d["broadcaster_login"]
	if d.get("broadcaster_name", null) != null:
		result.broadcaster_name = d["broadcaster_name"]
	if d.get("broadcaster_language", null) != null:
		result.broadcaster_language = d["broadcaster_language"]
	if d.get("game_name", null) != null:
		result.game_name = d["game_name"]
	if d.get("game_id", null) != null:
		result.game_id = d["game_id"]
	if d.get("title", null) != null:
		result.title = d["title"]
	if d.get("delay", null) != null:
		result.delay = d["delay"]
	if d.get("tags", null) != null:
		for value in d["tags"]:
			result.tags.append(value)
	if d.get("content_classification_labels", null) != null:
		for value in d["content_classification_labels"]:
			result.content_classification_labels.append(value)
	if d.get("is_branded_content", null) != null:
		result.is_branded_content = d["is_branded_content"]
	return result
