@tool
extends TwitchData

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

## 
## #/components/schemas/BitsLeaderboard
class_name TwitchBitsLeaderboard
	
## An ID that identifies a user on the leaderboard.
@export var user_id: String:
	set(val): 
		user_id = val
		track_data(&"user_id", val)

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

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

## The user’s position on the leaderboard.
@export var rank: int:
	set(val): 
		rank = val
		track_data(&"rank", val)

## The number of Bits the user has cheered.
@export var score: int:
	set(val): 
		score = val
		track_data(&"score", val)
var response: BufferedHTTPClient.ResponseData


## Constructor with all required fields.
static func create(_user_id: String, _user_login: String, _user_name: String, _rank: int, _score: int) -> TwitchBitsLeaderboard:
	var twitch_bits_leaderboard: TwitchBitsLeaderboard = TwitchBitsLeaderboard.new()
	twitch_bits_leaderboard.user_id = _user_id
	twitch_bits_leaderboard.user_login = _user_login
	twitch_bits_leaderboard.user_name = _user_name
	twitch_bits_leaderboard.rank = _rank
	twitch_bits_leaderboard.score = _score
	return twitch_bits_leaderboard


static func from_json(d: Dictionary) -> TwitchBitsLeaderboard:
	var result: TwitchBitsLeaderboard = TwitchBitsLeaderboard.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("rank", null) != null:
		result.rank = d["rank"]
	if d.get("score", null) != null:
		result.score = d["score"]
	return result
