
                             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Jr  SSKJ	r	  SSK
Jr  SS	K
Jr  S
r " S S\5      rg)z=API client library for Cloud IAM Simulator Replay Operations.    )absolute_import)division)unicode_literals)
list_pager)apis)waiter)
properties)	resourcesi6 c                   T    \ rS rSrSrSS jr\S 5       rS rS r	S r
SS	 jrS
 rSrg)Client   z5API client for Cloud IAM Simulator Replay Operations.Nc                     Xl         X l        U R                  R                  U l        U=(       d    UR                  U l        g N)_api_version_client
operations_serviceMESSAGES_MODULE	_messages)selfapi_versionclientmessagess       6lib/googlecloudsdk/api_lib/iam/simulator/operations.py__init__Client.__init__"   s0    #LLL++DM7!7!7DN    c                 >    U " U[         R                  " SU5      5      $ )Npolicysimulator)r   GetClientInstance)clsversions     r   FromApiVersionClient.FromApiVersion(   s    w../@'JKKr   c                 $    UR                  S5      $ )Nzoperations/)
startswithr   operation_names     r   _IsLegacyOperationNameClient._IsLegacyOperationName-   s    $$]33r   c                 *    UR                  S5      S   $ )N/)splitr'   s     r   GetReplayIdClient.GetReplayId0   s    $R((r   c                     U R                   R                  UR                  5       S9nU R                  R	                  U5      $ )N)name)r   #PolicysimulatorOperationsGetRequestRelativeNamer   Get)r   operation_refrequests      r   r5   
Client.Get3   s=    nn@@'') A +G==W%%r   c           	          U R                   R                  UR                  5       US9n[        R                  " U R
                  UUUSSS9$ )N)r2   filterr   pageSize)
batch_sizelimitfieldbatch_size_attribute)r   $PolicysimulatorOperationsListRequestr4   r   YieldFromListr   )r   
parent_refr=   	page_sizelist_filterr7   s         r   ListClient.List8   sS    nnAA$$&{ B <G##') )r   c                 (   [         R                  R                  5       nUR                  SU R                  5        U R                  UR                  5      (       a  UR                  UR                  SS9nOdUR                  UR                  [        R                  R                  R                  R                  SU R                  UR                  5      S.SS9n[        R                  " U R                   5      n[        R"                  " XTU[$        S9$ )	z#Wait for the operation to complete.r   zpolicysimulator.operations)
collectionglobal)
projectsIdlocationsId	replaysIdz5policysimulator.projects.locations.replays.operations)paramsrH   )wait_ceiling_ms)r
   REGISTRYCloneRegisterApiByNamer   r)   r2   Parser	   VALUEScoreproject	GetOrFailr/   r   CloudOperationPollerNoResourcesr   WaitFor_MAX_WAIT_TIME_MS)r   	operationmessageregistryr6   pollers         r   WaitForOperationClient.WaitForOperationC   s    !!'')H0$2C2CD""9>>22nnY^^0L % Nm nn
..&--22::DD%++INN;
 M % Nm 33DMMBF>>w8IK Kr   )r   r   r   r   r   )NNN)__name__
__module____qualname____firstlineno____doc__r   classmethodr#   r)   r/   r5   rE   r^   __static_attributes__ r   r   r   r      s:    =8 L L4)&
	)Kr   r   N)rd   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.utilr   r   googlecloudsdk.corer	   r
   rY   objectr   rg   r   r   <module>rm      s7    D &  ' ' , . * )" 7KV 7Kr   