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



mutable struct DiskProperties <: SwaggerModel
    timeCreated::Any # spec type: Union{ Nothing, DateTime } # spec name: timeCreated
    osType::Any # spec type: Union{ Nothing, String } # spec name: osType
    creationData::Any # spec type: Union{ Nothing, CreationData } # spec name: creationData
    diskSizeGB::Any # spec type: Union{ Nothing, Int32 } # spec name: diskSizeGB
    encryptionSettings::Any # spec type: Union{ Nothing, EncryptionSettings } # spec name: encryptionSettings
    provisioningState::Any # spec type: Union{ Nothing, String } # spec name: provisioningState

    function DiskProperties(;timeCreated=nothing, osType=nothing, creationData=nothing, diskSizeGB=nothing, encryptionSettings=nothing, provisioningState=nothing)
        o = new()
        validate_property(DiskProperties, Symbol("timeCreated"), timeCreated)
        setfield!(o, Symbol("timeCreated"), timeCreated)
        validate_property(DiskProperties, Symbol("osType"), osType)
        setfield!(o, Symbol("osType"), osType)
        validate_property(DiskProperties, Symbol("creationData"), creationData)
        setfield!(o, Symbol("creationData"), creationData)
        validate_property(DiskProperties, Symbol("diskSizeGB"), diskSizeGB)
        setfield!(o, Symbol("diskSizeGB"), diskSizeGB)
        validate_property(DiskProperties, Symbol("encryptionSettings"), encryptionSettings)
        setfield!(o, Symbol("encryptionSettings"), encryptionSettings)
        validate_property(DiskProperties, Symbol("provisioningState"), provisioningState)
        setfield!(o, Symbol("provisioningState"), provisioningState)
        o
    end
end # type DiskProperties

const _property_map_DiskProperties = Dict{Symbol,Symbol}(Symbol("timeCreated")=>Symbol("timeCreated"), Symbol("osType")=>Symbol("osType"), Symbol("creationData")=>Symbol("creationData"), Symbol("diskSizeGB")=>Symbol("diskSizeGB"), Symbol("encryptionSettings")=>Symbol("encryptionSettings"), Symbol("provisioningState")=>Symbol("provisioningState"))
const _property_types_DiskProperties = Dict{Symbol,String}(Symbol("timeCreated")=>"DateTime", Symbol("osType")=>"String", Symbol("creationData")=>"CreationData", Symbol("diskSizeGB")=>"Int32", Symbol("encryptionSettings")=>"EncryptionSettings", Symbol("provisioningState")=>"String")
Base.propertynames(::Type{ DiskProperties }) = collect(keys(_property_map_DiskProperties))
Swagger.property_type(::Type{ DiskProperties }, name::Symbol) = Union{Nothing,eval(Meta.parse(_property_types_DiskProperties[name]))}
Swagger.field_name(::Type{ DiskProperties }, property_name::Symbol) =  _property_map_DiskProperties[property_name]

const _allowed_DiskProperties_osType = ["Windows", "Linux"]

function check_required(o::DiskProperties)
    (getproperty(o, Symbol("creationData")) === nothing) && (return false)
    true
end

function validate_property(::Type{ DiskProperties }, name::Symbol, val)
    if name === Symbol("osType")
        Swagger.validate_param(name, "DiskProperties", :enum, val, _allowed_DiskProperties_osType)
    end
end
