>f ddlZddlmZddlmZej Gddej Zej Gddej Zej Gdd ej Z ej Gd d ej Z ej Gd d ej Z ej Gddej Z ej Gddej Z GddZej Gddej ZGddZy)N)Optional)messagesc:eZdZdZeZeZeZy)ApplicationStatuszO An enum to represent the current application status of an entitlement N)__name__ __module__ __qualname____doc__objectENABLEDDISABLEDWARNINGJ/usr/lib/python3/dist-packages/uaclient/entitlements/entitlement_status.pyrrshGxHhGrrceZdZdZdZdZy)ContractStatusz An enum to represent whether a user is entitled to an entitlement (The value of each member is the string that will be used in status output.) yesnoN)rrr r ENTITLED UNENTITLEDrrrrrsHJrrc,eZdZdZeZeZy)ApplicabilityStatuszQ An enum to represent whether an entitlement could apply to this machine N)rrr r r APPLICABLE INAPPLICABLErrrrrsJ8LrrceZdZdZdZdZy)UserFacingAvailabilitya An enum representing whether a service could be available for a machine. 'Availability' means whether a service is available to machines with this architecture, series and kernel. Whether a contract is entitled to use the specific service is determined by the contract level. This enum should only be used in display code, it should not be used in business logic. rrN)rrr r AVAILABLE UNAVAILABLErrrrr)s IKrrceZdZdZdZdZdZy)UserFacingConfigStatusz An enum representing the user-visible config status of Pro system. This enum will be used in display code and will be written to status.json inactiveactivezreboot-requiredN)rrr r INACTIVEACTIVEREBOOTREQUIREDrrrr!r!:s H F&Nrr!c$eZdZdZdZdZdZdZdZy)UserFacingStatusz An enum representing the states we will display in status output. This enum should only be used in display code, it should not be used in business logic. enableddisabledzn/au—warningN) rrr r r%r$rrrrrrr(r(Gs"FHLKGrr(ceZdZdZeZeZeZeZeZ eZ eZ eZ y)CanEnableFailureReasonzK An enum representing the reasons an entitlement can't be enabled. N) rrr r r NOT_ENTITLEDALREADY_ENABLEDrIS_BETAINCOMPATIBLE_SERVICEINACTIVE_REQUIRED_SERVICESACCESS_ONLY_NOT_SUPPORTEDONLY_ACCESS_ONLY_SUPPORTEDrrrr-r-WsE8LhO8LhG!8!' &!'rr-c>eZdZ ddedeej ddfdZy)CanEnableFailureNreasonmessagereturnc ||_||_yNr7r8selfr7r8s r__init__zCanEnableFailure.__init__h   rr;)rrr r-rr NamedMessager?rrrr6r6gs348&(//0  rr6cdeZdZdZeZeZeZeZeZ eZ y)CanDisableFailureReasonzL An enum representing the reasons an entitlement can't be disabled. N) rrr r r ALREADY_DISABLEDNOT_APPLICABLEACTIVE_DEPENDENT_SERVICESPURGE_NOT_SUPPORTEDNOT_FOUND_DEPENDENT_SERVICENO_PURGE_WITHOUT_ORIGINrrrrCrCqs8xXN & ("(($hrrCcTeZdZ ddedeej ddfdZede fdZ y)CanDisableFailureNr7r8r9c ||_||_yr;r<r=s rr?zCanDisableFailure.__init__r@rcJ|jr|jjSdS)N)r8msg)r>s r message_valuezCanDisableFailure.message_values#'<rXs:    TYY   $))  TYY     'TYY '  ' tyy    *TYY *  * 'dii '  ' 8 8r