
    P                        S r SSKJr  SSKJr  SSKJr  SSKJr  SSKrSSKrSSKJ	r	  SSK
Jr  SS	KJr  SSKr \R                  rS
rSrSrSrSrSrSr\\\\\\4r\S-   r\S-   r\S-   r\S-   r\S-   r\S-   r\S-   r\S-   r \S-   r!\S-   r"\S-   r#\S-   r$\S-   r%\S-   r&\S-   r'\S -   r(\S!-   r)S" r*S# r+S$ r,S% r-\R\                  " \R^                  5       " S& S'\05      5       r1S( r2S) r3 " S* S+\Rh                  5      r5 " S, S-\Rl                  5      r7 " S. S/\Rp                  5      r9 " S0 S1\Rt                  5      r; " S2 S3\75      r< " S4 S5\95      r=g! \ a    \r GNf = f)6z8Utilities for wrapping/dealing with a k8s-style objects.    )absolute_import)division)print_function)unicode_literalsN)messages)	condition)console_attrzserving.knative.devzautoscaling.knative.devzeventing.knative.devzclient.knative.devzcloud.googleapis.comzrun.googleapis.comzrunapps.googleapis.comz/creatorz	/locationz/client-namez/client-versionz/descriptionz/launch-stagez/binary-authorizationz /binary-authorization-breakglassz/execution-environmentz/custom-audiencesz/network-interfacesz/container-dependenciesz/acceleratorz/regionsz/multi-region-idz/gclb-domain-namez/threat-detectionc                     [        U S5      (       a  U R                  $ [        U S5      (       a  U R                  $ [        S5      e)z#Metadta class from messages module.
ObjectMeta(K8sIoApimachineryPkgApisMetaV1ObjectMeta4Provided module does not have a known metadata class)hasattrr   r   
ValueErrorms    ,lib/googlecloudsdk/api_lib/run/k8s_object.pyMetar   T   s?    Q<<q<==555IJJ    c                     [        U S5      (       a  U R                  $ [        U S5      (       a  U R                  $ [        S5      e)z(List Metadta class from messages module.ListMeta&K8sIoApimachineryPkgApisMetaV1ListMetar   )r   r   r   r   r   s    r   r   r   ]   s?    Q
::q:;;333IJJr   c                 $    [        U 5      " U0 UD6$ )z+Make metadata message from messages module.)r   )r   argskwargss      r   MakeMetar   f   s    	a$	!&	!!r   c                     S nS nU R                  5        Vs0 s H%  nU" U5      (       d  M  UR                  U" U5      _M'     nnU " S0 UD6$ s  snf )zProduce an instance of msg_cls, with all sub-messages initialized.

Args:
  msg_cls: A message-class to be instantiated.

Returns:
  An instance of the given class, with all fields initialized blank objects.
c                 R    U R                   (       a  / $ [        U R                  5      $ N)repeatedInitializedInstancemessage_typefields    r   Instance%InitializedInstance.<locals>.Instanceu   s    ~~iu1122r   c                 6    [        U [        R                  5      $ r   )
isinstancer   MessageFieldr"   s    r   IncludeField)InitializedInstance.<locals>.IncludeFieldz   s    eX2233r    )
all_fieldsname)msg_clsr$   r)   r#   r   s        r   r    r    k   sa    3
4
 %%'
'%	e	 "ejj(5/!'  

 
4
s
   AAc                      \ rS rSrSrSr\S4S j5       r\S4S j5       r\S4S j5       r	\S4S j5       r
\S4S	 j5       r\S5S
 j5       rS4S jrS rS rS r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\R.                  S 5       r\S 5       r\R.                  S 5       r\S 5       r\S 5       r\S 5       r\R.                  S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r \S  5       r!\S! 5       r"\"R.                  S" 5       r"\S# 5       r#S4S$ jr$\S% 5       r%\S& 5       r&\S' 5       r'\S( 5       r(\S) 5       r)S* r*\S+ 5       r+S, r,S- r-S. r.S/ r/S0 r0S1 r1S2 r2S3r3g)6KubernetesObject   a  Base class for wrappers around Kubernetes-style Object messages.

Requires subclasses to provide class-level constants KIND for the k8s Kind
field, and API_CATEGORY for the k8s API Category. It infers the API version
from the version of the client object.

Additionally, you can set READY_CONDITION and TERMINAL_CONDITIONS to be the
name of a condition that indicates readiness, and a set of conditions
indicating a steady state, respectively.
ReadyNc                 $    Ub  U$ U R                   $ )z5Returns the passed str if given, else the class KIND.)KIND)clskinds     r   KindKubernetesObject.Kind   s     #411r   c                 $    Ub  U$ U R                   $ )z=Returns the passed str if given, else the class API_CATEGORY.)API_CATEGORY)r5   api_categorys     r   ApiCategoryKubernetesObject.ApiCategory   s     (3<I9I9IIr   c                 .    Uc  U$ SR                  X!5      $ )z4Returns the api version with group prefix if exists.z{}/{}format)r5   api_versionr;   s      r   
ApiVersionKubernetesObject.ApiVersion   s     >>,44r   c                 P    [        X R                  U5      5      nU " U" US9X#5      $ )aX  Produces a wrapped message with only the given spec.

It is meant to be used as part of another message; it will error if you
try to access the metadata or status.

Arguments:
  spec: messages.Message, The spec to include
  messages_mod: the messages module
  kind: str, the resource kind

Returns:
  A new k8s_object with only the given spec.
)spec)getattrr7   )r5   rE   messages_modr6   r.   s        r   SpecOnlyKubernetesObject.SpecOnly   s(     lHHTN3GwD!<66r   c                 |    [        X R                  U5      5      nU " U" UR                  UR                  S9UU5      $ )z;Wraps a template object: spec and metadata only, no status.)rE   metadata)rF   r7   rE   rK   )r5   templaterG   r6   r.   s        r   TemplateKubernetesObject.Template   s=     lHHTN3GX]]X->->? r   c                 *   U R                  U5      nU R                  [        US5      U5      nUR                  nU R	                  U5      n[        [        Xc5      5      n X7l        XWl        X'R                  l
        U " XvU5      $ ! [         a     N%f = f)a  Produces a new wrapped message of the appropriate type.

All the sub-objects in it are recursively initialized to the appropriate
message types, and the kind, apiVersion, and namespace set.

Arguments:
  client: the API client to use
  namespace: str, The namespace to create the object in
  kind: str, the resource kind
  api_category: str, the api group of the resource

Returns:
  The newly created wrapped message.
_VERSION)r<   rB   rF   MESSAGES_MODULEr7   r    r6   
apiVersionAttributeErrorrK   	namespace)r5   clientrT   r6   r;   rA   rG   rets           r   NewKubernetesObject.New   s      ??<0L..!<lKK))L88D>D
gl9
:Ch"n
 'LLs$''   s    B 
BBc                     [        X R                  U5      5      n[        X5      (       d  [        S5      eXl        X l        g )Nz*Oops, trying to wrap wrong kind of message)rF   r7   r'   r   _m	_messages)selfto_wraprG   r6   r.   s        r   __init__KubernetesObject.__init__   s5    lIIdO4Gg''CDDG!Nr   c                     U R                   $ )zReturn the messages module.)r[   r\   s    r   MessagesModuleKubernetesObject.MessagesModule   s    >>r   c                 P    U R                   R                  (       d  [        S5      eg )NzThis instance is spec-only.)rZ   rK   r   ra   s    r   AssertFullObject!KubernetesObject.AssertFullObject   s     77455 r   c                 .    U R                   R                  $ r   rZ   rK   ra   s    r   IsFullObjectKubernetesObject.IsFullObject   s    77r   c                 N    U R                  5         U R                  R                  $ r   )re   rZ   r6   ra   s    r   r6   KubernetesObject.kind   s    77<<r   c                 N    U R                  5         U R                  R                  $ r   )re   rZ   rR   ra   s    r   rR   KubernetesObject.apiVersion   s    77r   c                 .    U R                   R                  $ r   )rZ   rE   ra   s    r   rE   KubernetesObject.spec   s    77<<r   c                 N    U R                  5         U R                  R                  $ r   )re   rZ   statusra   s    r   rr   KubernetesObject.status  s    77>>r   c                 N    U R                  5         U R                  R                  $ r   )re   rZ   rK   ra   s    r   rK   KubernetesObject.metadata  s    77r   c                 $    XR                   l        g r   rh   r\   values     r   rK   ru     s    GGr   c                 b    U R                  5         U R                  R                  R                  $ r   re   rZ   rK   r-   ra   s    r   r-   KubernetesObject.name  s$    77   r   c                 X    U R                  5         XR                  R                  l        g r   rz   rw   s     r   r-   r{     s    !GGr   c                 @    U R                   R                  [        5      $ r   )annotationsgetAUTHOR_ANNOTATIONra   s    r   authorKubernetesObject.author  s     122r   c                 .    U R                   R                  $ r   )rK   creationTimestampra   s    r   creation_timestamp#KubernetesObject.creation_timestamp   s    ==***r   c                 b    U R                  5         U R                  R                  R                  $ r   re   rZ   rK   rT   ra   s    r   rT   KubernetesObject.namespace$  s$    77%%%r   c                 X    U R                  5         XR                  R                  l        g r   r   rw   s     r   rT   r   )  s    !&GGr   c                 b    U R                  5         U R                  R                  R                  $ r   )re   rZ   rK   resourceVersionra   s    r   resource_version!KubernetesObject.resource_version.  $    77+++r   c                     U R                  5         U R                  R                  R                  R	                  S5      $ )N/)re   rZ   rK   selfLinklstripra   s    r   	self_linkKubernetesObject.self_link3  s/    77$$++C00r   c                 b    U R                  5         U R                  R                  R                  $ r   )re   rZ   rK   uidra   s    r   r   KubernetesObject.uid8  s$    77r   c                 b    U R                  5         U R                  R                  R                  $ r   )re   rZ   rK   ownerReferencesra   s    r   ownersKubernetesObject.owners=  r   r   c                 (    [         U R                  ;   $ r   )REGION_LABELlabelsra   s    r   
is_managedKubernetesObject.is_managedB  s    4;;&&r   c                 H    U R                  5         U R                  [           $ r   )re   r   r   ra   s    r   regionKubernetesObject.regionF  s    ;;|$$r   c                 b    U R                  5         U R                  R                  R                  $ r   )re   rZ   rK   
generationra   s    r   r   KubernetesObject.generationK  s$    77&&&r   c                 8    XR                   R                  l        g r   )rZ   rK   r   rw   s     r   r   r   P  s    "'GGr   c                 "    U R                  5       $ r   )GetConditionsra   s    r   
conditionsKubernetesObject.conditionsT  s    r   c           	      H   U R                  5         U R                  R                  (       a!  U R                  R                  R                  nO/ n[        R
                  " UU(       a  UOU R                  [        U R                  R                  SS 5      U R                  5      $ )NobservedGeneration)	re   rZ   rr   r   r   
ConditionsREADY_CONDITIONrF   r   )r\   terminal_conditioncs      r   r   KubernetesObject.GetConditionsX  sq    ww~~
''..
#
#a
a	0d6J6J 4d;	 r   c                 v    U R                  5         [        U R                  U R                  R                  5      $ r   )re   AnnotationsFromMetadatar[   rZ   rK   ra   s    r   r~   KubernetesObject.annotationse  s)    "4>>4773C3CDDr   c                 v    U R                  5         [        U R                  U R                  R                  5      $ r   )re   LabelsFromMetadatar[   rZ   rK   ra   s    r   r   KubernetesObject.labelsj  s)    dnndgg.>.>??r   c                     [        U S5      (       d   eU R                  (       a4  U R                  U R                  ;   a  U R                  U R                     $ g g )Nr   )r   r   r   ra   s    r   ready_condition KubernetesObject.ready_conditiono  sK    4*++++4//4??B__T1122 Cr   c                 j    [        U S5      (       d   eU R                  (       a  U R                  S   $ g )Nr   rr   r   r   ra   s    r   readyKubernetesObject.readyu  s5    4*++++!!(++ r   c                 j    [        U S5      (       d   eU R                  (       a  U R                  S   $ g )Nr   lastTransitionTimer   ra   s    r   last_transition_time%KubernetesObject.last_transition_time{  s6    4*++++!!"677 r   c                 N     UR                  U5        U$ ! [         a    Us $ f = f)zBChoose the best symbol (if it's in this encoding) or an alternate.)encodeUnicodeError)r\   bestaltencodings       r   _PickSymbolKubernetesObject._PickSymbol  s,    
kk(k js    $$c                 (    U R                  5       S   $ )z6Return a symbol summarizing the status of this object.r   )ReadySymbolAndColorra   s    r   ready_symbolKubernetesObject.ready_symbol  s     ##%a((r   c                     [         R                  " 5       R                  5       nU R                  c  U R	                  SSU5      S4$ U R                  (       a  U R	                  SSU5      S4$ g)zAReturn a tuple of ready_symbol and display color for this object.u   ….yellowu   ✔+green)Xred)r	   GetConsoleAttrGetEncodingr   r   )r\   r   s     r   r   $KubernetesObject.ReadySymbolAndColor  sl    
 **,88:Hzz


4c8
D
  
4c8DgMMr   c                     U R                   R                  U R                  U R                  U R                  U R
                  U R                  S9$ )N)r6   rT   r-   r   rR   )r[   ObjectReferencer6   rT   r-   r   rR   ra   s    r   AsObjectReference"KubernetesObject.AsObjectReference  sA    >>))YY..YYHH?? *  r   c                     U R                   $ )z(Return the actual message we've wrapped.rZ   ra   s    r   MessageKubernetesObject.Message  s    77Nr   c                 "    U R                  5       $ r   )r   ra   s    r   MakeSerializable!KubernetesObject.MakeSerializable  s    <<>r   c                     [        U R                  S5      (       a  U R                  R                  " U0 UD6$ [        U R                  U R                  S-   5      " U0 UD6$ )NGoogleCloudRunV1Condition	Condition)r   r[   r   rF   r6   )r\   r   r   s      r   MakeConditionKubernetesObject.MakeCondition  sR    t~~:;;^^55tFvFFT^^TYY%<=tNvNNr   c                 z    [        U[        U 5      5      (       a!  U R                  5       UR                  5       :H  $ g)NF)r'   typer   )r\   others     r   __eq__KubernetesObject.__eq__  s-    %d$$\\^u}}..r   c                 r    SR                  [        U 5      R                  [        U R                  5      5      $ )Nz{}({}))r@   r   __name__reprrZ   ra   s    r   __repr__KubernetesObject.__repr__  s%    ??4:..TWW>>r   )rZ   r[   r   )NN)4r   
__module____qualname____firstlineno____doc__r   classmethodr7   r<   rB   rH   rM   rW   r^   rb   re   ri   propertyr6   rR   rE   rr   rK   setterr-   r   r   rT   r   r   r   r   r   r   r   r   r   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   __static_attributes__r+   r   r   r0   r0      s   	 /2 2 J J 5 5 7 7"   ( (<"
6
           ??  ! ! ;;" " 3 3 + + & & ' ' , , 1 1     , , ' ' % % ' ' ( (     E E @ @ 3 3
 , ,
 8 8
 ) ) O
?r   r0   c                     UR                   (       d  [        U 5      R                  5       Ul         [        UR                   R                  [        U 5      R                  R
                  SSS9$ Nkeyrx   )	key_fieldvalue_field)r~   r   AnnotationsValueKeyValueListAsDictionaryWrapperadditionalPropertiesAdditionalPropertyrG   rK   s     r   r   r     sW    			->>@H	(//
<))<<	
 r   c                     UR                   (       d  [        U 5      R                  5       Ul         [        UR                   R                  [        U 5      R                  R
                  SSS9$ r   )r   r   LabelsValuer  r  r  r  s     r   r   r     sR    	<(446HO	(oo**
<$$77	
 r   c                   <    \ rS rSrSrS rS rS rS rS r	S r
S	rg
)LazyListWrapperi  ar  Wraps a list that does not exist at object creation time.

We sometimes have a need to allow access to a list property of a nested
message, when we're not sure if all the layers above the list exist yet.
We want to arrange it so that when you write to the list, all the above
messages are lazily created.

When you create a LazyListWrapper, you pass in a create function, which
must do whatever setup you need to do, and then return the list that it
creates in an underlying message.

As soon as you start adding items to the LazyListWrapper, it will do the
setup for you. Until then, it won't create any underlying messages.
c                     Xl         S U l        g r   _create_l)r\   creates     r   r^   LazyListWrapper.__init__  s    LDGr   c                 V    U R                   (       a  U R                   U   $ [        5       er   r  
IndexErrorr\   is     r   __getitem__LazyListWrapper.__getitem__  s    wwWWQZ
,r   c                 d    U R                   c  U R                  5       U l         X R                   U'   g r   )r  r  r\   r  vs      r   __setitem__LazyListWrapper.__setitem__  s#    wwdgGGAJr   c                 T    U R                   (       a  U R                   U	 g [        5       er   r  r  s     r   __delitem__LazyListWrapper.__delitem__  s    ww
''!*Lr   c                 P    U R                   (       a  [        U R                   5      $ g)Nr   )r  lenra   s    r   __len__LazyListWrapper.__len__  s    ww\r   c                 ~    U R                   c  U R                  5       U l         U R                   R                  X5        g r   )r  r  insertr  s      r   r%  LazyListWrapper.insert  s(    wwdgGGNN1r   r  N)r   r   r   r   r   r^   r  r  r  r"  r%  r   r+   r   r   r
  r
    s%    


r   r
  c                   ^    \ rS rSrSrSS jrS rS rS rS r	S	 r
S
 rS rS rS rS rSrg)ListAsDictionaryWrapperi  zWraps repeated messages field with name in a dict-like object.

Operations in these classes are O(n) for simplicity. This needs to match the
live state of the underlying list of messages, including edits made by others.
Nc                 >    Xl         X l        U=(       d    S U l        g)a  Wraps list of messages to be accessible as a read-only dictionary.

Arguments:
  to_wrap: List[Message], List of messages to treat as a dictionary.
  key_field: attribute to use as the keys of the dictionary
  filter_func: filter function to allow only considering certain messages
    from the wrapped list. This function should take a message as its only
    argument and return True if this message should be included.
c                     g)NTr+   )_s    r   <lambda>2ListAsDictionaryWrapper.__init__.<locals>.<lambda>  s    Tr   N)rZ   
_key_field_filter)r\   r]   r   filter_funcs       r   r^    ListAsDictionaryWrapper.__init__	  s     GO2>DLr   c                 \    U R                  5        H  u  p#X!:X  d  M  Us  $    [        U5      e)z%Implements evaluation of `self[key]`.)itemsKeyError)r\   r   kitems       r   r  #ListAsDictionaryWrapper.__getitem__  s*    ::<	
   3-r   c                 6   [        X R                  U5        [        U R                  5       HO  u  p4[	        X@R                  5      U:X  d  M   U R                  U5      (       d  [        U5      eX R                  U'     g    U R                  R                  U5        g r   )setattrr.  	enumeraterZ   rF   r/  r4  append)r\   r   rx   indexr6  s        r   r  #ListAsDictionaryWrapper.__setitem__  so    E??C( )		'3	.||D!!
 * 	GGNN5r   c                 
   U R                    HA  n[        X0R                  5      U:X  d  M  U R                  U5      (       d  [	        U5      eUs  $    [        X R                  U5        U R                   R                  U5        U$ r   )rZ   rF   r.  r/  r4  r9  r;  )r\   r   defaultr6  s       r   
setdefault"ListAsDictionaryWrapper.setdefault(  sd    		'3	.||D!!
	 
 G__c*GGNN7Nr   c                     Sn[        U R                  5       H8  u  p4[        X@R                  5      U:X  d  M   U R	                  U5      (       a  Un  O   Uc  [        U5      eU R                  U	 g)z)Implements evaluation of `del self[key]`.N)r:  rZ   rF   r.  r/  r4  )r\   r   index_to_deleter<  r6  s        r   r  #ListAsDictionaryWrapper.__delitem__2  sb    O )		'3	.<<!/	 *
 SM r   c                 B    [        S U R                  5        5       5      $ )z%Implements evaluation of `len(self)`.c              3   &   #    U  H  nS v   M	     g7f)   Nr+   ).0r+  s     r   	<genexpr>2ListAsDictionaryWrapper.__len__.<locals>.<genexpr>@  s     ',Qq,s   )sumr3  ra   s    r   r"  ListAsDictionaryWrapper.__len__>  s    '$**,'''r   c                 0    S U R                  5        5       $ )z.Returns a generator yielding the message keys.c              3   *   #    U  H	  oS    v   M     g7f)r   Nr+   )rH  r6  s     r   rI  3ListAsDictionaryWrapper.__iter__.<locals>.<genexpr>D  s     -Gs   )r3  ra   s    r   __iter__ ListAsDictionaryWrapper.__iter__B  s    -

--r   c                     U R                   $ r   r   ra   s    r   r   (ListAsDictionaryWrapper.MakeSerializableF  s    77Nr   c                     SR                  [        U 5      R                  SR                  S U R	                  5        5       5      5      $ )Nz{}{{{}}}z, c              3   H   #    U  H  u  pS R                  X5      v   M     g7f)z{}: {}Nr?   )rH  r5  r  s      r   rI  3ListAsDictionaryWrapper.__repr__.<locals>.<genexpr>L  s     ALDA(//!''Ls    ")r@   r   r   joinr3  ra   s    r   r    ListAsDictionaryWrapper.__repr__I  s:    T
		ADJJLAA r   c                     [        U SS9$ )N none_key)ListItemsViewra   s    r   r3  ListAsDictionaryWrapper.itemsO  s    ++r   c                     [        U 5      $ r   )ListValuesViewra   s    r   valuesListAsDictionaryWrapper.valuesR  s    $r   )r/  r.  rZ   )r-   N)r   r   r   r   r   r^   r  r  r@  r  r"  rP  r   r   r3  ra  r   r+   r   r   r(  r(    s>    3
!(., r   r(  c                   :   ^  \ rS rSrSrSS.U 4S jjrS rSrU =r$ )r]  iV  z*Item iterator for ListAsDictionaryWrapper.Nr[  c                2   > [         TU ]  " U0 UD6  Xl        g r   )superr^   	_none_key)r\   r\  r   r   	__class__s       r   r^   ListItemsView.__init__Y  s    	Gd%f%Nr   c              #      #    U R                   R                   HX  nU R                   R                  U5      (       d  M%  [        XR                   R                  5      nUc  U R
                  nX!4v   MZ     g 7fr   )_mappingrZ   r/  rF   r.  rf  )r\   r6  r   s      r   rP  ListItemsView.__iter__]  sX       			t	$	$dMM445;#k !s
   8A68A6)rf  )	r   r   r   r   r   r^   rP  r   __classcell__rg  s   @r   r]  r]  V  s    2%)   r   r]  c                        \ rS rSrS rS rSrg)r`  if  c                 6    [        U 5       H
  nX!:X  d  M
    g   g)NTF)iter)r\   rx   r  s      r   __contains__ListValuesView.__contains__h  s    $Z	
  r   c              #   Z   #    U R                   R                  5        H	  u  pUv   M     g 7fr   )rj  r3  )r\   r+  rx   s      r   rP  ListValuesView.__iter__n  s#     MM'')k *s   )+r+   N)r   r   r   r   rq  rP  r   r+   r   r   r`  r`  f  s    r   r`  c                   T   ^  \ rS rSrSr   SU 4S jjrU 4S jrU 4S jrS rSr	U =r
$ )	r  is  a  Wraps repeated messages field with name and value in a dict-like object.

Properties which resemble dictionaries (e.g. environment variables, build
template arguments) are represented in the underlying messages fields as a
list of objects, each of which has a name and value field. This class wraps
that list in a dict-like object that can be used to mutate the underlying
fields in a more Python-idiomatic way.
c                 B   > [         [        U ]  XUS9  X l        X@l        g)a  Wrap a list of messages to be accessible as a dictionary.

Arguments:
  to_wrap: List[Message], List of messages to treat as a dictionary.
  item_class: type of the underlying Message objects
  key_field: attribute to use as the keys of the dictionary
  value_field: attribute to use as the values of the dictionary
  filter_func: filter function to allow only considering certain messages
    from the wrapped list. This function should take a message as its only
    argument and return True if this message should be included.
)r   r0  N)re  r  r^   _item_class_value_field)r\   r]   
item_classr   r  r0  rg  s         r   r^   (KeyValueListAsDictionaryWrapper.__init__}  s-    & 

)49+ :  "#r   c                 t   > [         [        U ]  XR                  5       5      n[	        X0R
                  U5        g)a  Implements evaluation of `self[key] = value`.

Args:
  key: value of the key field
  value: value of the value field

Raises:
  KeyError: if a message with the same key value already exists, but is
    hidden by the filter func, this is raised to prevent accidental
    overwrites
N)re  r  r@  rw  r9  rx  )r\   r   rx   r6  rg  s       r   r  +KeyValueListAsDictionaryWrapper.__setitem__  s5     0$BD D##U+r   c                    > U R                   " S0 U R                  U0D6n[        [        U ]  X5      n[        X@R                  5      $ )Nr+   )rw  rx  re  r  r@  rF   )r\   r   r?  default_itemr6  rg  s        r   r@  *KeyValueListAsDictionaryWrapper.setdefault  sI    ##Ct'8'8'&BCL0$BD 4**++r   c                     [        U 5      $ r   )KeyValueListItemsViewra   s    r   r3  %KeyValueListAsDictionaryWrapper.items  s     &&r   )rw  rx  )r-   rx   N)r   r   r   r   r   r^   r  r@  r3  r   rl  rm  s   @r   r  r  s  s,     $2,",' 'r   r  c                   (   ^  \ rS rSrU 4S jrSrU =r$ )r  i  c              #      >#    [         [        U ]  5        H(  u  pU[        X R                  R
                  5      4v   M*     g 7fr   )re  r  rP  rF   rj  rx  )r\   r   r6  rg  s      r   rP  KeyValueListItemsView.__iter__  s8     0$@B	'$ : :;<< Cs   A Ar+   )r   r   r   r   rP  r   rl  rm  s   @r   r  r    s    = =r   r  )>r   
__future__r   r   r   r   abccollectionsapitools.base.protorpcliter   googlecloudsdk.api_lib.runr   googlecloudsdk.core.consoler	   sixcollections_abcrS   SERVING_GROUPAUTOSCALING_GROUPEVENTING_GROUPCLIENT_GROUPGOOGLE_GROUP	RUN_GROUPRUNAPPS_GROUPINTERNAL_GROUPSr   r   CLIENT_NAME_ANNOTATIONCLIENT_VERSION_ANNOTATIONDESCRIPTION_ANNOTATIONLAUNCH_STAGE_ANNOTATIONBINAUTHZ_POLICY_ANNOTATIONBINAUTHZ_BREAKGLASS_ANNOTATION EXECUTION_ENVIRONMENT_ANNOTATIONCUSTOM_AUDIENCES_ANNOTATIONNETWORK_INTERFACES_ANNOTATION!CONTAINER_DEPENDENCIES_ANNOTATIONGPU_TYPE_NODE_SELECTORMULTI_REGION_REGIONS_ANNOTATIONMULTI_REGION_ID_LABELGCLB_DOMAIN_NAME_ANNOTATIONTHREAT_DETECTION_ANNOTATIONr   r   r   r    add_metaclassABCMetaobjectr0   r   r   MutableSequencer
  MutableMappingr(  	ItemsViewr]  
ValuesViewr`  r  r  r+   r   r   <module>r     s   ? &  % ' 
  / 0 4 
 OO/
 &- '#% 	(  "J. k)"^3 %(99 "^3 #o5 &)@@ !*-O!O #,/G#G  '*==  ),A A $-0I$I !"^3 "+j"8 !$66 +.AA '*== KK"
4 3;;t?v t?  t?n	,o55 ,^Q o<< Q hO--  
_// 
<'&= <'~=M =c   / s   E E$#E$