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


mutable struct SnapshotProperties <: SwaggerModel
    timeCreated::Any # spec type: Union{ Nothing, DateTime } # spec name: timeCreated
    osType::Any # spec type: Union{ Nothing, String } # spec name: osType
    hyperVGeneration::Any # spec type: Union{ Nothing, String } # spec name: hyperVGeneration
    creationData::Any # spec type: Union{ Nothing, CreationData } # spec name: creationData
    diskSizeGB::Any # spec type: Union{ Nothing, Int32 } # spec name: diskSizeGB
    diskSizeBytes::Any # spec type: Union{ Nothing, Int64 } # spec name: diskSizeBytes
    uniqueId::Any # spec type: Union{ Nothing, String } # spec name: uniqueId
    encryptionSettingsCollection::Any # spec type: Union{ Nothing, EncryptionSettingsCollection } # spec name: encryptionSettingsCollection
    provisioningState::Any # spec type: Union{ Nothing, String } # spec name: provisioningState
    incremental::Any # spec type: Union{ Nothing, Bool } # spec name: incremental
    encryption::Any # spec type: Union{ Nothing, Encryption } # spec name: encryption
    networkAccessPolicy::Any # spec type: Union{ Nothing, NetworkAccessPolicy } # spec name: networkAccessPolicy
    diskAccessId::Any # spec type: Union{ Nothing, String } # spec name: diskAccessId

    function SnapshotProperties(;timeCreated=nothing, osType=nothing, hyperVGeneration=nothing, creationData=nothing, diskSizeGB=nothing, diskSizeBytes=nothing, uniqueId=nothing, encryptionSettingsCollection=nothing, provisioningState=nothing, incremental=nothing, encryption=nothing, networkAccessPolicy=nothing, diskAccessId=nothing)
        o = new()
        validate_property(SnapshotProperties, Symbol("timeCreated"), timeCreated)
        setfield!(o, Symbol("timeCreated"), timeCreated)
        validate_property(SnapshotProperties, Symbol("osType"), osType)
        setfield!(o, Symbol("osType"), osType)
        validate_property(SnapshotProperties, Symbol("hyperVGeneration"), hyperVGeneration)
        setfield!(o, Symbol("hyperVGeneration"), hyperVGeneration)
        validate_property(SnapshotProperties, Symbol("creationData"), creationData)
        setfield!(o, Symbol("creationData"), creationData)
        validate_property(SnapshotProperties, Symbol("diskSizeGB"), diskSizeGB)
        setfield!(o, Symbol("diskSizeGB"), diskSizeGB)
        validate_property(SnapshotProperties, Symbol("diskSizeBytes"), diskSizeBytes)
        setfield!(o, Symbol("diskSizeBytes"), diskSizeBytes)
        validate_property(SnapshotProperties, Symbol("uniqueId"), uniqueId)
        setfield!(o, Symbol("uniqueId"), uniqueId)
        validate_property(SnapshotProperties, Symbol("encryptionSettingsCollection"), encryptionSettingsCollection)
        setfield!(o, Symbol("encryptionSettingsCollection"), encryptionSettingsCollection)
        validate_property(SnapshotProperties, Symbol("provisioningState"), provisioningState)
        setfield!(o, Symbol("provisioningState"), provisioningState)
        validate_property(SnapshotProperties, Symbol("incremental"), incremental)
        setfield!(o, Symbol("incremental"), incremental)
        validate_property(SnapshotProperties, Symbol("encryption"), encryption)
        setfield!(o, Symbol("encryption"), encryption)
        validate_property(SnapshotProperties, Symbol("networkAccessPolicy"), networkAccessPolicy)
        setfield!(o, Symbol("networkAccessPolicy"), networkAccessPolicy)
        validate_property(SnapshotProperties, Symbol("diskAccessId"), diskAccessId)
        setfield!(o, Symbol("diskAccessId"), diskAccessId)
        o
    end
end # type SnapshotProperties

const _property_map_SnapshotProperties = Dict{Symbol,Symbol}(Symbol("timeCreated")=>Symbol("timeCreated"), Symbol("osType")=>Symbol("osType"), Symbol("hyperVGeneration")=>Symbol("hyperVGeneration"), Symbol("creationData")=>Symbol("creationData"), Symbol("diskSizeGB")=>Symbol("diskSizeGB"), Symbol("diskSizeBytes")=>Symbol("diskSizeBytes"), Symbol("uniqueId")=>Symbol("uniqueId"), Symbol("encryptionSettingsCollection")=>Symbol("encryptionSettingsCollection"), Symbol("provisioningState")=>Symbol("provisioningState"), Symbol("incremental")=>Symbol("incremental"), Symbol("encryption")=>Symbol("encryption"), Symbol("networkAccessPolicy")=>Symbol("networkAccessPolicy"), Symbol("diskAccessId")=>Symbol("diskAccessId"))
const _property_types_SnapshotProperties = Dict{Symbol,String}(Symbol("timeCreated")=>"DateTime", Symbol("osType")=>"String", Symbol("hyperVGeneration")=>"String", Symbol("creationData")=>"CreationData", Symbol("diskSizeGB")=>"Int32", Symbol("diskSizeBytes")=>"Int64", Symbol("uniqueId")=>"String", Symbol("encryptionSettingsCollection")=>"EncryptionSettingsCollection", Symbol("provisioningState")=>"String", Symbol("incremental")=>"Bool", Symbol("encryption")=>"Encryption", Symbol("networkAccessPolicy")=>"NetworkAccessPolicy", Symbol("diskAccessId")=>"String")
Base.propertynames(::Type{ SnapshotProperties }) = collect(keys(_property_map_SnapshotProperties))
Swagger.property_type(::Type{ SnapshotProperties }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_SnapshotProperties[name]))}
Swagger.field_name(::Type{ SnapshotProperties }, property_name::Symbol) =  _property_map_SnapshotProperties[property_name]

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

const _allowed_SnapshotProperties_hyperVGeneration = ["V1", "V2"]

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

function validate_property(::Type{ SnapshotProperties }, name::Symbol, val)
    if name === Symbol("osType")
        Swagger.validate_param(name, "SnapshotProperties", :enum, val, _allowed_SnapshotProperties_osType)
    end
    if name === Symbol("hyperVGeneration")
        Swagger.validate_param(name, "SnapshotProperties", :enum, val, _allowed_SnapshotProperties_hyperVGeneration)
    end
end
