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



mutable struct VirtualMachineImage <: SwaggerModel
    id::Any # spec type: Union{ Nothing, String } # spec name: id
    name::Any # spec type: Union{ Nothing, String } # spec name: name
    location::Any # spec type: Union{ Nothing, String } # spec name: location
    tags::Any # spec type: Union{ Nothing, Dict{String, String} } # spec name: tags
    properties::Any # spec type: Union{ Nothing, VirtualMachineImageProperties } # spec name: properties

    function VirtualMachineImage(;id=nothing, name=nothing, location=nothing, tags=nothing, properties=nothing)
        o = new()
        validate_property(VirtualMachineImage, Symbol("id"), id)
        setfield!(o, Symbol("id"), id)
        validate_property(VirtualMachineImage, Symbol("name"), name)
        setfield!(o, Symbol("name"), name)
        validate_property(VirtualMachineImage, Symbol("location"), location)
        setfield!(o, Symbol("location"), location)
        validate_property(VirtualMachineImage, Symbol("tags"), tags)
        setfield!(o, Symbol("tags"), tags)
        validate_property(VirtualMachineImage, Symbol("properties"), properties)
        setfield!(o, Symbol("properties"), properties)
        o
    end
end # type VirtualMachineImage

const _property_map_VirtualMachineImage = Dict{Symbol,Symbol}(Symbol("id")=>Symbol("id"), Symbol("name")=>Symbol("name"), Symbol("location")=>Symbol("location"), Symbol("tags")=>Symbol("tags"), Symbol("properties")=>Symbol("properties"))
const _property_types_VirtualMachineImage = Dict{Symbol,String}(Symbol("id")=>"String", Symbol("name")=>"String", Symbol("location")=>"String", Symbol("tags")=>"Dict{String, String}", Symbol("properties")=>"VirtualMachineImageProperties")
Base.propertynames(::Type{ VirtualMachineImage }) = collect(keys(_property_map_VirtualMachineImage))
Swagger.property_type(::Type{ VirtualMachineImage }, name::Symbol) = Union{Nothing,eval(Meta.parse(_property_types_VirtualMachineImage[name]))}
Swagger.field_name(::Type{ VirtualMachineImage }, property_name::Symbol) =  _property_map_VirtualMachineImage[property_name]

function check_required(o::VirtualMachineImage)
    (getproperty(o, Symbol("name")) === nothing) && (return false)
    (getproperty(o, Symbol("location")) === nothing) && (return false)
    true
end

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