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


@doc raw"""SubjectAccessReviewSpec is a description of the access request.  Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set

    IoK8sApiAuthorizationV1SubjectAccessReviewSpec(;
        extra=nothing,
        groups=nothing,
        nonResourceAttributes=nothing,
        resourceAttributes=nothing,
        uid=nothing,
        user=nothing,
    )

    - extra::Dict{String, Vector{String}} : Extra corresponds to the user.Info.GetExtra() method from the authenticator.  Since that is input to the authorizer it needs a reflection here.
    - groups::Vector{String} : Groups is the groups you&#39;re testing for.
    - nonResourceAttributes::IoK8sApiAuthorizationV1NonResourceAttributes : NonResourceAttributes describes information for a non-resource access request
    - resourceAttributes::IoK8sApiAuthorizationV1ResourceAttributes : ResourceAuthorizationAttributes describes information for a resource access request
    - uid::String : UID information about the requesting user.
    - user::String : User is the user you&#39;re testing for. If you specify \&quot;User\&quot; but not \&quot;Groups\&quot;, then is it interpreted as \&quot;What if User were not a member of any groups
"""
mutable struct IoK8sApiAuthorizationV1SubjectAccessReviewSpec <: SwaggerModel
    extra::Any # spec type: Union{ Nothing, Dict{String, Vector{String}} } # spec name: extra
    groups::Any # spec type: Union{ Nothing, Vector{String} } # spec name: groups
    nonResourceAttributes::Any # spec type: Union{ Nothing, IoK8sApiAuthorizationV1NonResourceAttributes } # spec name: nonResourceAttributes
    resourceAttributes::Any # spec type: Union{ Nothing, IoK8sApiAuthorizationV1ResourceAttributes } # spec name: resourceAttributes
    uid::Any # spec type: Union{ Nothing, String } # spec name: uid
    user::Any # spec type: Union{ Nothing, String } # spec name: user

    function IoK8sApiAuthorizationV1SubjectAccessReviewSpec(;extra=nothing, groups=nothing, nonResourceAttributes=nothing, resourceAttributes=nothing, uid=nothing, user=nothing)
        o = new()
        validate_property(IoK8sApiAuthorizationV1SubjectAccessReviewSpec, Symbol("extra"), extra)
        setfield!(o, Symbol("extra"), extra)
        validate_property(IoK8sApiAuthorizationV1SubjectAccessReviewSpec, Symbol("groups"), groups)
        setfield!(o, Symbol("groups"), groups)
        validate_property(IoK8sApiAuthorizationV1SubjectAccessReviewSpec, Symbol("nonResourceAttributes"), nonResourceAttributes)
        setfield!(o, Symbol("nonResourceAttributes"), nonResourceAttributes)
        validate_property(IoK8sApiAuthorizationV1SubjectAccessReviewSpec, Symbol("resourceAttributes"), resourceAttributes)
        setfield!(o, Symbol("resourceAttributes"), resourceAttributes)
        validate_property(IoK8sApiAuthorizationV1SubjectAccessReviewSpec, Symbol("uid"), uid)
        setfield!(o, Symbol("uid"), uid)
        validate_property(IoK8sApiAuthorizationV1SubjectAccessReviewSpec, Symbol("user"), user)
        setfield!(o, Symbol("user"), user)
        o
    end
end # type IoK8sApiAuthorizationV1SubjectAccessReviewSpec

const _property_map_IoK8sApiAuthorizationV1SubjectAccessReviewSpec = Dict{Symbol,Symbol}(Symbol("extra")=>Symbol("extra"), Symbol("groups")=>Symbol("groups"), Symbol("nonResourceAttributes")=>Symbol("nonResourceAttributes"), Symbol("resourceAttributes")=>Symbol("resourceAttributes"), Symbol("uid")=>Symbol("uid"), Symbol("user")=>Symbol("user"))
const _property_types_IoK8sApiAuthorizationV1SubjectAccessReviewSpec = Dict{Symbol,String}(Symbol("extra")=>"Dict{String, Vector{String}}", Symbol("groups")=>"Vector{String}", Symbol("nonResourceAttributes")=>"IoK8sApiAuthorizationV1NonResourceAttributes", Symbol("resourceAttributes")=>"IoK8sApiAuthorizationV1ResourceAttributes", Symbol("uid")=>"String", Symbol("user")=>"String")
Base.propertynames(::Type{ IoK8sApiAuthorizationV1SubjectAccessReviewSpec }) = collect(keys(_property_map_IoK8sApiAuthorizationV1SubjectAccessReviewSpec))
Swagger.property_type(::Type{ IoK8sApiAuthorizationV1SubjectAccessReviewSpec }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiAuthorizationV1SubjectAccessReviewSpec[name]))}
Swagger.field_name(::Type{ IoK8sApiAuthorizationV1SubjectAccessReviewSpec }, property_name::Symbol) =  _property_map_IoK8sApiAuthorizationV1SubjectAccessReviewSpec[property_name]

function check_required(o::IoK8sApiAuthorizationV1SubjectAccessReviewSpec)
    true
end

function validate_property(::Type{ IoK8sApiAuthorizationV1SubjectAccessReviewSpec }, name::Symbol, val)
end
