
                            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
0r\	R                  \	R                  " \	R                  R                   5       " S S\	R"                  5      5       5       r\\l        g)zBImplementation of gcloud Procurement consumer order place command.    )absolute_import)division)unicode_literals)apis)arg_parsers)base)resource_argsEXAMPLESam  
        To purchase a product-based order, you must specify product request. For
        example:

            $ {command} --product-request product-external-name=productId,flavor-external-name=flavorId

        To specify parameters, you must follow the pattern
        "ParameterName=ParameterType:ParameterValue". For example:

            $ {command} --product-request product-external-name=productId,flavor-external-name=flavorId,region=str:us-west-1

        To purchase a quote-based order, you must specify quote external name.
        For example:

            $ {command} --quote-external-name quoteId
        c                   .    \ rS rSrSr\S 5       rS rSrg)Create/   z.Creates the order resource from the Place API.c                 "   [         R                  " U S5        U R                  SSSS9  U R                  SSSS9  U R                  SS	S
9  U R                  SS9nUR                  S[        R
                  " SS/S9SSSS9  UR                  SSS
9  g)zfRegister flags for this command.

Args:
  parser: argparse.ArgumentParser to register arguments with.
z2Parent Cloud Billing account to place order under.z--display-nameTzDisplay name of the order.)requiredhelpz--provider-idz2ID of the provider for which the order is created.z--request-idz+ID of the request for idempotency purposes.)r   )r   z--product-requestzproduct-external-namezflavor-external-name)required_keysz	KEY=VALUEappendz7Request for information about the product in the order.)typemetavaractionr   z--quote-external-namez)External name of the quote for the order.N)r	   AddBillingAccountResourceArgadd_argumentadd_mutually_exclusive_groupr   ArgDict)parserproduct_quote_groups     :lib/surface/commerce_procurement/consumer/orders/create.pyArgsCreate.Args4   s     ..DF
4.J  L
A  C J  L !==t=L$$  24JKMF % H $$8 % :    c                    UR                   R                  R                  5       n[        R                  R                  UR                  5       UR                  UR                  UR                  UR                  UR                  5      $ )z~Runs the command.

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

Returns:
  An Order operation.
)CONCEPTSbilling_accountParser   OrdersPlaceRelativeNamedisplay_nameprovider_id
request_idproduct_requestquote_external_name)selfargsbilling_account_refs      r   Run
Create.RunR   si     --77==?;;0==?!..0@0@!__d.B.B!557 7r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r/   __static_attributes__r1   r   r   r   r   /   s     7: ::7r   r   N)r6   
__future__r   r   r   +googlecloudsdk.api_lib.commerce_procurementr   googlecloudsdk.callioper   r   /googlecloudsdk.command_lib.commerce_procurementr	   DETAILED_HELPHiddenReleaseTracksReleaseTrackALPHACommandr   detailed_helpr1   r   r   <module>rD      s~    I &  ' < / ( I 	* D%%++,.7T\\ .7 - .7b % r   