
                         8   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mZ ddl	m
Z
 ddlmZ d	d
dZe
j                   e
j                  e
j                   j"                  e
j                   j$                         G d de
j&                                      Zee_        y)z%'workbench instances update' command.    )absolute_import)division)unicode_literals)	instances)util)base)flagsz+
        Updates a workbench instance.
    a  
    To update machine type for an instance, run:

        $ {command} example-instance --machine-type=n1-standard-8 --location=us-central1-a

    To update labels for an instance, run:

        $ {command} example-instance --labels=k1=v1,k2=v2 --location=us-central1-a
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)UpdatezUpdates a workbench instance.c                 .    t        j                  |        y)z Register flags for this command.N)r	   AddUpdateInstanceFlags)parsers    )lib/surface/workbench/instances/update.pyArgszUpdate.Args1   s     
  (    c                 <   | j                         }t        j                  |      }t        j                  |      }|j                  }|j                  t        j                  ||            }t        j                  ||||t        j                  j                        S )N)operation_type)ReleaseTrackr   	GetClientGetMessagesprojects_locations_instancesPatchinstance_utilCreateInstanceUpdateRequest	HandleLROOperationTypeUPDATE)selfargsrelease_trackclientmessagesinstance_service	operations          r   Runz
Update.Run6   s    %%'M^^M*F.H:: &&11$ACI""$2299; ;r   N)__name__
__module____qualname____doc__staticmethodr   r'    r   r   r   r   ,   s     &) );r   r   N)r+   
__future__r   r   r    googlecloudsdk.api_lib.workbenchr   r   r   googlecloudsdk.callioper   $googlecloudsdk.command_lib.workbenchr	   DETAILED_HELPDefaultUniverseOnlyReleaseTracksr   GABETACommandr   detailed_helpr-   r   r   <module>r9      s    , &  ' G 1 ( 6		$ D%%(($*;*;*@*@A;T\\ ; B ;, % r   