
    P                        d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlZddlZddlm	Z	 ddl
mZ dd	lmZ ddlZ	 ej                  Zd
ZdZdZdZdZdZdZeeeeeefZedz   Zedz   Zedz   Zedz   Zedz   Zedz   Zedz   Zedz   Z edz   Z!edz   Z"edz   Z#edz   Z$edz   Z%edz   Z&edz   Z'ed z   Z(ed!z   Z)d" Z*d# Z+d$ Z,d% Z- ej\                  ej^                         G d& d'e0             Z1d( Z2d) Z3 G d* d+ejh                        Z5 G d, d-ejl                        Z7 G d. d/ejp                        Z9 G d0 d1ejt                        Z; G d2 d3e7      Z< G d4 d5e9      Z=y# e$ r eZY w xY w)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                 x    t        | d      r| j                  S t        | d      r| j                  S t        d      )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   s9    Q<<q<=555IJJ    c                 x    t        | d      r| j                  S t        | d      r| j                  S t        d      )z(List Metadta class from messages module.ListMeta&K8sIoApimachineryPkgApisMetaV1ListMetar   )r   r   r   r   r   s    r   r   r   ]   s9    Q
::q:;333IJJr   c                 $     t        |       |i |S )z+Make metadata message from messages module.)r   )r   argskwargss      r   MakeMetar   f   s    	a$	!&	!!r   c                     d }d }| j                         D ci c]  } ||      r|j                   ||       }} | di |S c c}w )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                 H    | j                   rg S t        | j                        S N)repeatedInitializedInstancemessage_typefields    r   Instancez%InitializedInstance.<locals>.Instanceu   s    ~~iu1122r   c                 6    t        | t        j                        S r   )
isinstancer   MessageFieldr"   s    r   IncludeFieldz)InitializedInstance.<locals>.IncludeFieldz   s    eX2233r    )
all_fieldsname)msg_clsr$   r(   r#   r   s        r   r    r    k   s_    3
4
 %%'
'%	e	 jj(5/!'  

 
4
s   "Ac                      e Zd ZdZdZed2d       Zed2d       Zed2d       Zed2d       Z	ed2d       Z
ed3d	       Zd2d
Zd Zd Zd Zed        Zed        Zed        Zed        Zed        Zej,                  d        Zed        Zej,                  d        Zed        Zed        Zed        Zej,                  d        Zed        Zed        Zed        Zed        Zed        Zed        Z ed         Z!e!j,                  d!        Z!ed"        Z"d2d#Z#ed$        Z$ed%        Z%ed&        Z&ed'        Z'ed(        Z(d) Z)ed*        Z*d+ Z+d, Z,d- Z-d. Z.d/ Z/d0 Z0d1 Z1y)4KubernetesObjecta  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                 "    ||S | j                   S )z5Returns the passed str if given, else the class KIND.)KIND)clskinds     r   KindzKubernetesObject.Kind   s     #411r   c                 "    ||S | j                   S )z=Returns the passed str if given, else the class API_CATEGORY.)API_CATEGORY)r2   api_categorys     r   ApiCategoryzKubernetesObject.ApiCategory   s     (3<I9I9IIr   c                 .    ||S dj                  ||      S )z4Returns the api version with group prefix if exists.z{}/{}format)r2   api_versionr7   s      r   
ApiVersionzKubernetesObject.ApiVersion   s!     >>,44r   c                 Z    t        || j                  |            } |  ||      ||      S )a|  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)getattrr4   )r2   r?   messages_modr3   r,   s        r   SpecOnlyzKubernetesObject.SpecOnly   s,     lCHHTN3GwD!<66r   c                     t        || j                  |            } |  ||j                  |j                        ||      S )z;Wraps a template object: spec and metadata only, no status.)r?   metadata)r@   r4   r?   rD   )r2   templaterA   r3   r,   s        r   TemplatezKubernetesObject.Template   s?     lCHHTN3GX]]X->->? r   c                 2   | j                  |      }| j                  t        |d      |      }|j                  }| j	                  |      }t        t        ||            }	 ||_        ||_        ||j                  _
         | |||      S # t        $ r Y &w xY w)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)r8   r=   r@   MESSAGES_MODULEr4   r    r3   
apiVersionAttributeErrorrD   	namespace)r2   clientrL   r3   r7   r<   rA   rets           r   NewzKubernetesObject.New   s      ??<0L..!<lKK))L88D>D
glD9
:Cch"cn
 'CLLsL$''   s   !B
 
	BBc                     t        || j                  |            }t        ||      st        d      || _        || _        y )Nz*Oops, trying to wrap wrong kind of message)r@   r4   r&   r   _m	_messages)selfto_wraprA   r3   r,   s        r   __init__zKubernetesObject.__init__   s:    lDIIdO4Ggw'CDDDG!DNr   c                     | j                   S )zReturn the messages module.)rR   rS   s    r   MessagesModulezKubernetesObject.MessagesModule   s    >>r   c                 F    | j                   j                  st        d      y )NzThis instance is spec-only.)rQ   rD   r   rW   s    r   AssertFullObjectz!KubernetesObject.AssertFullObject   s     77455 r   c                 .    | j                   j                  S r   rQ   rD   rW   s    r   IsFullObjectzKubernetesObject.IsFullObject   s    77r   c                 N    | j                          | j                  j                  S r   )rZ   rQ   r3   rW   s    r   r3   zKubernetesObject.kind   s    77<<r   c                 N    | j                          | j                  j                  S r   )rZ   rQ   rJ   rW   s    r   rJ   zKubernetesObject.apiVersion   s    77r   c                 .    | j                   j                  S r   )rQ   r?   rW   s    r   r?   zKubernetesObject.spec   s    77<<r   c                 N    | j                          | j                  j                  S r   )rZ   rQ   statusrW   s    r   rb   zKubernetesObject.status  s    77>>r   c                 N    | j                          | j                  j                  S r   )rZ   rQ   rD   rW   s    r   rD   zKubernetesObject.metadata  s    77r   c                 &    || j                   _        y r   r\   rS   values     r   rD   zKubernetesObject.metadata  s    DGGr   c                 b    | j                          | j                  j                  j                  S r   rZ   rQ   rD   r+   rW   s    r   r+   zKubernetesObject.name  s$    77   r   c                 Z    | j                          || j                  j                  _        y r   rh   re   s     r   r+   zKubernetesObject.name  s     !DGGr   c                 @    | j                   j                  t              S r   )annotationsgetAUTHOR_ANNOTATIONrW   s    r   authorzKubernetesObject.author  s     122r   c                 .    | j                   j                  S r   )rD   creationTimestamprW   s    r   creation_timestampz#KubernetesObject.creation_timestamp   s    ==***r   c                 b    | j                          | j                  j                  j                  S r   rZ   rQ   rD   rL   rW   s    r   rL   zKubernetesObject.namespace$  s$    77%%%r   c                 Z    | j                          || j                  j                  _        y r   rs   re   s     r   rL   zKubernetesObject.namespace)  s     !&DGGr   c                 b    | j                          | j                  j                  j                  S r   )rZ   rQ   rD   resourceVersionrW   s    r   resource_versionz!KubernetesObject.resource_version.  $    77+++r   c                     | j                          | j                  j                  j                  j	                  d      S )N/)rZ   rQ   rD   selfLinklstriprW   s    r   	self_linkzKubernetesObject.self_link3  s/    77$$++C00r   c                 b    | j                          | j                  j                  j                  S r   )rZ   rQ   rD   uidrW   s    r   r   zKubernetesObject.uid8  s$    77r   c                 b    | j                          | j                  j                  j                  S r   )rZ   rQ   rD   ownerReferencesrW   s    r   ownerszKubernetesObject.owners=  rx   r   c                 &    t         | j                  v S r   )REGION_LABELlabelsrW   s    r   
is_managedzKubernetesObject.is_managedB  s    4;;&&r   c                 H    | j                          | j                  t           S r   )rZ   r   r   rW   s    r   regionzKubernetesObject.regionF  s    ;;|$$r   c                 b    | j                          | j                  j                  j                  S r   )rZ   rQ   rD   
generationrW   s    r   r   zKubernetesObject.generationK  s$    77&&&r   c                 :    || j                   j                  _        y r   )rQ   rD   r   re   s     r   r   zKubernetesObject.generationP  s    "'DGGr   c                 "    | j                         S r   )GetConditionsrW   s    r   
conditionszKubernetesObject.conditionsT  s    r   c           	      2   | j                          | j                  j                  r!| j                  j                  j                  }ng }t	        j
                  ||r|n| j                  t        | j                  j                  dd       | j                        S )NobservedGeneration)	rZ   rQ   rb   r   r   
ConditionsREADY_CONDITIONr@   r   )rS   terminal_conditioncs      r   r   zKubernetesObject.GetConditionsX  sq    ww~~
''..
#
#a
a	0d6J6J 4d;	 r   c                 v    | j                          t        | j                  | j                  j                        S r   )rZ   AnnotationsFromMetadatarR   rQ   rD   rW   s    r   rk   zKubernetesObject.annotationse  s)    "4>>4773C3CDDr   c                 v    | j                          t        | j                  | j                  j                        S r   )rZ   LabelsFromMetadatarR   rQ   rD   rW   s    r   r   zKubernetesObject.labelsj  s)    dnndgg.>.>??r   c                     t        | d      sJ | j                  r2| j                  | j                  v r| j                  | j                     S y y )Nr   )r   r   r   rW   s    r   ready_conditionz KubernetesObject.ready_conditiono  sH    4*+++4//4??B__T1122 Cr   c                 V    t        | d      sJ | j                  r| j                  d   S y )Nr   rb   r   r   rW   s    r   readyzKubernetesObject.readyu  s2    4*+++!!(++ r   c                 V    t        | d      sJ | j                  r| j                  d   S y )Nr   lastTransitionTimer   rW   s    r   last_transition_timez%KubernetesObject.last_transition_time{  s3    4*+++!!"677 r   c                 L    	 |j                  |       |S # t        $ r |cY S w xY w)zBChoose the best symbol (if it's in this encoding) or an alternate.)encodeUnicodeError)rS   bestaltencodings       r   _PickSymbolzKubernetesObject._PickSymbol  s,    
kk(k js    ##c                 (    | j                         d   S )z6Return a symbol summarizing the status of this object.r   )ReadySymbolAndColorrW   s    r   ready_symbolzKubernetesObject.ready_symbol  s     ##%a((r   c                     t        j                         j                         }| j                  | j	                  dd|      dfS | j                  r| j	                  dd|      dfS y)zAReturn a tuple of ready_symbol and display color for this object.u   ….yellowu   ✔+green)Xred)r	   GetConsoleAttrGetEncodingr   r   )rS   r   s     r   r   z$KubernetesObject.ReadySymbolAndColor  sl    
 **,88:Hzz


4c8
D
  
4c8DgMMr   c                     | j                   j                  | j                  | j                  | j                  | j
                  | j                        S )N)r3   rL   r+   r   rJ   )rR   ObjectReferencer3   rL   r+   r   rJ   rW   s    r   AsObjectReferencez"KubernetesObject.AsObjectReference  sA    >>))YY..YYHH?? *  r   c                     | j                   S )z(Return the actual message we've wrapped.rQ   rW   s    r   MessagezKubernetesObject.Message  s    77Nr   c                 "    | j                         S r   )r   rW   s    r   MakeSerializablez!KubernetesObject.MakeSerializable  s    <<>r   c                     t        | j                  d      r | j                  j                  |i |S  t        | j                  | j                  dz         |i |S )NGoogleCloudRunV1Condition	Condition)r   rR   r   r@   r3   )rS   r   r   s      r   MakeConditionzKubernetesObject.MakeCondition  sS    t~~:;5T^^55tFvFF=WT^^TYY%<=tNvNNr   c                 p    t        |t        |             r!| j                         |j                         k(  S y)NF)r&   typer   )rS   others     r   __eq__zKubernetesObject.__eq__  s*    %d$\\^u}}..r   c                 r    dj                  t        |       j                  t        | j                              S )Nz{}({}))r;   r   __name__reprrQ   rW   s    r   __repr__zKubernetesObject.__repr__  s%    ??4:..TWW>>r   r   )NN)2r   
__module____qualname____doc__r   classmethodr4   r8   r=   rB   rF   rO   rU   rX   rZ   r]   propertyr3   rJ   r?   rb   rD   setterr+   rn   rq   rL   rw   r}   r   r   r   r   r   r   r   rk   r   r   r   r   r   r   r   r   r   r   r   r   r   r)   r   r   r.   r.      s   	 /2 2 J J 5 5 7 7"   ( (<"
6
           ??  ! ! ;;" " 3 3 + + & & ' ' , , 1 1     , , ' ' % % ' ' ( (     E E @ @ 3 3
 , ,
 8 8
 ) ) O
?r   r.   c                     |j                   st        |       j                         |_         t        |j                   j                  t        |       j                  j
                  dd      S Nkeyrf   )	key_fieldvalue_field)rk   r   AnnotationsValueKeyValueListAsDictionaryWrapperadditionalPropertiesAdditionalPropertyrA   rD   s     r   r   r     sW    			->>@H	(//
<))<<	
 r   c                     |j                   st        |       j                         |_         t        |j                   j                  t        |       j                  j
                  dd      S r   )r   r   LabelsValuer   r   r   r   s     r   r   r     sR    	<(446HO	(oo**
<$$77	
 r   c                   4    e Zd ZdZd Zd Zd Zd Zd Zd Z	y)	LazyListWrappera  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                      || _         d | _        y r   )_create_l)rS   creates     r   rU   zLazyListWrapper.__init__  s    DLDGr   c                 L    | j                   r| j                   |   S t               r   r   
IndexErrorrS   is     r   __getitem__zLazyListWrapper.__getitem__  s    wwWWQZ
,r   c                 d    | j                   | j                         | _         || j                   |<   y r   )r   r   rS   r   vs      r   __setitem__zLazyListWrapper.__setitem__  s%    wwdgDGGAJr   c                 J    | j                   r| j                   |= y t               r   r   r   s     r   __delitem__zLazyListWrapper.__delitem__  s    ww
''!*Lr   c                 F    | j                   rt        | j                         S y)Nr   )r   lenrW   s    r   __len__zLazyListWrapper.__len__  s    ww\r   c                 ~    | j                   | j                         | _         | j                   j                  ||       y r   )r   r   insertr   s      r   r   zLazyListWrapper.insert  s*    wwdgGGNN1ar   N)
r   r   r   r   rU   r   r   r   r   r   r)   r   r   r   r     s%    


r   r   c                   T    e Zd ZdZddZd Zd Zd Zd Zd Z	d	 Z
d
 Zd Zd Zd Zy)ListAsDictionaryWrapperzWraps 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                 8    || _         || _        |xs d | _        y)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                      y)NTr)   )_s    r   <lambda>z2ListAsDictionaryWrapper.__init__.<locals>.<lambda>  s    Tr   N)rQ   
_key_field_filter)rS   rT   r   filter_funcs       r   rU   z ListAsDictionaryWrapper.__init__	  s     DGDO2>DLr   c                 Z    | j                         D ]  \  }}||k(  s|c S  t        |      )z%Implements evaluation of `self[key]`.)itemsKeyError)rS   r   kitems       r   r   z#ListAsDictionaryWrapper.__getitem__  s.    ::<4	
c   3-r   c                 .   t        || j                  |       t        | j                        D ]K  \  }}t	        || j                        |k(  s | j                  |      st        |      || j                  |<    y  | j                  j                  |       y r   )setattrr   	enumeraterQ   r@   r   r   append)rS   r   rf   indexr   s        r   r   z#ListAsDictionaryWrapper.__setitem__  st    E4??C( )t	t	'3	.||D!
 * 	GGNN5r   c                     | j                   D ];  }t        || j                        |k(  s| j                  |      st	        |      |c S  t        || j                  |       | j                   j                  |       |S r   )rQ   r@   r   r   r   r   r  )rS   r   defaultr   s       r   
setdefaultz"ListAsDictionaryWrapper.setdefault(  se    	t	'3	.||D!
	 
 GT__c*GGNN7Nr   c                     d}t        | j                        D ]3  \  }}t        || j                        |k(  s | j	                  |      r|} n |t        |      | j                  |= y)z)Implements evaluation of `del self[key]`.N)r  rQ   r@   r   r   r   )rS   r   index_to_deleter  r   s        r   r   z#ListAsDictionaryWrapper.__delitem__2  sc    O )t	t	'3	.<<!/	 *
 SM r   c                 B    t        d | j                         D              S )z%Implements evaluation of `len(self)`.c              3       K   | ]  }d   yw)   Nr)   ).0r   s     r   	<genexpr>z2ListAsDictionaryWrapper.__len__.<locals>.<genexpr>@  s     ',Qq,s   )sumr   rW   s    r   r   zListAsDictionaryWrapper.__len__>  s    '$**,'''r   c                 0    d | j                         D        S )z.Returns a generator yielding the message keys.c              3   &   K   | ]	  }|d      yw)r   Nr)   )r  r   s     r   r  z3ListAsDictionaryWrapper.__iter__.<locals>.<genexpr>D  s     -DGs   )r   rW   s    r   __iter__z ListAsDictionaryWrapper.__iter__B  s    -

--r   c                     | j                   S r   r   rW   s    r   r   z(ListAsDictionaryWrapper.MakeSerializableF  s    77Nr   c                     dj                  t        |       j                  dj                  d | j	                         D                    S )Nz{}{{{}}}z, c              3   F   K   | ]  \  }}d j                  ||        yw)z{}: {}Nr:   )r  r   r   s      r   r  z3ListAsDictionaryWrapper.__repr__.<locals>.<genexpr>L  s      ALDAq(//!Q'Ls   !)r;   r   r   joinr   rW   s    r   r   z ListAsDictionaryWrapper.__repr__I  s:    T
		ADJJLAA r   c                     t        | d      S )N none_key)ListItemsViewrW   s    r   r   zListAsDictionaryWrapper.itemsO  s    ++r   c                     t        |       S r   )ListValuesViewrW   s    r   valueszListAsDictionaryWrapper.valuesR  s    $r   )r+   N)r   r   r   r   rU   r   r   r  r   r   r  r   r   r   r  r)   r   r   r   r     s>    3
!(., r   r   c                   .     e Zd ZdZdd fd
Zd Z xZS )r  z*Item iterator for ListAsDictionaryWrapper.Nr  c                2    t        |   |i | || _        y r   )superrU   	_none_key)rS   r  r   r   	__class__s       r   rU   zListItemsView.__init__Y  s    	Gd%f%DNr   c              #      K   | j                   j                  D ]R  }| j                   j                  |      st        || j                   j                        }|| j
                  }||f T y wr   )_mappingrQ   r   r@   r   r!  )rS   r   r   s      r   r  zListItemsView.__iter__]  sZ       			t	$dDMM445;#Dk !s
   5A/7A/)r   r   r   r   rU   r  __classcell__r"  s   @r   r  r  V  s    2%) r   r  c                       e Zd Zd Zd Zy)r  c                 2    t        |       D ]	  }||k(  s	 y y)NTF)iter)rS   rf   r   s      r   __contains__zListValuesView.__contains__h  s    $Z	
e  r   c              #   X   K   | j                   j                         D ]	  \  }}|  y wr   )r$  r   )rS   r   rf   s      r   r  zListValuesView.__iter__n  s&     MM'')5k *s   (*N)r   r   r   r*  r  r)   r   r   r  r  f  s    r   r  c                   D     e Zd ZdZ	 	 	 d fd	Z fdZ fdZd Z xZS )r   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                 N    t         t        |   |||       || _        || _        y)a6  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   r   N)r   r   rU   _item_class_value_field)rS   rT   
item_classr   r   r   r"  s         r   rU   z(KeyValueListAsDictionaryWrapper.__init__}  s3    & 

)499+ :  "D#Dr   c                 x    t         t        |   || j                               }t	        || j
                  |       y)a9  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)r   r   r  r.  r   r/  )rS   r   rf   r   r"  s       r   r   z+KeyValueListAsDictionaryWrapper.__setitem__  s9     0$BTD D$##U+r   c                      | j                   di | j                  |i}t        t        |   ||      }t        || j                        S )Nr)   )r.  r/  r   r   r  r@   )rS   r   r  default_itemr   r"  s        r   r  z*KeyValueListAsDictionaryWrapper.setdefault  sO    #4##Ct'8'8'&BCL0$B\D 4**++r   c                     t        |       S r   )KeyValueListItemsViewrW   s    r   r   z%KeyValueListAsDictionaryWrapper.items  s     &&r   )r+   rf   N)	r   r   r   r   rU   r   r  r   r%  r&  s   @r   r   r   s  s'     $2,",'r   r   c                        e Zd Z fdZ xZS )r5  c              #      K   t         t        |          D ])  \  }}|t        || j                  j
                        f + y wr   )r   r5  r  r@   r$  r/  )rS   r   r   r"  s      r   r  zKeyValueListItemsView.__iter__  s=     0$@B	T'$ : :;<< Cs   A A)r   r   r   r  r%  r&  s   @r   r5  r5    s    = =r   r5  )>r   
__future__r   r   r   r   abccollectionsapitools.base.protorpcliter   googlecloudsdk.api_lib.runr   googlecloudsdk.core.consoler	   sixcollections_abcrK   SERVING_GROUPAUTOSCALING_GROUPEVENTING_GROUPCLIENT_GROUPGOOGLE_GROUP	RUN_GROUPRUNAPPS_GROUPINTERNAL_GROUPSrm   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objectr.   r   r   MutableSequencer   MutableMappingr   	ItemsViewr  
ValuesViewr  r   r5  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#