//
// TeamRobot.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//

import Foundation



open class TeamRobot: Codable {

    /** Year this robot competed in. */
    public var year: Int
    /** Name of the robot as provided by the team. */
    public var robotName: String
    /** Internal TBA identifier for this robot. */
    public var key: String
    /** TBA team key for this robot. */
    public var teamKey: String


    
    public init(year: Int, robotName: String, key: String, teamKey: String) {
        self.year = year
        self.robotName = robotName
        self.key = key
        self.teamKey = teamKey
    }
    

    // Encodable protocol methods

    public func encode(to encoder: Encoder) throws {

        var container = encoder.container(keyedBy: String.self)

        try container.encode(year, forKey: "year")
        try container.encode(robotName, forKey: "robot_name")
        try container.encode(key, forKey: "key")
        try container.encode(teamKey, forKey: "team_key")
    }

    // Decodable protocol methods

    public required init(from decoder: Decoder) throws {
        let container = try decoder.container(keyedBy: String.self)

        year = try container.decode(Int.self, forKey: "year")
        robotName = try container.decode(String.self, forKey: "robot_name")
        key = try container.decode(String.self, forKey: "key")
        teamKey = try container.decode(String.self, forKey: "team_key")
    }
}

