@tool
extends TwitchData

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

## 
## #/components/schemas/BannedUser
class_name TwitchBannedUser
	
## The ID of the banned user.
@export var user_id: String:
	set(val): 
		user_id = val
		track_data(&"user_id", val)

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

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

## The UTC date and time (in RFC3339 format) of when the timeout expires, or an empty string if the user is permanently banned.
@export var expires_at: String:
	set(val): 
		expires_at = val
		track_data(&"expires_at", val)

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

## The reason the user was banned or put in a timeout if the moderator provided one.
@export var reason: String:
	set(val): 
		reason = val
		track_data(&"reason", val)

## The ID of the moderator that banned the user or put them in a timeout.
@export var moderator_id: String:
	set(val): 
		moderator_id = val
		track_data(&"moderator_id", val)

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

## The moderator’s display name.
@export var moderator_name: String:
	set(val): 
		moderator_name = val
		track_data(&"moderator_name", val)
var response: BufferedHTTPClient.ResponseData


## Constructor with all required fields.
static func create(_user_id: String, _user_login: String, _user_name: String, _expires_at: String, _created_at: String, _reason: String, _moderator_id: String, _moderator_login: String, _moderator_name: String) -> TwitchBannedUser:
	var twitch_banned_user: TwitchBannedUser = TwitchBannedUser.new()
	twitch_banned_user.user_id = _user_id
	twitch_banned_user.user_login = _user_login
	twitch_banned_user.user_name = _user_name
	twitch_banned_user.expires_at = _expires_at
	twitch_banned_user.created_at = _created_at
	twitch_banned_user.reason = _reason
	twitch_banned_user.moderator_id = _moderator_id
	twitch_banned_user.moderator_login = _moderator_login
	twitch_banned_user.moderator_name = _moderator_name
	return twitch_banned_user


static func from_json(d: Dictionary) -> TwitchBannedUser:
	var result: TwitchBannedUser = TwitchBannedUser.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"]
	if d.get("expires_at", null) != null:
		result.expires_at = d["expires_at"]
	if d.get("created_at", null) != null:
		result.created_at = d["created_at"]
	if d.get("reason", null) != null:
		result.reason = d["reason"]
	if d.get("moderator_id", null) != null:
		result.moderator_id = d["moderator_id"]
	if d.get("moderator_login", null) != null:
		result.moderator_login = d["moderator_login"]
	if d.get("moderator_name", null) != null:
		result.moderator_name = d["moderator_name"]
	return result
