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


mutable struct DedicatedHostGroupProperties <: SwaggerModel
    platformFaultDomainCount::Any # spec type: Union{ Nothing, Int32 } # spec name: platformFaultDomainCount
    hosts::Any # spec type: Union{ Nothing, Vector{SubResourceReadOnly} } # spec name: hosts
    instanceView::Any # spec type: Union{ Nothing, DedicatedHostGroupInstanceView } # spec name: instanceView
    supportAutomaticPlacement::Any # spec type: Union{ Nothing, Bool } # spec name: supportAutomaticPlacement

    function DedicatedHostGroupProperties(;platformFaultDomainCount=nothing, hosts=nothing, instanceView=nothing, supportAutomaticPlacement=nothing)
        o = new()
        validate_property(DedicatedHostGroupProperties, Symbol("platformFaultDomainCount"), platformFaultDomainCount)
        setfield!(o, Symbol("platformFaultDomainCount"), platformFaultDomainCount)
        validate_property(DedicatedHostGroupProperties, Symbol("hosts"), hosts)
        setfield!(o, Symbol("hosts"), hosts)
        validate_property(DedicatedHostGroupProperties, Symbol("instanceView"), instanceView)
        setfield!(o, Symbol("instanceView"), instanceView)
        validate_property(DedicatedHostGroupProperties, Symbol("supportAutomaticPlacement"), supportAutomaticPlacement)
        setfield!(o, Symbol("supportAutomaticPlacement"), supportAutomaticPlacement)
        o
    end
end # type DedicatedHostGroupProperties

const _property_map_DedicatedHostGroupProperties = Dict{Symbol,Symbol}(Symbol("platformFaultDomainCount")=>Symbol("platformFaultDomainCount"), Symbol("hosts")=>Symbol("hosts"), Symbol("instanceView")=>Symbol("instanceView"), Symbol("supportAutomaticPlacement")=>Symbol("supportAutomaticPlacement"))
const _property_types_DedicatedHostGroupProperties = Dict{Symbol,String}(Symbol("platformFaultDomainCount")=>"Int32", Symbol("hosts")=>"Vector{SubResourceReadOnly}", Symbol("instanceView")=>"DedicatedHostGroupInstanceView", Symbol("supportAutomaticPlacement")=>"Bool")
Base.propertynames(::Type{ DedicatedHostGroupProperties }) = collect(keys(_property_map_DedicatedHostGroupProperties))
Swagger.property_type(::Type{ DedicatedHostGroupProperties }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_DedicatedHostGroupProperties[name]))}
Swagger.field_name(::Type{ DedicatedHostGroupProperties }, property_name::Symbol) =  _property_map_DedicatedHostGroupProperties[property_name]

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

function validate_property(::Type{ DedicatedHostGroupProperties }, name::Symbol, val)
    if name === Symbol("platformFaultDomainCount")
        Swagger.validate_param(name, "DedicatedHostGroupProperties", :maximum, val, 3, false)
        Swagger.validate_param(name, "DedicatedHostGroupProperties", :minimum, val, 1, false)
    end
end
