
    >                         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Z	d	 Z
d
 Zd ZddZd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zy)z/Shared resource flags for Procurement commands.    )absolute_import)division)unicode_literals)concepts)concept_parsersNc                 R    ||}nd}t        j                  | | |      S d|      S )Nz5Cloud Billing account for the Procurement {resource}.billing-accountname	help_textr    ResourceParameterAttributeConfigr   raw_help_textr   s      Dlib/googlecloudsdk/command_lib/commerce_procurement/resource_args.pyBillingAccountAttributeConfigr      sB    IGI		2	2#4i
Q Q):i
Q Q    c                  0    t        j                  dd      S )Naccountz'Procurement Account for the {resource}.r
   r    r   r   AccountAttributeConfigr   "   s    		2	2 I
K Kr   c                  0    t        j                  dd      S )Nentitlementz+Procurement Entitlement for the {resource}.r
   r   r   r   r   EntitlementAttributeConfigr   '   s    		2	2=
? ?r   c                  0    t        j                  dd      S )Nz
free-trialz*Procurement free trial for the {resource}.r
   r   r   r   r   FreeTrialAttributeConfigr   -   s    		2	2#O
Q Qr   c                 R    ||}nd}t        j                  | | |      S d|      S )Nz%Procurement Order for the {resource}.orderr
   r   r   s      r   OrderAttributeConfigr   2   sB    I7I		2	2#4I
G G)0I
G Gr   c                  0    t        j                  dd      S )Norder-allocationz0Procurement Order Allocation for the {resource}.r
   r   r   r   r   OrderAllocationAttributeConfigr"   ;   s    		2	2B
D Dr   c                  0    t        j                  dd      S )N	operationz)Procurement Operation for the {resource}.r
   r   r   r   r   OperationAttributeConfigr%   A   s    		2	2"M
O Or   c                  B    t        j                  ddt                     S )Nz0cloudcommerceconsumerprocurement.billingAccountsr	   )resource_namebillingAccountsId)r   ResourceSpecr   r   r   r   GetBillingAccountResourceSpecr*   F   s!    			8%57
9 9r   c                  T    t        j                  ddt               t                     S )Nz9cloudcommerceconsumerprocurement.billingAccounts.accountsr   )r'   r(   
accountsId)r   r)   r   r   r   r   r   GetAccountResourceSpecr-   M   s'    			A57')	
+ +r   c                  `    t        j                  ddt         j                  t                     S )Nz6cloudcommerceconsumerprocurement.projects.entitlementsr   )r'   
projectsIdentitlementsId)r   r)    DEFAULT_PROJECT_ATTRIBUTE_CONFIGr   r   r   r   GetEntitlementResourceSpecr2   U   s*    			>!::/1	
3 3r   c                  X    t        j                  ddt        d      t                     S )Nz7cloudcommerceconsumerprocurement.billingAccounts.ordersr   zCloud Billing Account for the Procurement Order. Billing account id is required if order is not specified as full resource name.r   )r'   r(   ordersId)r   r)   r   r   r   r   r   GetOrderResourceSpecr6   ]   s1    			?5 [ $%
' 'r   c                  n    t        j                  ddt        d      t        d      t	                     S )NzHcloudcommerceconsumerprocurement.billingAccounts.orders.orderAllocationsr!   zCloud Billing Account for the Procurement Order Allocation. Billing account id is required if order allocation is not specified as full resource name.r4   z|Procurement Order for the Order Allocation. Order id is required if order allocation is not specified as full resource name.)r'   r(   r5   orderAllocationsId)r   r)   r   r   r"   r   r   r   GetOrderAllocationResourceSpecr9   g   sA    			P&5 q $ W 89	
; 	;r   c                  n    t        j                  ddt        d      t        d      t	                     S )NzBcloudcommerceconsumerprocurement.billingAccounts.orders.operationszorder-operationzorder-operation-billing-account)r   zorder-operation-order)r'   r(   r5   operationsId)r   r)   r   r   r%   r   r   r   GetOrderOperationResourceSpecr<   t   s5    			J%502#)@A+-
/ /r   c                 x    t         j                  j                  dt               |d      j	                  |        y )Nz--billing-accountTrequired)r   ConceptParserForResourcer*   AddToParserparserdescriptions     r   AddBillingAccountResourceArgrF   ~   s6    ++#%	 ,  ![(r   c                 x    t         j                  j                  dt               |d      j	                  |        y )Nr   Tr>   )r   r@   rA   r-   rB   rC   s     r   AddAccountResourceArgrH      s3    ++'); ,  [(r   c                 x    t         j                  j                  dt               |d      j	                  |        y )Nr   Tr>   )r   r@   rA   r2   rB   rC   s     r   AddEntitlementResourceArgrJ      s3    ++/1; ,  [(r   c                 x    t         j                  j                  dt               |d      j	                  |        y )Nr   Tr>   r   r@   rA   r6   rB   rC   s     r   AddOrderResourceArgrM      s3    ++#%{ ,  [(r   c                 x    t         j                  j                  dt               |d      j	                  |        y )Nz--orderTr>   rL   rC   s     r   AddOrderParentResourceArgrO      s3    ++%' ,  [(r   c                 x    t         j                  j                  dt               |d      j	                  |        y )Norder_allocationTr>   )r   r@   rA   r9   rB   rC   s     r   AddOrderAllocationResourceArgrR      s6    ++$&	 ,  ![(r   c                 t    t         j                  j                  dt               |      j	                  |        y )Nz--order-operation)r   r@   rA   r<   rB   rC   s     r   AddOrderOperationResourceArgrT      s,    ++,?,I,K,799DV9Lr   )NN)__doc__
__future__r   r   r    googlecloudsdk.calliope.conceptsr   (googlecloudsdk.command_lib.util.conceptsr   r   r   r   r   r   r"   r%   r*   r-   r2   r6   r9   r<   rF   rH   rJ   rM   rO   rR   rT   r   r   r   <module>rY      s    6 &  ' 5 DQK
?Q
GDO
9+3'
;/))))))Mr   