Ë
    eQêjRD  ã                  óæ   — d Z ddlmZ ddlZddlZddlZddlmZ ddl	m
Z
mZmZmZmZmZ ddlmZmZmZmZmZmZ ddlmZ ddlmZmZ dd	lmZ dd
lmZ dZdd„Z dd„Z!dd„Z"dd„Z# G d„ de«      Z$y)a   
    Kubernetes

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

    The version of the OpenAPI document: release-1.37
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
é    )ÚannotationsN)ÚMapping)ÚAliasChoicesÚ	BaseModelÚ
ConfigDictÚFieldÚ	StrictIntÚ	StrictStr)ÚAnyÚClassVarÚDictÚListÚOptionalÚcast)ÚV1LabelSelector)r   ÚSet)ÚSelf)Úto_jsonable_pythonÚ_openapi_generator_to_dictc                óâ   — t        | dd «      }t        t        | «      dd «      }t        |«      rt        |dd «      |ury t        |t        d «      }t        |«      rt        |t        d «      |ury |S )NÚto_dictÚ__func__)ÚgetattrÚtypeÚcallableÚ_OPENAPI_GENERATOR_TO_DICT)Úvaluer   Útype_to_dictÚopenapi_to_dicts       ú{/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/kubernetes/client/models/v1_topology_spread_constraint.pyÚ_get_openapi_to_dictr!       s‚   € ô �e˜Y¨Ó-€GÜœ4 ›;¨	°4Ó8€Lä�WÔÜ�7˜J¨Ó-°\ÑAàäØÔ0°$ó€Oô �_Ô%ÜØÜ&Øó
ð ñ	ð ØÐó    c                ó‚   — t        | dd «      }t        | «      �t        |«      r	 ||¬«      S t        |«      r |«       S | S )Nr   )Ú	serialize)r   r!   r   )r   r$   r   s      r    Ú_to_legacy_itemr%   ;   sB   € Ü�e˜Y¨Ó-€GÜ˜EÓ"Ð.´8¸GÔ3DÙ Ô+Ð+Ü�ÔÙ‹yÐØ€Lr"   c           	     ó   — t        | t        «      r| D �cg c]  }t        ||«      ‘Œ c}S t        | t        «      r.| j	                  «       D ��ci c]  \  }}|t        ||«      “Œ c}}S t        | |«      S c c}w c c}}w )N)Ú
isinstanceÚlistr%   ÚdictÚitems)r   r$   ÚitemÚkeys       r    Ú_to_legacy_valuer-   D   s}   € ô �%œÔØ=BÖC°T”  iÕ0ÒCÐCÜ�%œÔð #Ÿ[™[›]÷
á��Tð ”  yÓ1Ñ1ó
ð 	
ô ˜5 )Ó,Ð,ùò Dùó
s   •A5ÁA:c                óP  — t        | t        «      r| D �cg c]  }t        |«      ‘Œ c}S t        | t        «      r-| j	                  «       D ��ci c]  \  }}|t        |«      “Œ c}}S t        | «      }|� || «      S t        | dd «      }t        |«      r |«       S | S c c}w c c}}w )Nr   )r'   r(   Ú_to_openapi_valuer)   r*   r!   r   r   )r   r+   r,   Úto_openapi_dictr   s        r    r/   r/   Q   s™   € Ü�%œÔØ49Ö:¨DÔ! $Õ'Ò:Ð:Ü�%œÔØ>C¿k¹k»m×L±°°d�Ô& tÓ,Ñ,ÓLÐLä*¨5Ó1€OØÐ"Ù˜uÓ%Ð%ä�e˜Y¨Ó-€GÜ�ÔÙ‹yÐØ€Lùò ;ùãLs   •BÁB"c            	      óž  — e Zd ZU dZ ed edd«      d¬«      Zded<    ed edd«      dd	¬
«      Zded<    e edd«      dd¬«      Z	ded<    ed edd«      dd¬
«      Z
ded<    ed edd«      dd¬
«      Zded<    ed edd«      dd¬
«      Zded<    e edd«      dd¬«      Zded<    e ed d!«      d d"¬«      Zded!<   d#d$d%d%d&d&d&d&d'œZd(ed)<   dddddddd d'œZd(ed*<   g d+¢Zd,ed-<   e	 d<	 	 	 	 	 d=d/„«       Z ed.d.d.d0d1¬2«      Zd>d3„Zd>d4„Zd?d5„Zd?d6„Zd>d7„Zed@d8„«       ZdAdBd9„ZdCd:„Z eeee«        eeee«       [edDd;„«       Z y)EÚV1TopologySpreadConstraintaa  
    TopologySpreadConstraint specifies how to spread matching pods among the given topology.

    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    NÚlabelSelectorÚlabel_selector)ÚdefaultÚvalidation_aliasÚserialization_aliaszOptional[V1LabelSelector]ÚmatchLabelKeysÚmatch_label_keysa¾  MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector.  This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default).)r5   r6   r7   ÚdescriptionzOptional[List[StrictStr]]ÚmaxSkewÚmax_skewaä  MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | |  P P  |  P P  |   P   | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.)r6   r7   r:   r	   Ú
minDomainsÚmin_domainsa�  MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule.  For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | |  P P  |  P P  |  P P  | The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew.zOptional[StrictInt]ÚnodeAffinityPolicyÚnode_affinity_policyaƒ  NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations.  If this value is nil, the behavior is equivalent to the Honor policy.zOptional[StrictStr]ÚnodeTaintsPolicyÚnode_taints_policyaf  NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included.  If this value is nil, the behavior is equivalent to the Ignore policy.ÚtopologyKeyÚtopology_keyax  TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each <key, value> as a "bucket", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. It's a required field.r
   ÚwhenUnsatisfiableÚwhen_unsatisfiablea¬  WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,   but giving higher precedence to topologies that would help reduce the   skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P |   P   |   P   | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.r   z	List[str]ÚintÚstr)r4   r9   r<   r>   r@   rB   rD   rF   zClassVar[Dict[str, str]]Úopenapi_typesÚattribute_map©r3   r8   r;   r=   r?   rA   rC   rE   zClassVar[List[str]]Ú'_V1TopologySpreadConstraint__propertiesTc                ó`  — t        |t        «      s|S t        |«      }d|vrd|v r|d   |d<   |j                  dd «       d|vrd|v r|d   |d<   |j                  dd «       d|vrd|v r|d   |d<   |j                  dd «       d|vrd|v r|d   |d<   |j                  dd «       d	|vrd
|v r|d
   |d	<   |j                  d
d «       d|vrd|v r|d   |d<   |j                  dd «       d|vrd|v r|d   |d<   |j                  dd «       d|vrd|v r|d   |d<   |j                  dd «       |S )Nr3   r4   r8   r9   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   )r'   Ú_Mappingr)   Úpop)ÚclsÚobjÚremove_hidden_storage_namess      r    Ú__preprocess_input_namesz3V1TopologySpreadConstraint.__preprocess_input_namesŠ   s’  € ô ˜#œxÔ(ØˆJÜ�3‹iˆØ #Ñ%Ð*:¸cÑ*AØ#&Ð'7Ñ#8ˆC�Ñ Ø�‰Ð  $Ô'Ø 3Ñ&Ð+=ÀÑ+DØ$'Ð(:Ñ$;ˆCÐ Ñ!Ø�‰Ð" DÔ)Ø˜CÑ J°#Ñ$5Ø  ™_ˆC�	‰NØ�‰�
˜DÔ!Ø˜sÑ" }¸Ñ';Ø # MÑ 2ˆC�ÑØ�‰�˜tÔ$Ø sÑ*Ð/EÈÑ/LØ(+Ð,BÑ(CˆCÐ$Ñ%Ø�‰Ð&¨Ô-Ø SÑ(Ð-AÀSÑ-HØ&)Ð*>Ñ&?ˆCÐ"Ñ#Ø�‰Ð$ dÔ+Ø Ñ#¨¸#Ñ(=Ø!$ ^Ñ!4ˆC�ÑØ�‰� Ô%Ø cÑ)Ð.BÀcÑ.IØ'*Ð+?Ñ'@ˆCÐ#Ñ$Ø�‰Ð$ dÔ+Øˆ
r"   Úforbid© )Úvalidate_by_nameÚvalidate_by_aliasÚvalidate_assignmentÚextraÚprotected_namespacesc                óH   — t        j                  | j                  «       «      S )z.Returns the string representation of the model)ÚpprintÚpformatr   ©Úselfs    r    Úto_strz!V1TopologySpreadConstraint.to_str¶   s   € ä�~‰~˜dŸl™l›nÓ-Ð-r"   c                ó"   — | j                  «       S )zFor print and pprint)r`   r^   s    r    Ú__repr__z#V1TopologySpreadConstraint.__repr__º   s   € à�{‰{‹}Ðr"   c                óf   — t        |t        «      sy| j                  «       |j                  «       k(  S )z&Returns true if both objects are equalF)r'   r2   r   ©r_   Úothers     r    Ú__eq__z!V1TopologySpreadConstraint.__eq__¾   s'   € ä˜%Ô!;Ô<Øà�|‰|‹~ §¡£Ñ0Ð0r"   c                ó0   — t        |t        «      sy| |k(   S )z*Returns true if both objects are not equalT)r'   r2   rd   s     r    Ú__ne__z!V1TopologySpreadConstraint.__ne__Å   s   € ä˜%Ô!;Ô<Øà˜E‘MÐ"Ð"r"   c                ó¼   — t        | «      }|�$t        j                  t         || «      «      «      S t        j                  t        | j	                  «       «      «      S )z8Returns the JSON representation of the model using alias)r!   ÚjsonÚdumpsr   r   )r_   r0   s     r    Úto_jsonz"V1TopologySpreadConstraint.to_jsonÍ   sG   € ä.¨tÓ4ˆØÐ&Ü—:‘:Ô0±ÀÓ1FÓGÓHÐHÜ�z‰zÔ,¨T¯\©\«^Ó<Ó=Ð=r"   c                óJ   — | j                  t        j                  |«      «      S )zCCreate an instance of V1TopologySpreadConstraint from a JSON string)Ú	from_dictrj   Úloads)rP   Újson_strs     r    Ú	from_jsonz$V1TopologySpreadConstraint.from_jsonÔ   s   € ð �}‰}œTŸZ™Z¨Ó1Ó2Ð2r"   c                ó¶  — |rdndt        t        | dd«      |«      |rdndt        t        | dd«      |«      |rdndt        t        | dd«      |«      |rdnd	t        t        | d	d«      |«      |rd
ndt        t        | dd«      |«      |rdndt        t        | dd«      |«      |rdndt        t        | dd«      |«      |rdndt        t        | dd«      |«      iS )z<Return all declared model fields using public or wire names.r3   r4   Nr8   r9   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   )r-   r   )r_   r$   s     r    r   z"V1TopologySpreadConstraint.to_dictÙ   sO  € ñ !*‰_Ð/?ÔBRÔSZÐ[_ÐaqÐswÓSxð  {Dó  CEÙ!*ÑÐ0BÔEUÔV]Ð^bÐdvÐx|ÓV}ð  @Ió  FJÙ#‰Y¨Ô6FÄwÈtÐU_ÐaeÓGfÐhqÓ6rÙ&‰\¨MÔ<LÌWÐUYÐ[hÐjnÓMoÐqzÓ<{Ù%.Ñ!Ð4JÔM]Ô^eÐfjð  mCð  EIó  _Jð  LUó  NVÙ#,ÑÐ2FÔIYÔZaÐbfÐh|ð  Có  [Dð  FOó  JPÙ'‰]¨^Ô>NÌwÐW[Ð]kÐmqÓOrÐt}Ó>~Ù$-Ñ Ð3GÔJZÔ[bÐcgÐi}ð  @Dó  \Eð  GPó  KQð	
ð 		
r"   c                óŒ   — t        g «      }| j                  d|d¬«      }| j                  rt        | j                  «      |d<   |S )ac  Return the dictionary representation of the model using alias.

        This has the following differences from calling pydantic's
        `self.model_dump(by_alias=True)`:

        * `None` is only added to the output dict for nullable fields that
          were set at model initialization. Other fields with value `None`
          are ignored.
        T)Úby_aliasÚexcludeÚexclude_noner3   )ÚsetÚ
model_dumpr4   r/   )r_   Úexcluded_fieldsÚ_dicts      r    Ú%__openapi_generator_modern_projectionz@V1TopologySpreadConstraint.__openapi_generator_modern_projectionæ   sV   € ô %(ð )
ó %ˆð —‘ØØ#Øð  ó 
ˆð ×ÒÜ%6°t×7JÑ7JÓ%KˆE�/Ñ"Øˆr"   c                ó  — |€yt        |t        «      s| j                  |«      S t        t        t
        t        f   | j                  |d¬«      «      }| j                  |j                  d«      �t        j                  |d   «      nd|j                  d«      |j                  d«      |j                  d«      |j                  d«      |j                  d	«      |j                  d
«      |j                  d«      dœ«      }|S )z<Create an instance of V1TopologySpreadConstraint from a dictNT)rR   r3   r8   r;   r=   r?   rA   rC   rE   rK   )r'   r)   Úmodel_validateÚ_castr   rH   r   Ú3_V1TopologySpreadConstraint__preprocess_input_namesÚgetr   rn   )rP   rQ   Ú_objs      r    rn   z$V1TopologySpreadConstraint.from_dict	  sò   € ð ˆ;Øä˜#œtÔ$Ø×%Ñ% cÓ*Ð*äÜ””c�‰NØ×(Ñ(ØØ,0ð )ó ó
ˆð ×!Ñ!ØPS×PWÑPWÐXgÓPhÐPtœ_×6Ñ6°s¸?Ñ7KÔLÐz~Ø!Ÿg™gÐ&6Ó7Ø—w‘w˜yÓ)ØŸ'™' ,Ó/Ø"%§'¡'Ð*>Ó"?Ø #§¡Ð(:Ó ;ØŸ7™7 =Ó1Ø!$§¡Ð)<Ó!=ñ	#
ó 	ˆð ˆr"   )T)rQ   r   rR   ÚboolÚreturnr   )rƒ   rH   )re   Úobjectrƒ   r‚   )rp   rH   rƒ   úOptional[Self])F)r$   r‚   rƒ   úDict[str, Any])rƒ   r†   )rQ   zOptional[Dict[str, Any]]rƒ   r…   )!Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r4   Ú__annotations__r9   r<   r>   r@   rB   rD   rF   rI   rJ   rL   Úclassmethodr   r   Úmodel_configr`   rb   rf   rh   rl   rq   r   Ú@_V1TopologySpreadConstraint__openapi_generator_modern_projectionÚsetattrr   rn   rU   r"   r    r2   r2   a   s¶  … ññ 16¸dÑUaÐbqð  tDó  VEð  [jô  1k€NÐ-ó  kÙ27ÀÑWcÐdtð  wIó  XJð  `pð  ~~ô  3ÐÐ/ó  Ù±¸iÈÓ1TÐjsð  Bhô  i€Hˆió  iÙ',°TÉLÐYeÐgtÓLuð  LXð  f|ô  (}€KÐ$ó  }Ù05¸dÑUaÐbvð  yOó  VPð  fzð  HM	ô  1N	ÐÐ-ó  N	Ù.3¸DÑS_Ð`rð  uIó  TJð  `rð  @hô  /iÐÐ+ó  iÙ#±\À-ÐQ_Ó5`ð  wDð  RRô  S€L�)ó  SÙ$)¹<ÐH[Ð]qÓ;rð  I\ð  j\ô  %]Ð˜	ó  ]à+Ø'ØØØ %Ø#ØØ#ñ	/€MÐ+ó 	ð *Ø,ØØ#Ø 4Ø0Ø%Ø1ñ	/€MÐ+ó 	ò )s€LÐ%ó  sàð -1ð àð ð &*ð ð 
ò	 ó ð ñD ØØØ ØØô€Ló.óó1ó#ó>ð ò3ó ð3ô
óñ. ØØ"Ø-ôñ
 Ø-Ø"Øôð
 	.àòó ñr"   r2   )r   r   rƒ   r   )r   r   r$   r‚   rƒ   r   )%rŠ   Ú
__future__r   r\   Úrerj   Úcollections.abcr   rN   Úpydanticr   r   r   r   r	   r
   Útypingr   r   r   r   r   r   r~   Ú*kubernetes.client.models.v1_label_selectorr   r   Útyping_extensionsr   Úpydantic_corer   r   r!   r%   r-   r/   r2   rU   r"   r    ú<module>r˜      s]   ðñ	õ #Û Û 	Û å /ß U× Uß E× EÝ Fß  Ý "Ý ,ð :Ð óó6ó
-óô C õ Cr"   