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



mutable struct StorageAccountCreateParameters <: SwaggerModel
    sku::Any # spec type: Union{ Nothing, Sku } # spec name: sku
    kind::Any # spec type: Union{ Nothing, String } # spec name: kind
    location::Any # spec type: Union{ Nothing, String } # spec name: location
    tags::Any # spec type: Union{ Nothing, Dict{String, String} } # spec name: tags
    identity::Any # spec type: Union{ Nothing, Identity } # spec name: identity
    properties::Any # spec type: Union{ Nothing, StorageAccountPropertiesCreateParameters } # spec name: properties

    function StorageAccountCreateParameters(;sku=nothing, kind=nothing, location=nothing, tags=nothing, identity=nothing, properties=nothing)
        o = new()
        validate_property(StorageAccountCreateParameters, Symbol("sku"), sku)
        setfield!(o, Symbol("sku"), sku)
        validate_property(StorageAccountCreateParameters, Symbol("kind"), kind)
        setfield!(o, Symbol("kind"), kind)
        validate_property(StorageAccountCreateParameters, Symbol("location"), location)
        setfield!(o, Symbol("location"), location)
        validate_property(StorageAccountCreateParameters, Symbol("tags"), tags)
        setfield!(o, Symbol("tags"), tags)
        validate_property(StorageAccountCreateParameters, Symbol("identity"), identity)
        setfield!(o, Symbol("identity"), identity)
        validate_property(StorageAccountCreateParameters, Symbol("properties"), properties)
        setfield!(o, Symbol("properties"), properties)
        o
    end
end # type StorageAccountCreateParameters

const _property_map_StorageAccountCreateParameters = Dict{Symbol,Symbol}(Symbol("sku")=>Symbol("sku"), Symbol("kind")=>Symbol("kind"), Symbol("location")=>Symbol("location"), Symbol("tags")=>Symbol("tags"), Symbol("identity")=>Symbol("identity"), Symbol("properties")=>Symbol("properties"))
const _property_types_StorageAccountCreateParameters = Dict{Symbol,String}(Symbol("sku")=>"Sku", Symbol("kind")=>"String", Symbol("location")=>"String", Symbol("tags")=>"Dict{String, String}", Symbol("identity")=>"Identity", Symbol("properties")=>"StorageAccountPropertiesCreateParameters")
Base.propertynames(::Type{ StorageAccountCreateParameters }) = collect(keys(_property_map_StorageAccountCreateParameters))
Swagger.property_type(::Type{ StorageAccountCreateParameters }, name::Symbol) = Union{Nothing,eval(Meta.parse(_property_types_StorageAccountCreateParameters[name]))}
Swagger.field_name(::Type{ StorageAccountCreateParameters }, property_name::Symbol) =  _property_map_StorageAccountCreateParameters[property_name]

const _allowed_StorageAccountCreateParameters_kind = ["Storage", "BlobStorage"]

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

function validate_property(::Type{ StorageAccountCreateParameters }, name::Symbol, val)
    if name === Symbol("kind")
        Swagger.validate_param(name, "StorageAccountCreateParameters", :enum, val, _allowed_StorageAccountCreateParameters_kind)
    end
end
