
    6a                        S r SSKJr  SSKJr  SSKJr  SSKrSSKJr  SSKJ	r	  SSK
Jr  SS	KJr  SS
KJr  SSKJ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$S! r%S" r&S# r'S$ r(S% r)S& r*S' r+S( r,S) r-S* r.S+ r/S, r0S- r1S. r2S/ r3S0 r4S1 r5S2 r6S3 r7S4 r8S5 r9S6 r:S7 r;S8 r< " S9 S:\Rz                  5      r>\>R~                  4S; jr@g)<zworkbench instances api helper.    )absolute_import)division)unicode_literalsN)util)	arg_utils)flags)
exceptions)log)	resourcesz'compute.googleapis.com/reservation-namec                     U R                  S5      (       a2  U R                  R                  R                  5       R	                  5       $ g )Nnetwork)IsSpecifiedCONCEPTSr   ParseRelativeNameargss    1lib/googlecloudsdk/api_lib/workbench/instances.pyGetNetworkRelativeNamer   "   s:    	i  ==  &&(5577 !    c                     U R                  S5      (       a3   U R                  R                  R                  5       R	                  5       $ g ! [
         a    [        R                  " S5      ef = f)NsubnetztSubnet is not formatted correctly. Expected format: projects/{project-id}/regions/{region}/subnetworks/{subnet-name})r   r   r   r   r   AttributeErrorr	   Errorr   s    r   GetSubnetRelativeNamer   '   si    	h]]!!'')6688    N s   1A !A,c                    U R                  S5      (       d.  U R                  S5      (       d  U R                  S5      (       d  / $ SnSnSnU R                  S5      (       a  [        U 5      nU R                  S5      (       a  [        U 5      nU R                  S5      (       aX  [        R                  " SUR
                  R                  S S9R                  [        R                  " U R                  5      5      nUR                  UUUS9/$ )	zCreates the network config for the instance.

Args:
  args: Argparse object from Command.Run
  messages: Module containing messages definition for the specified API.

Returns:
  A list of NetworkInterface messages for the instance.
r   r   nic_typeNznic-typec                     SU ;  $ NUNSPECIFIED xs    r   <lambda>,CreateNetworkConfigMessage.<locals>.<lambda>N   	    a!7r   arg_namemessage_enuminclude_filter)r   r   nicType)
r   r   r   r   ChoiceEnumMapperNetworkInterfaceNicTypeValueValuesEnumGetEnumForChoiceEnumNameToChoicer   )r   messagesnetwork_namesubnet_namer   s        r   CreateNetworkConfigMessager4   2   s     y!!			(	#	#			*	%	%I,+(	i  )$/L	h'-K	j!!))..EE7 y11$--@A	 
 
#
# $  
 r   c                 r   U R                  S5      (       d  U R                  S5      (       d  / $ SnU R                  S5      (       aX  [        R                  " SUR                  R                  S S9R                  [        R                  " U R                  5      5      nUR                  X R                  S9/$ )zCreates the accelerator config for the instance.

Args:
  args: Argparse object from Command.Run
  messages: Module containing messages definition for the specified API.

Returns:
  A list of AcceleratorConfig messages for the instance.
accelerator_typeaccelerator_core_countNzaccelerator-typec                     SU ;  $ r   r!   r"   s    r   r$   0CreateAcceleratorConfigMessage.<locals>.<lambda>l   r&   r   r'   )type	coreCount)	r   r   r,   AcceleratorConfigTypeValueValuesEnumr/   r0   r6   r7   )r   r1   	type_enums      r   CreateAcceleratorConfigMessager?   W   s     )**			2	3	3I)	())**#//CC7 y11$2G2GHI	 
 
$
$ ; ; %  
 r   c                 f    U R                  S5      (       d  / $ UR                  U R                  S9/$ )Nservice_account_email)email)r   ServiceAccountrA   r   r1   s     r   !CreateServiceAccountConfigMessagerE   s   s6    			1	2	2I

!
!(B(B
!
C	DDr   c                     U R                  S5      (       d  U R                  S5      (       d  g UR                  U R                  U R                  S9$ )Ncustom_gpu_driver_pathinstall_gpu_driver)customGpuDriverPathenableGpuDriver)r   GPUDriverConfigrG   rH   rD   s     r   CreateGPUDriverConfigMessagerL   z   sS    
/00			.	/	/		!	!55-- 
" 
 r   c                    U R                  S5      (       d-  U R                  S5      (       d  U R                  S5      (       d  gSnU R                  S5      (       a/  [        R                  " U5      R                  U R                  5      n/ nU R                  S5      (       a  U R
                  nUR                  UU R                  US9$ )zCreates the reservation config for the instance.

Args:
  args: Argparse object from Command.Run
  messages: Module containing messages definition for the specified API.

Returns:
  Reservation config for the instance.
reservation_typereservation_keyreservation_valuesN)consumeReservationTypekeyvalues)r   r   GetReservationTypeMapperr/   rN   rP   ReservationAffinityrO   )r   r1   reservation_type_enumrP   s       r   CreateReservationConfigMessagerW      s     )**			+	,	,			.	/	/	())!::t,,-  	*++00		%	%2


 
& 
 r   c                    U R                  S5      (       dC  U R                  S5      (       d-  U R                  S5      (       d  U R                  S5      (       d  gUR                  nSnSnSnU R                  S5      (       aN  [        R                  " SUR                  S S9R                  [        R                  " U R                  5      5      nU R                  S5      (       aN  [        R                  " S	UR                  S
 S9R                  [        R                  " U R                  5      5      nU R                  S5      (       a2  U R                  R                  R                  5       R                  5       nU" UUU R                  US9$ )zCreates the boot disk config for the instance.

Args:
  args: Argparse object from Command.Run
  messages: Module containing messages definition for the specified API.

Returns:
  Boot disk config for the instance.
boot_disk_sizeboot_disk_typeboot_disk_encryptionboot_disk_kms_keyNzboot-disk-typec                     SU ;  $ r   r!   r"   s    r   r$   GetBootDisk.<locals>.<lambda>   r&   r   r'   zboot-disk-encryptionc                     SU ;  $ r   r!   r"   s    r   r$   r^      r&   r   )diskTypediskEncryption
diskSizeGbkmsKey)r   BootDiskr   r,   DiskTypeValueValuesEnumr/   r0   rZ   DiskEncryptionValueValuesEnumr[   r   r\   r   r   rY   )r   r1   boot_disk_messageboot_disk_encryption_enumboot_disk_type_enumkms_keys         r   GetBootDiskrk      sf    '((			*	+	+			0	1	1			-	.	.''"'	&''#44!&>>7 y11$2E2EFG	 
 
,-- ) : :'&DD7! y11$2K2KLM	 
 
)**mm--335BBDG	".$$	
 r   c                    U R                  S5      (       dZ  U R                  S5      (       dD  U R                  S5      (       d.  U R                  S5      (       d  U R                  S5      (       d  / $ UR                  nSnSnSn/ nU R                  S5      (       aN  [        R                  " SUR                  S S	9R                  [        R                  " U R                  5      5      nU R                  S5      (       aN  [        R                  " S
UR                  S S	9R                  [        R                  " U R                  5      5      nU R                  S5      (       a2  U R                  R                  R                  5       R                  5       nU R                  S5      (       a  U R                  nU" UUU R                  UUS9/$ )zCreates the data disk config for the instance.

Args:
  args: Argparse object from Command.Run
  messages: Module containing messages definition for the specified API.

Returns:
  Data disk config for the instance.
data_disk_sizedata_disk_typedata_disk_encryptiondata_disk_kms_keydata_disk_resource_policiesNzdata-disk-typec                     SU ;  $ r   r!   r"   s    r   r$   GetDataDisk.<locals>.<lambda>   r&   r   r'   zdata-disk-encryptionc                     SU ;  $ r   r!   r"   s    r   r$   rs      r&   r   )r`   ra   rb   rc   resourcePolicies)r   DataDiskr   r,   re   r/   r0   rn   rf   ro   r   rp   r   r   rq   rm   )r   r1   data_disk_messagedata_disk_encryption_enumdata_disk_type_enumrj   resource_policiess          r   GetDataDiskr{      s    '((			*	+	+			0	1	1			-	.	.			7	8	8I''"'	&''#44!&>>7 y11$2E2EFG	 
 
,-- ) : :'&DD7! y11$2K2KLM	 
 
)**mm--335BBDG	34488&2((,
 r   c                     U R                  S5      (       d  U R                  S5      (       d  g UR                  U R                  U R                  S9nU$ )Ncontainer_repositorycontainer_tag)
repositorytag)r   ContainerImager}   r~   )r   r1   container_images      r   CreateContainerImageFromArgsr     sV    
-..			/	*	*++**0B0B , / 
r   c                 B   U R                  S5      (       d-  U R                  S5      (       d  U R                  S5      (       d  gUR                  5       nU R                  Ul        U R                  S5      (       a  U R                  Ul        U$ U R                  Ul        U$ )z8Create VmImage Message from an environment or from args.vm_image_projectvm_image_familyvm_image_nameN)r   VmImager   projectr   familyr   name)r   r1   vm_images      r   CreateVmImageFromArgsr     s     )**			+	,	,			/	*	*(**(	'((**HO 
/ &&HM	/r   c                 L    U R                  S5      (       d  / $ U R                  /$ )Ninstance_owners)r   r   r   s    r   GetInstanceOwnersFromArgsr   %  s(    			+	,	,I


	r   c                     U R                  S5      (       d  g UR                  R                  nU" U R                  R	                  5        VVs/ s H  u  p4UR                  X4S9PM     snnS9$ s  snnf )NlabelsrR   valueadditionalProperties)r   InstanceLabelsValuer   itemsAdditionalProperty)r   r1   labels_messagerR   r   s        r   GetLabelsFromArgsr   ,  sq    			(	#	#$$00.	))+.+*# ''C'=+. 
  .   A.
c                 J    U R                  S5      (       d  / $ U R                  $ )Ntags)r   r   r   s    r   GetTagsFromArgsr   7  s"    			&	!	!I	r   c                     U R                  S5      (       d  g UR                  R                  nU" U R                  R	                  5        VVs/ s H  u  p4UR                  X4S9PM     snnS9$ s  snnf )Nmetadatar   r   )r   GceSetupMetadataValuer   r   r   )r   r1   metadata_messagerR   r   s        r   GetMetadataFromArgsr   >  st    			*	%	%&&44	 !MM//11jc 
-
-#
-
C1
 r   c                    U R                  S5      (       d-  U R                  S5      (       d  U R                  S5      (       d  g/ SQnU R                  S5      (       a  U R                  R                  5       U;   nOSnU R                  S5      (       a  U R                  R                  5       U;   nOSnU R                  S5      (       a  U R                  R                  5       U;   nOSnUR
                  nU" UUUS9$ )a  Creates the Shielded Instance Config message for the create/update request.

Args:
  args: Argparse object from Command.Run
  messages: Module containing messages definition for the specified API.

Returns:
  Shielded Instance Config of the Instance message.
shielded_secure_bootshielded_vtpmshielded_integrity_monitoringN)1trueonyesy)enableIntegrityMonitoringenableSecureBoot
enableVtpm)r   r   lowerr   r   ShieldedInstanceConfig)r   r1   true_valuesr   r   r    shielded_instance_config_messages          r   !GetShieldedInstanceConfigFromArgsr   K  s     -..			/	*	*			9	:	:/+	,--44::<K	o&&&&,,.+=MM	566**002kA " %)!%-%D%D"	) =+
 r   c                     U R                  S5      (       d  g[        R                  " SUR                  R                  S S9R                  [        R                  " U R                  5      5      nUR                  US9$ )a  Creates the Confidential Instance Config message for the create request.

Args:
  args: Argparse object from Command.Run
  messages: Module containing messages definition for the specified API.

Returns:
  Confidential Instance Config of the Instance message.
confidential_compute_typeNzconfidential-compute-typec                     SU ;  $ r   r!   r"   s    r   r$   7GetConfidentialInstanceConfigFromArgs.<locals>.<lambda>  s	    }A5r   r'   )confidentialInstanceType)r   r   r,   ConfidentialInstanceConfig'ConfidentialInstanceTypeValueValuesEnumr/   r0   r   )r   r1   confidential_instance_types      r   %GetConfidentialInstanceConfigFromArgsr   s  s     
		5	6	6(99*66^^5    !?!?@	  
	,	,9 
- 
 r   c                 H    U R                  S5      (       d  g U R                  $ )Nmachine_type)r   r   r   s    r   GetMachineTypeFromArgsr     s"    			.	)	)			r   c                 H    U R                  S5      (       d  g U R                  $ )Nmin_cpu_platform)r   r   r   s    r   GetMinCpuPlatformFromArgsr     s#    			,	-	-			r   c                 H    U R                  S5      (       d  g U R                  $ )Ndisable_public_ip)r   r   r   s    r   GetDisablePublicIpFromArgsr     s#    			-	.	.			r   c                 H    U R                  S5      (       d  g U R                  $ )Nenable_ip_forwarding)r   r   r   s    r   GetEnableIpForwardingFromArgsr     #    			0	1	1		"	""r   c                 H    U R                  S5      (       d  g U R                  $ )Nenable_third_party_identity)r   r   r   s    r   #GetEnableThirdPartyIdentityFromArgsr     s#    			7	8	8		)	))r   c                 H    U R                  S5      (       d  g U R                  $ )Nenable_managed_euc)r   r   r   s    r   GetEnableManagedEucFromArgsr     s#    			.	/	/		 	  r   c                 H    U R                  S5      (       d  g U R                  $ )Ndisable_proxy_access)r   r   r   s    r   GetDisableProxyAccessFromArgsr     r   r   c                 J   UR                  [        X5      [        X5      [        X5      [	        X5      [        U 5      [        U 5      [        X5      [        U 5      [        U 5      [        X5      [        X5      [        X5      [        X5      [        X5      [        X5      [!        U 5      [#        X5      S9nUR%                  U R&                  [)        U 5      X1R                  5       :w  a  UOS[+        U 5      [-        X5      [/        U 5      U(       a  [1        U 5      OSS9nU$ )a!  Creates the Instance message for the create request.

Args:
  args: Argparse object from Command.Run
  messages: Module containing messages definition for the specified API.
  support_managed_euc: Whether the managed EUC feature is supported.

Returns:
  Instance of the Instance message.
)acceleratorConfigsbootDiskcontainerImage	dataDisksdisablePublicIpenableIpForwardinggpuDriverConfigmachineTypeminCpuPlatformr   networkInterfacesreservationAffinityserviceAccountsshieldedInstanceConfigconfidentialInstanceConfigr   vmImageN)r   disableProxyAccessgceSetupinstanceOwnersr   enableThirdPartyIdentityenableManagedEuc)r   r?   rk   r   r{   r   r   rL   r   r   r   r4   rW   rE   r   r   r   r   r   instancer   r   r   r   r   )r   r1   support_managed_euc	gce_setupr   s        r   CreateInstancer     s    7G4*1$AD+066t<24B(..t4"4224B8H7G>tN!F
" 4 #D3'   )* ==6t<%):):)<<y$.t4t.B4H	 348  
( 
/r   c                 z    [         R                  " U 5      n[        XU5      nUR                  X4U R                  S9$ )a  Creates the update mask for update Instance request.

Args:
  args: Argparse object from Command.Run
  messages: Module containing messages definition for the API.
  support_managed_euc: Whether the managed EUC feature is supported.

Returns:
  Update mask of the Instance message.
)parentr   
instanceId)r   GetParentForInstancer   0NotebooksProjectsLocationsInstancesCreateRequestr   )r   r1   r   r   r   s        r   CreateInstanceCreateRequestr     sE     $$T*&D,?@(		B	B4== 
C 
B Br   c                     / nSSSSSSSSS	S
SSSS.n[        UR                  5       5       H.  u  p4U R                  U5      (       d  M  UR                  U5        M0     SR	                  [        [        U5      5      $ )zCreates the update mask for update Instance request.

Args:
  args: Argparse object from Command.Run

Returns:
  Update mask of the Instance message.
z"gce_setup.accelerator_configs.typez(gce_setup.accelerator_configs.core_countz-gce_setup.gpu_driver_config.enable_gpu_driverz2gce_setup.gpu_driver_config.custom_gpu_driver_pathz5gce_setup.shielded_instance_config.enable_secure_bootz.gce_setup.shielded_instance_config.enable_vtpmz>gce_setup.shielded_instance_config.enable_integrity_monitoringr   zgce_setup.metadatazgce_setup.machine_typezgce_setup.tagsz$gce_setup.container_image.repositoryzgce_setup.container_image.tag)r6   r7   rH   rG   r   r   r   r   r   r   r   r}   r~   ,)sortedr   r   appendjoinmapstr)r   
mask_arrayfield_mask_dictrR   r   s        r   CreateUpdateMaskr     s     *> JK
> BG
J&.D6'/* ?0023jc 4 
#c:&	''r   c                 J    U R                   R                  R                  5       $ )N)r   r   r   r   s    r   GetInstanceResourcer    s    				%	%	''r   c                 L    [         R                  " U 5      nUR                  US9$ )N)r   )r   GetParentFromArgs.NotebooksProjectsLocationsInstancesListRequest)r   r1   r   s      r   CreateInstanceListRequestr     s&    !!$'&		@	@	@	OOr   c                 R    [        U 5      R                  5       nUR                  US9$ N)r   )r  r   0NotebooksProjectsLocationsInstancesDeleteRequestr   r1   r   s      r   CreateInstanceDeleteRequestr
  %  s1     &335(		B	B 
C 
 r   c                 R    [        U 5      R                  5       nUR                  US9$ r  )r  r   -NotebooksProjectsLocationsInstancesGetRequestr	  s      r   CreateInstanceDescribeRequestr  +  s)     &335(		?	?X	?	NNr   c                 r    [        U 5      R                  5       nUR                  5       nUR                  X#S9$ )N)r   resetInstanceRequest)r  r   ResetInstanceRequest/NotebooksProjectsLocationsInstancesResetRequest)r   r1   r   reset_requests       r   CreateInstanceResetRequestr  0  ?     &335(//1-		A	A 
B 
9 9r   c                     [        U 5      R                  5       nUR                  U R                  S9nUR	                  X#S9$ )N)targetSnapshot)r   rollbackInstanceRequest)r  r   RollbackInstanceRequesttarget_snapshot2NotebooksProjectsLocationsInstancesRollbackRequest)r   r1   r   rollback_requests       r   CreateInstanceRollbackRequestr  7  sP     &335(55)) 6 +		D	D 
E 
? ?r   c                 r    [        U 5      R                  5       nUR                  5       nUR                  X#S9$ )N)r   startInstanceRequest)r  r   StartInstanceRequest/NotebooksProjectsLocationsInstancesStartRequest)r   r1   r   start_requests       r   CreateInstanceStartRequestr"  ?  r  r   c                 r    [        U 5      R                  5       nUR                  5       nUR                  X#S9$ )N)r   stopInstanceRequest)r  r   StopInstanceRequest.NotebooksProjectsLocationsInstancesStopRequest)r   r1   r   stop_requests       r   CreateInstanceStopRequestr(  F  s?     &335(--/,		@	@ 
A 
7 7r   c                 L    [         R                  " U 5      nUR                  US9$ r  )r   r  3NotebooksProjectsLocationsInstancesGetConfigRequest)r   r1   r   s      r   CreateGetConfigRequestr+  M  s&    				%$		E	E4	E	PPr   c                     [        U 5      R                  5       nUR                  UR                  U R                  U R
                  S9S9nUR                  X#S9$ )N)	projectId
snapshotId)snapshot)r   restoreInstanceRequest)r  r   RestoreInstanceRequestSnapshotsnapshot_projectr/  1NotebooksProjectsLocationsInstancesRestoreRequest)r   r1   r   restore_requests       r   CreateInstanceRestoreRequestr6  R  sj     &335(33  ))dmm !  4 /
 
	C	C 
D 
 r   c                     UR                  [        X5      [        X5      [        U 5      [	        X5      [        X5      [        U 5      [        X5      S9nUR                  U R                  X!R                  5       :w  a  UOS[        X5      S9nU$ )zCreates the Instance message for the update request.

Args:
  args: Argparse object from Command.Run
  messages: Module containing messages definition for the specified API.

Returns:
  Instance of the Instance message.
)r   r   r   r   r   r   r   N)r   r   r   )r   r?   rL   r   r   r   r   r   r   r   r   )r   r1   r   r   s       r   UpdateInstancer8  ^  s     7G24B(."42>tN4 1$A   ) ==%):):)<<y$t.  (
 
/r   c                     [        X5      n[        U 5      R                  5       n[        U 5      nUR	                  UUUS9$ )N)r   r   
updateMask)r8  r  r   r   /NotebooksProjectsLocationsInstancesPatchRequest)r   r1   r   r   update_masks        r   CreateInstanceUpdateRequestr=  z  sK    D+(	T	"	/	/	1$ &+		A	A 
B 
 r   c                    [        U 5      R                  5       nUR                  U R                  S9nU R	                  S5      (       a  U R
                  Ul        U R	                  S5      (       a  SUl        U R	                  S5      (       a  SUl        U R	                  S5      (       a  SUl	        UR                  X!R                  US9S9$ )	z$"Create and return Diagnose request.)	gcsBucketrelative_pathenable_repairTenable_packet_captureenable_copy_home_files)diagnosticConfig)r   diagnoseInstanceRequest)r  r   DiagnosticConfig
gcs_bucketr   r@  relativePathenableRepairFlagenablePacketCaptureFlagenableCopyHomeFilesFlag2NotebooksProjectsLocationsInstancesDiagnoseRequestDiagnoseInstanceRequest)r   r1   r   diagnostic_configs       r   CreateInstanceDiagnoseRequestrO    s     &335(// 0  
o&&%)%7%7"	o&&)-&	-..04-	.//04-		D	D-M-M, .N .. 
E 
/ /r   c                 H   [        U 5      R                  5       nSnU R                  S5      (       a'  UR                  UR	                  U R
                  S9S9nO<U R                  S5      (       a&  UR                  UR                  U R                  S9S9nUR                  X#S9$ )z%Create and return ResizeDisk request.NrY   )rb   )r   rm   )dataDisk)notebookInstanceresizeDiskRequest)	r  r   r   ResizeDiskRequestrd   rY   rv   rm   4NotebooksProjectsLocationsInstancesResizeDiskRequest)r   r1   r   requests       r   CreateInstanceResizeDiskrW    s     &335('	&''((""** # 
 ) G
 ())((""** # 
 ) G
 
	F	F 
G 
< <r   c                 r    [        U 5      R                  5       nUR                  5       nUR                  X#S9$ )N)r   upgradeInstanceRequest)r  r   UpgradeInstanceRequest1NotebooksProjectsLocationsInstancesUpgradeRequest)r   r1   r   upgrade_requests       r   CreateInstanceUpgradeRequestr]    s?     &335(335/		C	C 
D 
= =r   c                 R    [        U 5      R                  5       nUR                  US9$ )N)rR  )r  r   <NotebooksProjectsLocationsInstancesCheckUpgradabilityRequestr	  s      r   'CreateInstanceCheckUpgradabilityRequestr`    s1     &335(		N	N 
O 
! !r   c                 r    [         R                  R                  U R                  SS9nUR	                  5       $ )Nz&notebooks.projects.locations.instances)
collection)r   REGISTRYParseRelativeNamer   SelfLink)resourcer   s     r   GetInstanceURIrg    s7    11mm H 2 J(				r   c                       \ rS rSr\R
                  S4r\R                  S4r\R                  S4r
\R                  S4r\R                  S4r\R                  S4r\R                  S4rS	rg
)OperationTypei  createdupdatedrestoredupgradedzrolled backdeletedresetr!   N)__name__
__module____qualname____firstlineno__r
   CreatedResourceCREATEUpdatedResourceUPDATERestoredResourceRESTOREUPGRADEROLLBACKDeletedResourceDELETEResetResourceRESET__static_attributes__r!   r   r   ri  ri    sr    +&+&!!:.'  *-'!!=1(+&g
&%r   ri  c                    UR                   S   nUR                  (       aB  U" [        R                  " U R                  U5      SR                  UR                  5      SS9  U $ [        R                  " U SR                  UR                  UR                   S   U R                  5      UUUR                   S   S:H  S9nU" [        R                  " U R                  U5      SR                  UR                  5      S	S9  U$ )
a0  Handles Long-running Operations for both cases of async.

Args:
  operation: The operation to poll.
  args: ArgParse instance containing user entered arguments.
  instance_service: The service to get the resource after the long-running
    operation completes.
  release_track: base.ReleaseTrack object.
  operation_type: Enum value of type OperationType indicating the kind of
    operation to wait for.

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error

Returns:
  The Instance resource if synchronous, else the Operation Resource.
r   zworkbench instance {0}T)kindis_asyncz9Waiting for operation on Instance [{}] to be {} with [{}]   rn  )servicerelease_track	is_deleteF)r   async_r   GetOperationResourcer   formatr   WaitForOperation)	operationr   instance_servicer  operation_typelogging_methodresponses          r   	HandleLROr    s    , "''*.	[[!!)..-@%,,T]]; $$CJJMM>//2INN	D #!''*i7:H !!)..-@%,,T]]; Or   )A__doc__
__future__r   r   r   enum googlecloudsdk.api_lib.workbenchr   $googlecloudsdk.command_lib.util.apisr   $googlecloudsdk.command_lib.workbenchr   googlecloudsdk.corer	   r
   r   _RESERVATION_AFFINITY_KEYr   r   r4   r?   rE   rL   rW   rk   r{   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r
  r  r  r  r"  r(  r+  r6  r8  r=  rO  rW  r]  r`  rg  Enumri  rw  r  r!   r   r   <module>r     s9   & &  '  1 : 6 * # ) F 8
"J8E
@)X0f
$ 
%P4 #*!#,^B""(J(P
O
9?97Q
	8/&<(=!'DII ' +11	)r   