@tool
extends TwitchData

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

## 
## #/components/schemas/Team
class_name TwitchTeam
	
## The list of team members.
@export var users: Array[Users]:
	set(val): 
		users = val
		track_data(&"users", val)

## A URL to the team’s background image.
@export var background_image_url: String:
	set(val): 
		background_image_url = val
		track_data(&"background_image_url", val)

## A URL to the team’s banner.
@export var banner: String:
	set(val): 
		banner = val
		track_data(&"banner", val)

## The UTC date and time (in RFC3339 format) of when the team was created.
@export var created_at: String:
	set(val): 
		created_at = val
		track_data(&"created_at", val)

## The UTC date and time (in RFC3339 format) of the last time the team was updated.
@export var updated_at: String:
	set(val): 
		updated_at = val
		track_data(&"updated_at", val)

## The team’s description. The description may contain formatting such as Markdown, HTML, newline (\\n) characters, etc.
@export var info: String:
	set(val): 
		info = val
		track_data(&"info", val)

## A URL to a thumbnail image of the team’s logo.
@export var thumbnail_url: String:
	set(val): 
		thumbnail_url = val
		track_data(&"thumbnail_url", val)

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

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

## An ID that identifies the team.
@export var id: String:
	set(val): 
		id = val
		track_data(&"id", val)
var response: BufferedHTTPClient.ResponseData


## Constructor with all required fields.
static func create(_users: Array[Users], _background_image_url: String, _banner: String, _created_at: String, _updated_at: String, _info: String, _thumbnail_url: String, _team_name: String, _team_display_name: String, _id: String) -> TwitchTeam:
	var twitch_team: TwitchTeam = TwitchTeam.new()
	twitch_team.users = _users
	twitch_team.background_image_url = _background_image_url
	twitch_team.banner = _banner
	twitch_team.created_at = _created_at
	twitch_team.updated_at = _updated_at
	twitch_team.info = _info
	twitch_team.thumbnail_url = _thumbnail_url
	twitch_team.team_name = _team_name
	twitch_team.team_display_name = _team_display_name
	twitch_team.id = _id
	return twitch_team


static func from_json(d: Dictionary) -> TwitchTeam:
	var result: TwitchTeam = TwitchTeam.new()
	if d.get("users", null) != null:
		for value in d["users"]:
			result.users.append(Users.from_json(value))
	if d.get("background_image_url", null) != null:
		result.background_image_url = d["background_image_url"]
	if d.get("banner", null) != null:
		result.banner = d["banner"]
	if d.get("created_at", null) != null:
		result.created_at = d["created_at"]
	if d.get("updated_at", null) != null:
		result.updated_at = d["updated_at"]
	if d.get("info", null) != null:
		result.info = d["info"]
	if d.get("thumbnail_url", null) != null:
		result.thumbnail_url = d["thumbnail_url"]
	if d.get("team_name", null) != null:
		result.team_name = d["team_name"]
	if d.get("team_display_name", null) != null:
		result.team_display_name = d["team_display_name"]
	if d.get("id", null) != null:
		result.id = d["id"]
	return result



## The list of team members.
## #/components/schemas/Team/Users
class Users extends TwitchData:

	## An ID that identifies the team member.
	@export var user_id: String:
		set(val): 
			user_id = val
			track_data(&"user_id", val)
	
	## The team member’s login name.
	@export var user_login: String:
		set(val): 
			user_login = val
			track_data(&"user_login", val)
	
	## The team member’s display name.
	@export var user_name: String:
		set(val): 
			user_name = val
			track_data(&"user_name", val)
	
	
	
	## Constructor with all required fields.
	static func create(_user_id: String, _user_login: String, _user_name: String) -> Users:
		var users: Users = Users.new()
		users.user_id = _user_id
		users.user_login = _user_login
		users.user_name = _user_name
		return users
	
	
	static func from_json(d: Dictionary) -> Users:
		var result: Users = Users.new()
		if d.get("user_id", null) != null:
			result.user_id = d["user_id"]
		if d.get("user_login", null) != null:
			result.user_login = d["user_login"]
		if d.get("user_name", null) != null:
			result.user_name = d["user_name"]
		return result
	