+
    =l j%  ã                   óP  € ^ RI t ^ RIHt ^ RIHtHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHtHtHtHt ] P"                  ! ]P$                  ! ]4      4      t ! R R	]4      t ! R
 R]4      t ! R R]4      t ! R R]]	4      tR R ltR R lt]! RR]RR7      tRRRRRRR]RRR R!/tR# )"é    N)ÚList)ÚentitlementsÚutil)ÚAPIEndpoint)ÚAdditionalInfo)ÚUAConfig)Ú
DataObjectÚFieldÚStringDataValueÚ	data_listc                   ó^   a € ] tR t^t o ]! R]RR7      ]! R]RR7      .tV 3R lR ltRtV t	R	# )
ÚReasonÚcodez'Short string that represents the reason©ÚdocÚtitlez9Longer string describing the reason - possibly translatedc                ó&   <€ V ^8„  d   QhRS[ RS[ /# )é   r   r   )Ústr)ÚformatÚ__classdict__s   "€ÚM/usr/lib/python3/dist-packages/uaclient/api/u/pro/services/dependencies/v1.pyÚ__annotate__ÚReason.__annotate__   s   ø€ ÷ ñ ¡ð ©Cñ ó    c               ó   € Wn         W n        R # ©N©r   r   )Úselfr   r   s   &$$r   Ú__init__ÚReason.__init__   s   € ØŒ	ØŽ
r   r   N)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r
   r   Úfieldsr    Ú__static_attributes__Ú__classdictcell__©r   s   @r   r   r      s:   ø‡ € áØØØ9ô	
ñ
 	ØØØKô	
ð€F÷ö r   r   c                   ó^   a € ] tR t^ t o ]! R]RR7      ]! R]RR7      .tV 3R lR ltRt	V t
R	# )
ÚServiceWithReasonÚnameú0Name of the Pro service this item corresponds tor   Úreasonz0Reason that this service is in the list it is inc                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   r,   r.   )r   r   )r   r   s   "€r   r   ÚServiceWithReason.__annotate__.   s   ø€ ÷ ñ ¡ð ©Vñ r   c               ó   € Wn         W n        R # r   ©r,   r.   )r   r,   r.   s   &$$r   r    ÚServiceWithReason.__init__.   s   € ØŒ	ØŽr   r2   N)r"   r#   r$   r%   r
   r   r   r&   r    r'   r(   r)   s   @r   r+   r+       s:   ø‡ € áØØØBô	
ñ
 	ØØØBô	
ð€F÷ö r   r+   c                   óŠ   a € ] tR t^3t o ]! R]RR7      ]! R]! ]4      RR7      ]! R]! ]4      RR7      .tV 3R lR	 lt	R
t
V tR# )ÚServiceWithDependenciesr,   r-   r   Úincompatible_withzkList of Pro services this service is incompatible with. That means they cannot be enabled at the same time.Ú
depends_onzwList of Pro services this service depends on. The services in this list must be enabled for this service to be enabled.c                óL   <€ V ^8„  d   QhRS[ RS[S[,          RS[S[,          /# )r   r,   r6   r7   )r   r   r+   )r   r   s   "€r   r   Ú$ServiceWithDependencies.__annotate__L   s7   ø€ ÷ 	%ñ 	%ñ ð	%ñ  Ñ 1Õ2ð		%ñ
 Ñ*Õ+ñ	%r   c               ó*   € Wn         W n        W0n        R # r   ©r,   r6   r7   )r   r,   r6   r7   s   &$$$r   r    Ú ServiceWithDependencies.__init__L   s   € ð Œ	Ø!2ÔØ$Žr   )r7   r6   r,   N)r"   r#   r$   r%   r
   r   r   r+   r&   r    r'   r(   r)   s   @r   r5   r5   3   s_   ø‡ € áØØØBô	
ñ
 	ØÙÐ'Ó(ðBô		
ñ 	ØÙÐ'Ó(ðPô		
ð€F÷0	%ö 	%r   r5   c                   óV   a € ] tR t^Xt o ]! R]! ]4      RR7      .tV 3R lR ltRt	V t
R# )ÚDependenciesResultÚservicesz*Each Pro service gets an item in this listr   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# )r   r?   )r   r5   )r   r   s   "€r   r   ÚDependenciesResult.__annotate__a   s   ø€ ÷ !ñ !¡DÑ)@Õ$Añ !r   c               ó   € Wn         R # r   ©r?   )r   r?   s   &$r   r    ÚDependenciesResult.__init__a   s   € Ø Žr   rC   N)r"   r#   r$   r%   r
   r   r5   r&   r    r'   r(   r)   s   @r   r>   r>   X   s-   ø‡ € áØÙÐ-Ó.Ø<ô	
ð€F÷!ö !r   r>   c                ó$   € V ^8„  d   QhR\         /# )r   Úreturn)r>   )r   s   "r   r   r   e   s   € ÷ %ñ %Ô(ñ %r   c                  ó(   € \        \        4       4      # r   )Ú_dependenciesr   © r   r   ÚdependenciesrJ   e   s   € Üœ›Ó$Ð$r   c                ó0   € V ^8„  d   QhR\         R\        /# )r   ÚcfgrF   )r   r>   )r   s   "r   r   r   i   s   € ÷ '1ñ '1”xð '1Ô$6ñ '1r   c                óŽ  € . p\         P                   EF#  pV! V 4      p. p. pVP                   Ff  pVP                  \	        VP
                  P                  \        VP                  P                  VP                  P                  R7      R7      4       Kh  	  VP                   Ff  pVP                  \	        VP
                  P                  \        VP                  P                  VP                  P                  R7      R7      4       Kh  	  VP                  \        VP                  VVR7      4       EK&  	  \        VR7      # )zð
This endpoint will return a full list of all service dependencies,
regardless of the current system state. That means it will always return
the same thing until new services are added, or until we add/remove
dependencies between services.
r   r2   r;   rC   )r   ÚENTITLEMENT_CLASSESÚincompatible_servicesÚappendr+   Úentitlementr,   r   Ú	named_msgÚmsgÚrequired_servicesr5   r>   )rL   r?   Úent_clsÚentr6   r7   Úent_with_reasons   &      r   rH   rH   i   s  € ð €HÜ×3Õ3ˆÙ�c‹lˆØÐØˆ
Ø"×8Ô8ˆOØ×$Ñ$Ü!Ø(×4Ñ4×9Ñ9Ü!Ø,×6Ñ6×;Ñ;Ø-×7Ñ7×;Ñ;ôôöñ  9ð  #×4Ô4ˆOØ×ÑÜ!Ø(×4Ñ4×9Ñ9Ü!Ø,×6Ñ6×;Ñ;Ø-×7Ñ7×;Ñ;ôôöñ  5ð 	�‰Ü#Ø—\‘\Ø"3Ø%ô÷	
ñ1 4ô>  xÔ0Ð0r   Úv1ÚServiceDependencies)Úversionr,   ÚfnÚoptions_clsÚintroduced_inÚ32Úrequires_networkFÚexample_pythonz^
from uaclient.api.u.pro.services.dependencies.v1 import dependencies
result = dependencies()
Úresult_classÚexample_cliz&pro api u.pro.services.dependencies.v1Úexample_jsonaË  
{
    "services": [
        {
            "name": "one",
            "depends_on": [
                {
                    "name": "zero",
                    "reason": {
                        "code": "one-and-zero",
                        "title": "Service One requires service Zero."
                    }
                },
                ...
            ],
            "incompatible_with": [
                {
                    "name": "two",
                    "reason": {
                        "code": "one-and-two",
                        "title": "Services One and Two are not compatible."
                    }
                },
                ...
            ]
        },
        ...
    ]
}
)ÚloggingÚtypingr   Úuaclientr   r   Úuaclient.api.apir   Úuaclient.api.data_typesr   Úuaclient.configr   Úuaclient.data_typesr	   r
   r   r   Ú	getLoggerÚreplace_top_level_logger_namer"   ÚLOGr   r+   r5   r>   rJ   rH   ÚendpointÚ_docrI   r   r   Ú<module>rp      s¿   ðÛ Ý ç 'Ý (Ý 2Ý $ß MÓ Mà×Ò˜×:Ò:¸8ÓDÓE€ôˆZô ô&˜
ô ô&"%˜jô "%ôJ
!˜ ^ô 
!õ%õ'1ñT ØØ	ØØô	€ð �TØ˜Øð ð Ð&ØÐ;Øð ð'‚r   