HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //usr/lib/google-cloud-sdk/lib/surface/projects/__pycache__/update.cpython-312.pyc
�

������dZddlmZddlmZddlmZddlmZddlmZddl	m
Z
ddl	mZdd	l
mZdd
lmZej"ej$j&�Gd�dej(��Zej"ej$j,ej$j.�Gd
�dej(��Zy)z Command to update a new project.�)�absolute_import)�division)�unicode_literals)�projects_api)�base)�flags)�util)�labels_util)�logc�&�eZdZdZed��Zd�Zy)�UpdateAlphaa�Update the name and/or labels of a project.

  Update the name and/or labels of the given project.

  This command can fail for the following reasons:
  * There is no project with the given ID.
  * The active account does not have Owner or Editor permissions for the
    given project.

  ## EXAMPLES

  The following command updates a project with the ID
  `example-foo-bar-1` to have the name `Foo Bar & Grill` and removes the
  label `dive`:

    $ {command} example-foo-bar-1 --name="Foo Bar & Grill" --remove-labels=dive

  The following command updates a project with the ID `example-foo-bar-1` to
  have labels `foo` and `bar` with values of `abc` and `def`, respectively:

    $ {command} example-foo-bar-1 --update-labels="foo=abc,bar=def"
  c�4�tjd�j|�|jd��}|j	dd��|jd�}tj|�|jjtj�y)N�updateT)�required�--name�New name for the project.)�helpzLabels Flags)r�GetProjectIDNumberFlag�AddToParser�	add_group�add_argumentr
�AddUpdateLabelsFlags�display_info�	AddFormat�command_lib_util�LIST_FORMAT)�parser�update_flags�labels_groups   �lib/surface/projects/update.py�ArgszUpdateAlpha.Args7s{��	� � ��*�6�6�v�>��#�#�T�#�2�L����h�-H��I��)�)�.�9�L��$�$�\�2�
���!�!�"2�">�">�?�c���tjj|�}tj|j
�}t
j||j|��}tj|�|S�N)�name�labels_diff)r
�Diff�FromUpdateArgsr�ParseProject�idr�Updater%r�UpdatedResource)�self�argsr&�project_ref�results     r �RunzUpdateAlpha.RunAsZ���"�"�1�1�$�7�K�"�/�/����8�K�
�
 �
 ��4�9�9�-8�:�F�����$��Mr"N)�__name__�
__module__�__qualname__�__doc__�staticmethodr!r1�r"r r
r
s"���.�@��@�r"r
c�,�eZdZdZd�Zed��Zd�Zy)r+a�Update the name of a project.

  Update the name of the given project.

  This command can fail for the following reasons:
  * There is no project with the given ID.
  * The active account does not have Owner or Editor permissions for the
    given project.

  ## EXAMPLES

  The following command updates a project with the ID
  `example-foo-bar-1` to have the name `Foo Bar & Grill`:

    $ {command} example-foo-bar-1 --name="Foo Bar & Grill"
  c�"�tjS)N)r�ProjectsUriFunc)r-s r �
GetUriFunczUpdate.GetUriFunc]s���+�+�+r"c�t�tjd�j|�|jddd��y)NrrTr)rr)r�GetProjectFlagrr)rs r r!zUpdate.Args`s5��	����"�.�.�v�6�
����4�8��:r"c���tj|j�}tj||j
t
j���}tj|�|Sr$)
rr)r*rr+r%r
r'rr,)r-r.r/r0s    r r1z
Update.RunfsN��"�/�/����8�K�
�
 �
 ��4�9�9�-8�-=�-=�-?�A�F�����$��Mr"N)r2r3r4r5r;r6r!r1r7r"r r+r+Js%���",��:��:�
r"r+N)r5�
__future__rrr�+googlecloudsdk.api_lib.cloudresourcemanagerr�googlecloudsdk.callioper�#googlecloudsdk.command_lib.projectsrr	r�$googlecloudsdk.command_lib.util.argsr
�googlecloudsdk.corer�
ReleaseTracks�ReleaseTrack�ALPHA�
UpdateCommandr
�BETA�GAr+r7r"r �<module>rKs��� '�&��'�D�(�5�H�<�#�����D�%�%�+�+�,�(�$�$�$�(�-�(�V����D�%�%�*�*�D�,=�,=�,@�,@�A� �T�
�
� �B� r"