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



mutable struct CreationData <: SwaggerModel
    createOption::Any # spec type: Union{ Nothing, String } # spec name: createOption
    storageAccountId::Any # spec type: Union{ Nothing, String } # spec name: storageAccountId
    imageReference::Any # spec type: Union{ Nothing, ImageDiskReference } # spec name: imageReference
    sourceUri::Any # spec type: Union{ Nothing, String } # spec name: sourceUri
    sourceResourceId::Any # spec type: Union{ Nothing, String } # spec name: sourceResourceId

    function CreationData(;createOption=nothing, storageAccountId=nothing, imageReference=nothing, sourceUri=nothing, sourceResourceId=nothing)
        o = new()
        validate_property(CreationData, Symbol("createOption"), createOption)
        setfield!(o, Symbol("createOption"), createOption)
        validate_property(CreationData, Symbol("storageAccountId"), storageAccountId)
        setfield!(o, Symbol("storageAccountId"), storageAccountId)
        validate_property(CreationData, Symbol("imageReference"), imageReference)
        setfield!(o, Symbol("imageReference"), imageReference)
        validate_property(CreationData, Symbol("sourceUri"), sourceUri)
        setfield!(o, Symbol("sourceUri"), sourceUri)
        validate_property(CreationData, Symbol("sourceResourceId"), sourceResourceId)
        setfield!(o, Symbol("sourceResourceId"), sourceResourceId)
        o
    end
end # type CreationData

const _property_map_CreationData = Dict{Symbol,Symbol}(Symbol("createOption")=>Symbol("createOption"), Symbol("storageAccountId")=>Symbol("storageAccountId"), Symbol("imageReference")=>Symbol("imageReference"), Symbol("sourceUri")=>Symbol("sourceUri"), Symbol("sourceResourceId")=>Symbol("sourceResourceId"))
const _property_types_CreationData = Dict{Symbol,String}(Symbol("createOption")=>"String", Symbol("storageAccountId")=>"String", Symbol("imageReference")=>"ImageDiskReference", Symbol("sourceUri")=>"String", Symbol("sourceResourceId")=>"String")
Base.propertynames(::Type{ CreationData }) = collect(keys(_property_map_CreationData))
Swagger.property_type(::Type{ CreationData }, name::Symbol) = Union{Nothing,eval(Meta.parse(_property_types_CreationData[name]))}
Swagger.field_name(::Type{ CreationData }, property_name::Symbol) =  _property_map_CreationData[property_name]

const _allowed_CreationData_createOption = ["Empty", "Attach", "FromImage", "Import", "Copy"]

function check_required(o::CreationData)
    true
end

function validate_property(::Type{ CreationData }, name::Symbol, val)
    if name === Symbol("createOption")
        Swagger.validate_param(name, "CreationData", :enum, val, _allowed_CreationData_createOption)
    end
end
