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


@doc raw"""TokenRequestSpec contains client provided parameters of a token request.

    IoK8sApiAuthenticationV1TokenRequestSpec(;
        audiences=nothing,
        boundObjectRef=nothing,
        expirationSeconds=nothing,
    )

    - audiences::Vector{String} : Audiences are the intendend audiences of the token. A recipient of a token must identitfy themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.
    - boundObjectRef::IoK8sApiAuthenticationV1BoundObjectReference : BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server&#39;s TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation.
    - expirationSeconds::Int64 : ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the &#39;expiration&#39; field in a response.
"""
mutable struct IoK8sApiAuthenticationV1TokenRequestSpec <: SwaggerModel
    audiences::Any # spec type: Union{ Nothing, Vector{String} } # spec name: audiences
    boundObjectRef::Any # spec type: Union{ Nothing, IoK8sApiAuthenticationV1BoundObjectReference } # spec name: boundObjectRef
    expirationSeconds::Any # spec type: Union{ Nothing, Int64 } # spec name: expirationSeconds

    function IoK8sApiAuthenticationV1TokenRequestSpec(;audiences=nothing, boundObjectRef=nothing, expirationSeconds=nothing)
        o = new()
        validate_property(IoK8sApiAuthenticationV1TokenRequestSpec, Symbol("audiences"), audiences)
        setfield!(o, Symbol("audiences"), audiences)
        validate_property(IoK8sApiAuthenticationV1TokenRequestSpec, Symbol("boundObjectRef"), boundObjectRef)
        setfield!(o, Symbol("boundObjectRef"), boundObjectRef)
        validate_property(IoK8sApiAuthenticationV1TokenRequestSpec, Symbol("expirationSeconds"), expirationSeconds)
        setfield!(o, Symbol("expirationSeconds"), expirationSeconds)
        o
    end
end # type IoK8sApiAuthenticationV1TokenRequestSpec

const _property_map_IoK8sApiAuthenticationV1TokenRequestSpec = Dict{Symbol,Symbol}(Symbol("audiences")=>Symbol("audiences"), Symbol("boundObjectRef")=>Symbol("boundObjectRef"), Symbol("expirationSeconds")=>Symbol("expirationSeconds"))
const _property_types_IoK8sApiAuthenticationV1TokenRequestSpec = Dict{Symbol,String}(Symbol("audiences")=>"Vector{String}", Symbol("boundObjectRef")=>"IoK8sApiAuthenticationV1BoundObjectReference", Symbol("expirationSeconds")=>"Int64")
Base.propertynames(::Type{ IoK8sApiAuthenticationV1TokenRequestSpec }) = collect(keys(_property_map_IoK8sApiAuthenticationV1TokenRequestSpec))
Swagger.property_type(::Type{ IoK8sApiAuthenticationV1TokenRequestSpec }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiAuthenticationV1TokenRequestSpec[name]))}
Swagger.field_name(::Type{ IoK8sApiAuthenticationV1TokenRequestSpec }, property_name::Symbol) =  _property_map_IoK8sApiAuthenticationV1TokenRequestSpec[property_name]

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

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