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


@doc raw"""ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.

    IoK8sApiRbacV1ClusterRole(;
        aggregationRule=nothing,
        apiVersion=nothing,
        kind=nothing,
        metadata=nothing,
        rules=nothing,
    )

    - aggregationRule::IoK8sApiRbacV1AggregationRule : AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.
    - apiVersion::String : APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
    - kind::String : Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    - metadata::IoK8sApimachineryPkgApisMetaV1ObjectMeta : Standard object&#39;s metadata.
    - rules::Vector{IoK8sApiRbacV1PolicyRule} : Rules holds all the PolicyRules for this ClusterRole
"""
mutable struct IoK8sApiRbacV1ClusterRole <: SwaggerModel
    aggregationRule::Any # spec type: Union{ Nothing, IoK8sApiRbacV1AggregationRule } # spec name: aggregationRule
    apiVersion::Any # spec type: Union{ Nothing, String } # spec name: apiVersion
    kind::Any # spec type: Union{ Nothing, String } # spec name: kind
    metadata::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApisMetaV1ObjectMeta } # spec name: metadata
    rules::Any # spec type: Union{ Nothing, Vector{IoK8sApiRbacV1PolicyRule} } # spec name: rules

    function IoK8sApiRbacV1ClusterRole(;aggregationRule=nothing, apiVersion=nothing, kind=nothing, metadata=nothing, rules=nothing)
        o = new()
        validate_property(IoK8sApiRbacV1ClusterRole, Symbol("aggregationRule"), aggregationRule)
        setfield!(o, Symbol("aggregationRule"), aggregationRule)
        validate_property(IoK8sApiRbacV1ClusterRole, Symbol("apiVersion"), apiVersion)
        setfield!(o, Symbol("apiVersion"), apiVersion)
        validate_property(IoK8sApiRbacV1ClusterRole, Symbol("kind"), kind)
        setfield!(o, Symbol("kind"), kind)
        validate_property(IoK8sApiRbacV1ClusterRole, Symbol("metadata"), metadata)
        setfield!(o, Symbol("metadata"), metadata)
        validate_property(IoK8sApiRbacV1ClusterRole, Symbol("rules"), rules)
        setfield!(o, Symbol("rules"), rules)
        o
    end
end # type IoK8sApiRbacV1ClusterRole

const _property_map_IoK8sApiRbacV1ClusterRole = Dict{Symbol,Symbol}(Symbol("aggregationRule")=>Symbol("aggregationRule"), Symbol("apiVersion")=>Symbol("apiVersion"), Symbol("kind")=>Symbol("kind"), Symbol("metadata")=>Symbol("metadata"), Symbol("rules")=>Symbol("rules"))
const _property_types_IoK8sApiRbacV1ClusterRole = Dict{Symbol,String}(Symbol("aggregationRule")=>"IoK8sApiRbacV1AggregationRule", Symbol("apiVersion")=>"String", Symbol("kind")=>"String", Symbol("metadata")=>"IoK8sApimachineryPkgApisMetaV1ObjectMeta", Symbol("rules")=>"Vector{IoK8sApiRbacV1PolicyRule}")
Base.propertynames(::Type{ IoK8sApiRbacV1ClusterRole }) = collect(keys(_property_map_IoK8sApiRbacV1ClusterRole))
Swagger.property_type(::Type{ IoK8sApiRbacV1ClusterRole }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiRbacV1ClusterRole[name]))}
Swagger.field_name(::Type{ IoK8sApiRbacV1ClusterRole }, property_name::Symbol) =  _property_map_IoK8sApiRbacV1ClusterRole[property_name]

function check_required(o::IoK8sApiRbacV1ClusterRole)
    true
end

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