
                         N    S r SSKJr  SSKJr  SSKJr  SSKJr   " S S\5      rg)	z9Support library to handle the automation run subcommands.    )absolute_import)division)unicode_literals)client_utilc                   (    \ rS rSrSrSS jrS rSrg)AutomationRunsClient   z:Client for automation run service in the Cloud Deploy API.Nc                     U=(       d    [         R                  " 5       U l        U=(       d    [         R                  " U5      U l        U R                  R
                  U l        g)zInitialize an automation_run.AutomationRunsClient.

Args:
  client: base_api.BaseApiClient, the client class for Cloud Deploy.
  messages: module containing the definitions of messages for Cloud Deploy.
N)r   GetClientInstanceclientGetMessagesModulemessages3projects_locations_deliveryPipelines_automationRuns_service)selfr   r   s      8lib/googlecloudsdk/api_lib/clouddeploy/automation_run.py__init__AutomationRunsClient.__init__   sD     ;K99;DKE = =f EDMGG 	M    c                 j    U R                   R                  US9nU R                  R                  U5      $ )zCancels an automation run.

Args:
  name: Name of the AutomationRun. Format is
    projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/automationRuns/{automationRun}.

Returns:
  CancelAutomationRunResponse message.
)name)r   HClouddeployProjectsLocationsDeliveryPipelinesAutomationRunsCancelRequestr   Cancel)r   r   requests      r   r   AutomationRunsClient.Cancel(   s8     mmdd e G ==((r   )r   r   r   )NN)__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes__ r   r   r   r      s    B)r   r   N)	r    
__future__r   r   r   "googlecloudsdk.api_lib.clouddeployr   objectr   r"   r   r   <module>r&      s#    @ &  ' :)6 )r   