
    >
                     N    d Z ddlmZ ddlmZ ddlmZ ddlmZ  G d de      Z	y)	z2Utilities for Cloud Batch resource allowances API.    )absolute_import)division)unicode_literals)utilc                   0    e Zd ZdZddZd Zd Zd Zd Zy)	ResourceAllowancesClientz>Client for resource allowances service in the Cloud Batch API.Nc                     |xs t        j                  |      | _        |xs | j                  j                  | _        | j                  j
                  | _        y )N)batch_api_utilGetClientInstanceclientMESSAGES_MODULEmessages%projects_locations_resourceAllowancesservice)selfrelease_trackr   r   s       7lib/googlecloudsdk/api_lib/batch/resource_allowances.py__init__z!ResourceAllowancesClient.__init__   s@    KN<<]KDK; ; ;DM;;DDDL    c                     | j                   j                  } |||j                         |      }| j                  j	                  |      S )N)resourceAllowanceIdparentresourceAllowance)r   5BatchProjectsLocationsResourceAllowancesCreateRequestRelativeNamer   Create)r   resource_allowance_idlocation_refresource_allowance_configcreate_req_type
create_reqs         r   r   zResourceAllowancesClient.Create!   sK     	KK  !1((*3J
 <<z**r   c                     | j                   j                  } ||j                               }| j                  j	                  |      S N)name)r   2BatchProjectsLocationsResourceAllowancesGetRequestr   r   Get)r   resource_allowance_refget_req_typeget_reqs       r   r&   zResourceAllowancesClient.Get.   s?    HH   6 C C EFG<<G$$r   c                     | j                   j                  } ||j                               }| j                  j	                  |      S r#   )r   5BatchProjectsLocationsResourceAllowancesDeleteRequestr   r   Delete)r   r'   delete_req_type
delete_reqs       r   r,   zResourceAllowancesClient.Delete5   s?    KK  !&<&I&I&KLJ<<z**r   c                     | j                   j                  } ||j                         dj                  |      |      }| j                  j                  |      S )N,)r$   
updateMaskr   )r   4BatchProjectsLocationsResourceAllowancesPatchRequestr   joinr   Patch)r   r'   r   update_maskupdate_req_type
update_reqs         r   UpdatezResourceAllowancesClient.Update<   sT     	JJ  !#00288K(3J
 <<j))r   )NN)	__name__
__module____qualname____doc__r   r   r&   r,   r8    r   r   r   r      s    FE
+%+*r   r   N)
r<   
__future__r   r   r   googlecloudsdk.api_lib.batchr   r
   objectr   r=   r   r   <module>rA      s"     9 &  ' ?.*v .*r   