
                             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
 ej                   ej                  ej                  j                         G d d	ej                                      Zy
)zCImplementation of gcloud Procurement consumer order cancel command.    )absolute_import)division)unicode_literals)apis)base)resource_argsc                   &    e Zd ZdZed        Zd Zy)Cancelz/Cancels the order resource from the Cancel API.c                 V    t        j                  | d       | j                  dd       y)zrRegister flags for this command.

    Args:
      parser: argparse.ArgumentParser to register arguments with.
    zOrder to describe.z--etagz1The weak etag for validation check, if specified.)helpN)r   AddOrderResourceArgadd_argument)parsers    :lib/surface/commerce_procurement/consumer/orders/cancel.pyArgszCancel.Args   s/     %%f.BC
J  L    c                     |j                   j                  j                         }t        j                  j                  |j                         |j                        S )zRuns the command.

    Args:
      args: The arguments that were provided to this command invocation.

    Returns:
      An Order operation.
    )CONCEPTSorderParser   Ordersr
   RelativeNameetag)selfargs	order_refs      r   Runz
Cancel.Run*   s@     ##))+I;;i446		BBr   N)__name__
__module____qualname____doc__staticmethodr   r    r   r   r
   r
      s!     8L L
Cr   r
   N)r!   
__future__r   r   r   +googlecloudsdk.api_lib.commerce_procurementr   googlecloudsdk.callioper   /googlecloudsdk.command_lib.commerce_procurementr   HiddenReleaseTracksReleaseTrackALPHACommandr
   r#   r   r   <module>r-      sd    J &  ' < ( I D%%++,CT\\ C - Cr   