//
// User.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//

import Foundation
#if canImport(AnyCodable)
import AnyCodable
#endif

/** Reperesents user */
public struct User: Codable, Hashable {

    public var id: Int64
    public var name: String
    public var profileImageUrl: String?

    public init(id: Int64, name: String, profileImageUrl: String? = nil) {
        self.id = id
        self.name = name
        self.profileImageUrl = profileImageUrl
    }

    public enum CodingKeys: String, CodingKey, CaseIterable {
        case id
        case name
        case profileImageUrl = "profile_image_url"
    }

    // Encodable protocol methods

    public func encode(to encoder: Encoder) throws {
        var container = encoder.container(keyedBy: CodingKeys.self)
        try container.encode(id, forKey: .id)
        try container.encode(name, forKey: .name)
        try container.encodeIfPresent(profileImageUrl, forKey: .profileImageUrl)
    }
}

