
    4                         S r SSKJr  SSKJr  SSKJr  SSKJ	r	   " S S\R                  5      r " S S	\R                  5      rS
 rg)z3Utility for interacting with containeranalysis API.    )util)waiter)
exceptions)	resourcesc                       \ rS rSrSrSrg)UnsupportedOS   a,  Raised when the user attempts to scan from an unsupported operation system.

Note that this is not the same error as when a user initiates a scan on a
container image, but that image itself has an unsupported OS. In this case,
the gcloud command itself is running on an unsupported operation system.
 N__name__
__module____qualname____firstlineno____doc____static_attributes__r
       Alib/googlecloudsdk/command_lib/artifacts/ondemandscanning_util.pyr   r      s    r   r   c                       \ rS rSrSrSrg)ExtractionFailedError!   zRaised when extraction fails.r
   Nr   r
   r   r   r   r   !   s    %r   r   c                     [         R                  " U5      R                  n[        R                  R                  U R                  SS9n[        R                  " U5      n[        R                  " XC5      $ )aP  Silently waits for the given google.longrunning.Operation to complete.

Args:
  operation: The operation to poll.
  version: The ODS API version endpoints to use to talk to the Operations
    service.

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

Returns:
  The response field of the completed operation.
z.ondemandscanning.projects.locations.operations)
collection)
ods_util	GetClientprojects_locations_operationsr   REGISTRYParseRelativeNamenamer   CloudOperationPollerNoResourcesPollUntilDone)	operationversion
op_serviceop_resourcepollers        r   WaitForOperationr&   &   sc     !!'*HH*""44nnA 5 C+ 11*=&			f	22r   N)r   'googlecloudsdk.api_lib.ondemandscanningr   r   googlecloudsdk.api_lib.utilr   googlecloudsdk.corer   core_exceptionsr   Errorr   r   r&   r
   r   r   <module>r,      sB    : E . = )O)) O11 
3r   