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



mutable struct StorageAccountKey <: SwaggerModel
    keyName::Any # spec type: Union{ Nothing, String } # spec name: keyName
    value::Any # spec type: Union{ Nothing, String } # spec name: value
    permissions::Any # spec type: Union{ Nothing, String } # spec name: permissions

    function StorageAccountKey(;keyName=nothing, value=nothing, permissions=nothing)
        o = new()
        validate_property(StorageAccountKey, Symbol("keyName"), keyName)
        setfield!(o, Symbol("keyName"), keyName)
        validate_property(StorageAccountKey, Symbol("value"), value)
        setfield!(o, Symbol("value"), value)
        validate_property(StorageAccountKey, Symbol("permissions"), permissions)
        setfield!(o, Symbol("permissions"), permissions)
        o
    end
end # type StorageAccountKey

const _property_map_StorageAccountKey = Dict{Symbol,Symbol}(Symbol("keyName")=>Symbol("keyName"), Symbol("value")=>Symbol("value"), Symbol("permissions")=>Symbol("permissions"))
const _property_types_StorageAccountKey = Dict{Symbol,String}(Symbol("keyName")=>"String", Symbol("value")=>"String", Symbol("permissions")=>"String")
Base.propertynames(::Type{ StorageAccountKey }) = collect(keys(_property_map_StorageAccountKey))
Swagger.property_type(::Type{ StorageAccountKey }, name::Symbol) = Union{Nothing,eval(Meta.parse(_property_types_StorageAccountKey[name]))}
Swagger.field_name(::Type{ StorageAccountKey }, property_name::Symbol) =  _property_map_StorageAccountKey[property_name]

const _allowed_StorageAccountKey_permissions = ["Read", "Full"]

function check_required(o::StorageAccountKey)
    true
end

function validate_property(::Type{ StorageAccountKey }, name::Symbol, val)
    if name === Symbol("permissions")
        Swagger.validate_param(name, "StorageAccountKey", :enum, val, _allowed_StorageAccountKey_permissions)
    end
end
