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



mutable struct StorageAccountCheckNameAvailabilityParameters <: SwaggerModel
    name::Any # spec type: Union{ Nothing, String } # spec name: name
    type::Any # spec type: Union{ Nothing, String } # spec name: type

    function StorageAccountCheckNameAvailabilityParameters(;name=nothing, type=nothing)
        o = new()
        validate_property(StorageAccountCheckNameAvailabilityParameters, Symbol("name"), name)
        setfield!(o, Symbol("name"), name)
        validate_property(StorageAccountCheckNameAvailabilityParameters, Symbol("type"), type)
        setfield!(o, Symbol("type"), type)
        o
    end
end # type StorageAccountCheckNameAvailabilityParameters

const _property_map_StorageAccountCheckNameAvailabilityParameters = Dict{Symbol,Symbol}(Symbol("name")=>Symbol("name"), Symbol("type")=>Symbol("type"))
const _property_types_StorageAccountCheckNameAvailabilityParameters = Dict{Symbol,String}(Symbol("name")=>"String", Symbol("type")=>"String")
Base.propertynames(::Type{ StorageAccountCheckNameAvailabilityParameters }) = collect(keys(_property_map_StorageAccountCheckNameAvailabilityParameters))
Swagger.property_type(::Type{ StorageAccountCheckNameAvailabilityParameters }, name::Symbol) = Union{Nothing,eval(Meta.parse(_property_types_StorageAccountCheckNameAvailabilityParameters[name]))}
Swagger.field_name(::Type{ StorageAccountCheckNameAvailabilityParameters }, property_name::Symbol) =  _property_map_StorageAccountCheckNameAvailabilityParameters[property_name]

const _allowed_StorageAccountCheckNameAvailabilityParameters_type = ["Microsoft.Storage/storageAccounts"]

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

function validate_property(::Type{ StorageAccountCheckNameAvailabilityParameters }, name::Symbol, val)
    if name === Symbol("type")
        Swagger.validate_param(name, "StorageAccountCheckNameAvailabilityParameters", :enum, val, _allowed_StorageAccountCheckNameAvailabilityParameters_type)
    end
end
