# This file was generated by the Julia Swagger Code Generator
# Do not modify this file directly. Modify the swagger specification instead.


@doc raw"""
    ObjsComment(;
        comment=nothing,
        created=nothing,
        id=nothing,
        is_intro=nothing,
        is_starred=nothing,
        num_stars=nothing,
        pinned_info=nothing,
        pinned_to=nothing,
        reactions=nothing,
        timestamp=nothing,
        user=nothing,
    )

    - comment::String
    - created::Int32
    - id::DefsCommentId
    - is_intro::Bool
    - is_starred::Bool
    - num_stars::Int32
    - pinned_info::DefsPinnedInfo
    - pinned_to::Vector{DefsChannel}
    - reactions::Vector{ObjsReaction}
    - timestamp::Int32
    - user::DefsUserId
"""
mutable struct ObjsComment <: SwaggerModel
    comment::Any # spec type: Union{ Nothing, String } # spec name: comment
    created::Any # spec type: Union{ Nothing, Int32 } # spec name: created
    id::Any # spec type: Union{ Nothing, DefsCommentId } # spec name: id
    is_intro::Any # spec type: Union{ Nothing, Bool } # spec name: is_intro
    is_starred::Any # spec type: Union{ Nothing, Bool } # spec name: is_starred
    num_stars::Any # spec type: Union{ Nothing, Int32 } # spec name: num_stars
    pinned_info::Any # spec type: Union{ Nothing, DefsPinnedInfo } # spec name: pinned_info
    pinned_to::Any # spec type: Union{ Nothing, Vector{DefsChannel} } # spec name: pinned_to
    reactions::Any # spec type: Union{ Nothing, Vector{ObjsReaction} } # spec name: reactions
    timestamp::Any # spec type: Union{ Nothing, Int32 } # spec name: timestamp
    user::Any # spec type: Union{ Nothing, DefsUserId } # spec name: user

    function ObjsComment(;comment=nothing, created=nothing, id=nothing, is_intro=nothing, is_starred=nothing, num_stars=nothing, pinned_info=nothing, pinned_to=nothing, reactions=nothing, timestamp=nothing, user=nothing)
        o = new()
        validate_property(ObjsComment, Symbol("comment"), comment)
        setfield!(o, Symbol("comment"), comment)
        validate_property(ObjsComment, Symbol("created"), created)
        setfield!(o, Symbol("created"), created)
        validate_property(ObjsComment, Symbol("id"), id)
        setfield!(o, Symbol("id"), id)
        validate_property(ObjsComment, Symbol("is_intro"), is_intro)
        setfield!(o, Symbol("is_intro"), is_intro)
        validate_property(ObjsComment, Symbol("is_starred"), is_starred)
        setfield!(o, Symbol("is_starred"), is_starred)
        validate_property(ObjsComment, Symbol("num_stars"), num_stars)
        setfield!(o, Symbol("num_stars"), num_stars)
        validate_property(ObjsComment, Symbol("pinned_info"), pinned_info)
        setfield!(o, Symbol("pinned_info"), pinned_info)
        validate_property(ObjsComment, Symbol("pinned_to"), pinned_to)
        setfield!(o, Symbol("pinned_to"), pinned_to)
        validate_property(ObjsComment, Symbol("reactions"), reactions)
        setfield!(o, Symbol("reactions"), reactions)
        validate_property(ObjsComment, Symbol("timestamp"), timestamp)
        setfield!(o, Symbol("timestamp"), timestamp)
        validate_property(ObjsComment, Symbol("user"), user)
        setfield!(o, Symbol("user"), user)
        o
    end
end # type ObjsComment

const _property_map_ObjsComment = Dict{Symbol,Symbol}(Symbol("comment")=>Symbol("comment"), Symbol("created")=>Symbol("created"), Symbol("id")=>Symbol("id"), Symbol("is_intro")=>Symbol("is_intro"), Symbol("is_starred")=>Symbol("is_starred"), Symbol("num_stars")=>Symbol("num_stars"), Symbol("pinned_info")=>Symbol("pinned_info"), Symbol("pinned_to")=>Symbol("pinned_to"), Symbol("reactions")=>Symbol("reactions"), Symbol("timestamp")=>Symbol("timestamp"), Symbol("user")=>Symbol("user"))
const _property_types_ObjsComment = Dict{Symbol,String}(Symbol("comment")=>"String", Symbol("created")=>"Int32", Symbol("id")=>"DefsCommentId", Symbol("is_intro")=>"Bool", Symbol("is_starred")=>"Bool", Symbol("num_stars")=>"Int32", Symbol("pinned_info")=>"DefsPinnedInfo", Symbol("pinned_to")=>"Vector{DefsChannel}", Symbol("reactions")=>"Vector{ObjsReaction}", Symbol("timestamp")=>"Int32", Symbol("user")=>"DefsUserId")
Base.propertynames(::Type{ ObjsComment }) = collect(keys(_property_map_ObjsComment))
Swagger.property_type(::Type{ ObjsComment }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_ObjsComment[name]))}
Swagger.field_name(::Type{ ObjsComment }, property_name::Symbol) =  _property_map_ObjsComment[property_name]

function check_required(o::ObjsComment)
    (getproperty(o, Symbol("comment")) === nothing) && (return false)
    (getproperty(o, Symbol("created")) === nothing) && (return false)
    (getproperty(o, Symbol("id")) === nothing) && (return false)
    (getproperty(o, Symbol("is_intro")) === nothing) && (return false)
    (getproperty(o, Symbol("timestamp")) === nothing) && (return false)
    (getproperty(o, Symbol("user")) === nothing) && (return false)
    true
end

function validate_property(::Type{ ObjsComment }, name::Symbol, val)
end
