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


mutable struct UpgradeOperationHistoricalStatusInfoProperties <: SwaggerModel
    runningStatus::Any # spec type: Union{ Nothing, UpgradeOperationHistoryStatus } # spec name: runningStatus
    progress::Any # spec type: Union{ Nothing, RollingUpgradeProgressInfo } # spec name: progress
    error::Any # spec type: Union{ Nothing, ApiError } # spec name: error
    startedBy::Any # spec type: Union{ Nothing, String } # spec name: startedBy
    targetImageReference::Any # spec type: Union{ Nothing, ImageReference } # spec name: targetImageReference
    rollbackInfo::Any # spec type: Union{ Nothing, RollbackStatusInfo } # spec name: rollbackInfo

    function UpgradeOperationHistoricalStatusInfoProperties(;runningStatus=nothing, progress=nothing, error=nothing, startedBy=nothing, targetImageReference=nothing, rollbackInfo=nothing)
        o = new()
        validate_property(UpgradeOperationHistoricalStatusInfoProperties, Symbol("runningStatus"), runningStatus)
        setfield!(o, Symbol("runningStatus"), runningStatus)
        validate_property(UpgradeOperationHistoricalStatusInfoProperties, Symbol("progress"), progress)
        setfield!(o, Symbol("progress"), progress)
        validate_property(UpgradeOperationHistoricalStatusInfoProperties, Symbol("error"), error)
        setfield!(o, Symbol("error"), error)
        validate_property(UpgradeOperationHistoricalStatusInfoProperties, Symbol("startedBy"), startedBy)
        setfield!(o, Symbol("startedBy"), startedBy)
        validate_property(UpgradeOperationHistoricalStatusInfoProperties, Symbol("targetImageReference"), targetImageReference)
        setfield!(o, Symbol("targetImageReference"), targetImageReference)
        validate_property(UpgradeOperationHistoricalStatusInfoProperties, Symbol("rollbackInfo"), rollbackInfo)
        setfield!(o, Symbol("rollbackInfo"), rollbackInfo)
        o
    end
end # type UpgradeOperationHistoricalStatusInfoProperties

const _property_map_UpgradeOperationHistoricalStatusInfoProperties = Dict{Symbol,Symbol}(Symbol("runningStatus")=>Symbol("runningStatus"), Symbol("progress")=>Symbol("progress"), Symbol("error")=>Symbol("error"), Symbol("startedBy")=>Symbol("startedBy"), Symbol("targetImageReference")=>Symbol("targetImageReference"), Symbol("rollbackInfo")=>Symbol("rollbackInfo"))
const _property_types_UpgradeOperationHistoricalStatusInfoProperties = Dict{Symbol,String}(Symbol("runningStatus")=>"UpgradeOperationHistoryStatus", Symbol("progress")=>"RollingUpgradeProgressInfo", Symbol("error")=>"ApiError", Symbol("startedBy")=>"String", Symbol("targetImageReference")=>"ImageReference", Symbol("rollbackInfo")=>"RollbackStatusInfo")
Base.propertynames(::Type{ UpgradeOperationHistoricalStatusInfoProperties }) = collect(keys(_property_map_UpgradeOperationHistoricalStatusInfoProperties))
Swagger.property_type(::Type{ UpgradeOperationHistoricalStatusInfoProperties }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_UpgradeOperationHistoricalStatusInfoProperties[name]))}
Swagger.field_name(::Type{ UpgradeOperationHistoricalStatusInfoProperties }, property_name::Symbol) =  _property_map_UpgradeOperationHistoricalStatusInfoProperties[property_name]

const _allowed_UpgradeOperationHistoricalStatusInfoProperties_startedBy = ["Unknown", "User", "Platform"]

function check_required(o::UpgradeOperationHistoricalStatusInfoProperties)
    true
end

function validate_property(::Type{ UpgradeOperationHistoricalStatusInfoProperties }, name::Symbol, val)
    if name === Symbol("startedBy")
        Swagger.validate_param(name, "UpgradeOperationHistoricalStatusInfoProperties", :enum, val, _allowed_UpgradeOperationHistoricalStatusInfoProperties_startedBy)
    end
end
