
    i                         S r SSKJr  SSKJrJr  SSKrSSKJrJr  SSK	J
r
  SSKJr  SSKJrJr  S	S
KJr   " S S\5      r " S S5      r " S S5      r " S S5      r " S S5      r " S S5      r " S S5      rg)z_
Manage lifecycle of your Cloud resource groups using Resource Manager APIs.

API Version: 2.0
    )datetime)DictListN)BaseServiceDetailedResponse)Authenticator)"get_authenticator_from_environment)datetime_to_stringstring_to_datetime   )get_sdk_headersc                      \ rS rSrSrSrSr\\4S\SS 4S jj5       r	 SS	\
SS4S
 jjrSSSSSS.S\S\S\S\S\S\4S jjrSSS.S\S\S\4S jjrS\S\4S jrSSS.S\S\S\S\4S jjrS\S\4S jrS\4S jrS\S\4S jrSrg)ResourceManagerV2)   z The Resource Manager V2 service.z)https://resource-controller.cloud.ibm.comresource_managerservice_namereturnc                 N    [        U5      nU " U5      nUR                  U5        U$ )zx
Return a new client for the Resource Manager service using the specified
       parameters and external configuration.
)r	   configure_service)clsr   authenticatorservices       c/home/james-whalen/.local/lib/python3.13/site-packages/ibm_platform_services/resource_manager_v2.pynew_instanceResourceManagerV2.new_instance/   s+     ;<Hm$!!,/    Nr   c                 B    [         R                  " X R                  US9  g)a7  
Construct a new client for the Resource Manager service.

:param Authenticator authenticator: The authenticator specifies the authentication mechanism.
       Get up to date information from https://github.com/IBM/python-sdk-core/blob/main/README.md
       about initializing the authenticator of your choice.
)service_urlr   N)r   __init__DEFAULT_SERVICE_URL)selfr   s     r   r   ResourceManagerV2.__init__=   s     	T/G/GWder   
account_iddatenamedefaultinclude_deletedr$   r%   r&   r'   r(   c                   0 n[        U R                  SSS9nUR                  U5        UUUUUS.n	SU;   a   UR                  UR                  S5      5        SUS'   Sn
U R	                  S	XU	S
9nU R
                  " U40 UD6nU$ )aV  
Get a list of all resource groups.

Call this method to retrieve information about all resource groups and associated
quotas in an account. The `id` returned in the response can be used to [create a
resource instance
later](https://cloud.ibm.com/apidocs/resource-controller/resource-controller?code=java#create-resource-instance).
The response can be filtered based on queryParams such as `account_id`, `name`,
`default`, and more to narrow your search.Users need to be assigned IAM policies
with the Viewer role or higher on the targeted resource groups.

:param str account_id: (optional) The ID of the account that contains the
       resource groups that you want to get.
:param str date: (optional) The date in the format of YYYY-MM which returns
       resource groups. Deleted resource groups will be excluded before this
       month.
:param str name: (optional) The name of the resource group.
:param bool default: (optional) Boolean value to specify whether or not to
       list default resource groups.
:param bool include_deleted: (optional) Boolean value to specify whether or
       not to list default resource groups.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse with `dict` result representing a `ResourceGroupList` object
V2list_resource_groupsr   service_versionoperation_idr#   headersapplication/jsonAccept/v2/resource_groupsGET)methodurlr/   paramsr   DEFAULT_SERVICE_NAMEupdategetprepare_requestsend)r!   r$   r%   r&   r'   r(   kwargsr/   sdk_headersr6   r5   requestresponses                r   r+   &ResourceManagerV2.list_resource_groupsN   s    H %22DWm
 	{# %.
 NN6::i01.#&&eV\&]99W//r   r&   r$   c                   0 n[        U R                  SSS9nUR                  U5        XS.nUR                  5        VVs0 s H  u  pxUc  M
  Xx_M     nnn[        R
                  " U5      nSUS'   SU;   a   UR                  UR                  S5      5        SUS'   S	n	U R                  S
XUS9n
U R                  " U
40 UD6nU$ s  snnf )a  
Create a resource group.

Create a resource group in an account to organize your account resources in
customizable groupings so that you can quickly assign users access to more than
one resource at a time. To learn what makes a good resource group strategy, see
[Best practices for organizing
resources](https://cloud.ibm.com/docs/account?topic=account-account_setup). A
default resource group is created when an account is created. If you have a Lite
account or 30-day trial, you cannot create extra resource groups, but you can
rename your default resource group. If you have a Pay-As-You-Go or Subscription
account, you can create multiple resource groups. You must be assigned an IAM
policy with the Administrator role on All Account Management services to create
extra resource groups.

:param str name: (optional) The new name of the resource group.
:param str account_id: (optional) The account id of the resource group.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse with `dict` result representing a `ResCreateResourceGroup` object
r*   create_resource_groupr,   rB   r0   content-typer/   r1   r2   POSTr4   r5   r/   data)	r   r8   r9   itemsjsondumpsr:   r;   r<   )r!   r&   r$   r=   r/   r>   rH   kvr5   r?   r@   s               r   rD   'ResourceManagerV2.create_resource_group   s    . %22DWn
 	{#7#'::<A<!1<Azz$"4NN6::i01.#&&f#UY&Z99W// Bs    	CCidc                    Uc  [        S5      e0 n[        U R                  SSS9nUR                  U5        SU;   a   UR                  UR	                  S5      5        SUS'   S/nU R                  U5      n[        [        XV5      5      nS	R                  " S0 UD6nU R                  S
XS9n	U R                  " U	40 UD6n
U
$ )a5  
Get a resource group.

Retrieve a resource group by alias ID. Call this method to get details about a
particular resource group, like the name of the resource group, associated quotas,
whether the state is active, the resource group ID and the CRN. The `id` returned
in the response can be used to [create a resource instance
later](https://cloud.ibm.com/apidocs/resource-controller/resource-controller?code=java#create-resource-instance).
Users need to be assigned an IAM policy with the Viewer role or higher on the
targeted resource group.

:param str id: The short or long ID of the alias.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse with `dict` result representing a `ResourceGroup` object
id must be providedr*   get_resource_groupr,   r/   r0   r1   rO   /v2/resource_groups/{id}r3   r4   r5   r/    
ValueErrorr   r8   r9   r:   encode_path_varsdictzipformatr;   r<   r!   rO   r=   r/   r>   path_param_keyspath_param_valuespath_param_dictr5   r?   r@   s              r   rR   $ResourceManagerV2.get_resource_group   s    $ :233%22DWk
 	{#NN6::i01.& 11"5s?FG(//B/B&&e&N99W//r   r&   staterb   c                    Uc  [        S5      e0 n[        U R                  SSS9nUR                  U5        X#S.nUR	                  5        VV	s0 s H  u  pU	c  M
  X_M     nnn	[
        R                  " U5      nSUS'   SU;   a   UR                  UR                  S5      5        SUS	'   S
/n
U R                  U5      n[        [        X5      5      nSR                  " S0 UD6nU R                  SXUS9nU R                  " U40 UD6nU$ s  sn	nf )a  
Update a resource group.

Update a resource group by the alias ID. Call this method to update information
about an existing resource group. You can rename a resource group and activate or
suspend a particular resource group. To update a resource group, users need to be
assigned with IAM policies with the Editor role or higher.

:param str id: The short or long ID of the alias.
:param str name: (optional) The new name of the resource group.
:param str state: (optional) The state of the resource group.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse with `dict` result representing a `ResourceGroup` object
rQ   r*   update_resource_groupr,   ra   r0   rE   r/   r1   rO   rS   PATCHrG   rU   )rW   r   r8   r9   rI   rJ   rK   r:   rX   rY   rZ   r[   r;   r<   )r!   rO   r&   rb   r=   r/   r>   rH   rL   rM   r]   r^   r_   r5   r?   r@   s                   r   rd   'ResourceManagerV2.update_resource_group   s   " :233%22DWn
 	{#-#'::<A<!1<Azz$"4NN6::i01.& 11"5s?FG(//B/B&&g3VZ&[99W// Bs   	D
D
c                 x   Uc  [        S5      e0 n[        U R                  SSS9nUR                  U5        SU;   a   UR                  UR	                  S5      5        S/nU R                  U5      n[        [        XV5      5      nSR                  " S
0 UD6nU R                  SXS	9n	U R                  " U	40 UD6n
U
$ )a  
Delete a resource group.

Delete a resource group by the alias ID. You can delete a resource group only if
the targeted resource group does not contain any resources or if it is not a
default resource group. When a user creates an account, a default resource group
is created in the account. If you want to delete a resource group that contains
resources, first [delete the resource
instances](https://cloud.ibm.com/apidocs/resource-controller/resource-controller?code=java#delete-resource-instance).
Then, delete the resource group when all resource instances in the group are
deleted. Users need to be assigned an IAM policy with the Editor role or higher on
the targeted resource group.

:param str id: The short or long ID of the alias.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
rQ   r*   delete_resource_groupr,   r/   rO   rS   DELETErT   rU   rV   r\   s              r   rh   'ResourceManagerV2.delete_resource_group  s    ( :233%22DWn
 	{#NN6::i01& 11"5s?FG(//B/B&&hC&Q99W//r   c                     0 n[        U R                  SSS9nUR                  U5        SU;   a   UR                  UR                  S5      5        SUS'   SnU R	                  SXBS	9nU R
                  " U40 UD6nU$ )
a  
List quota definitions.

Get a list of all quota definitions. Quotas for a resource group limit the number
of apps, instances, and memory allowed for that specific resource group. Each
resource group that you have on your account has a specific set of quotas.
Standard quotas are for resource groups that are created by users with a Lite
account, and Pay-As-You-Go quotas are for resource groups that are created with a
Pay-As-You-Go account. This method provides list of all available quota
definitions. No specific IAM policy needed.

:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse with `dict` result representing a `QuotaDefinitionList` object
r*   list_quota_definitionsr,   r/   r0   r1   z/v2/quota_definitionsr3   rT   r7   )r!   r=   r/   r>   r5   r?   r@   s          r   rl   (ResourceManagerV2.list_quota_definitions4  s    " %22DWo
 	{#NN6::i01.%&&e&N99W//r   c                    Uc  [        S5      e0 n[        U R                  SSS9nUR                  U5        SU;   a   UR                  UR	                  S5      5        SUS'   S/nU R                  U5      n[        [        XV5      5      nS	R                  " S0 UD6nU R                  S
XS9n	U R                  " U	40 UD6n
U
$ )a  
Get a quota definition.

Call this method to retrieve information about a particular quota by passing the
quota ID. The response can be used to identify the quota type, Standard or Paid.
Information about available resources, such as number of apps, number of service
instances, and memory, are returned in the response. Quotas for a resource group
limit the number of apps, instances, and memory allowed for that specific resource
group. Each resource group that you have on your account has a specific set of
quotas. Standard quotas are for resource groups that are created by users with a
Lite account, and Pay-As-You-Go quotas are for resource groups that are created
with a Pay-As-You-Go account. No specific IAM policy needed.

:param str id: The id of the quota.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse with `dict` result representing a `QuotaDefinition` object
rQ   r*   get_quota_definitionr,   r/   r0   r1   rO   z/v2/quota_definitions/{id}r3   rT   rU   rV   r\   s              r   ro   &ResourceManagerV2.get_quota_definitionU  s    ( :233%22DWm
 	{#NN6::i01.& 11"5s?FG*11DOD&&e&N99W//r   rU   )N)__name__
__module____qualname____firstlineno____doc__r    r8   classmethodstrr   r   r   boolr   r+   rD   rR   rd   rh   rl   ro   __static_attributes__rU   r   r   r   r   )   sF   *E- 1 
  (,f$f 
f(  $: : 	:
 : : : 
:x 484 *S *S *^n *X%S %7G %N =At ) )c ) )br )V& &:J &X2B B's '9I 'r   r   c                       \ rS rSrSrSSSSSSSSSSSSSS.S\S\S\S\S	\S
\S\S\S\S\S\S   S\S\SS4S jjr	\
S\SS 4S j5       r\
S 5       rS\4S jrS rS\4S jrSS S\4S jrSS S\4S jrSrg)QuotaDefinitioni  a  
A returned quota definition.

:attr str id: (optional) An alpha-numeric value identifying the quota.
:attr str name: (optional) The human-readable name of the quota.
:attr str type: (optional) The type of the quota.
:attr float number_of_apps: (optional) The total app limit.
:attr float number_of_service_instances: (optional) The total service instances
      limit per app.
:attr float default_number_of_instances_per_lite_plan: (optional) Default number
      of instances per lite plan.
:attr float instances_per_app: (optional) The total instances limit per app.
:attr str instance_memory: (optional) The total memory of app instance.
:attr str total_app_memory: (optional) The total app memory capacity.
:attr float vsi_limit: (optional) The VSI limit.
:attr List[ResourceQuota] resource_quotas: (optional) The resource quotas
      associated with a quota definition.
:attr datetime created_at: (optional) The date when the quota was initially
      created.
:attr datetime updated_at: (optional) The date when the quota was last updated.
NrO   r&   typenumber_of_appsnumber_of_service_instances)default_number_of_instances_per_lite_planinstances_per_appinstance_memorytotal_app_memory	vsi_limitresource_quotas
created_at
updated_atrO   r&   r}   r~   r   r   r   r   r   r   r   ResourceQuotar   r   r   c                    Xl         X l        X0l        X@l        XPl        X`l        Xpl        Xl        Xl        Xl	        Xl
        Xl        Xl        g)a?  
Initialize a QuotaDefinition object.

:param str id: (optional) An alpha-numeric value identifying the quota.
:param str name: (optional) The human-readable name of the quota.
:param str type: (optional) The type of the quota.
:param float number_of_apps: (optional) The total app limit.
:param float number_of_service_instances: (optional) The total service
       instances limit per app.
:param float default_number_of_instances_per_lite_plan: (optional) Default
       number of instances per lite plan.
:param float instances_per_app: (optional) The total instances limit per
       app.
:param str instance_memory: (optional) The total memory of app instance.
:param str total_app_memory: (optional) The total app memory capacity.
:param float vsi_limit: (optional) The VSI limit.
:param List[ResourceQuota] resource_quotas: (optional) The resource quotas
       associated with a quota definition.
:param datetime created_at: (optional) The date when the quota was
       initially created.
:param datetime updated_at: (optional) The date when the quota was last
       updated.
Nr|   )r!   rO   r&   r}   r~   r   r   r   r   r   r   r   r   r   s                 r   r   QuotaDefinition.__init__  sM    P 		,+F(9b6!2. 0".$$r   _dictc                 0   0 nSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   S	U;   a  UR                  S	5      US	'   S
U;   a  UR                  S
5      US
'   SU;   a8  UR                  S5       Vs/ s H  n[        R                  U5      PM     snUS'   SU;   a  [        UR                  S5      5      US'   SU;   a  [        UR                  S5      5      US'   U " S0 UD6$ s  snf );Initialize a QuotaDefinition object from a json dictionary.rO   r&   r}   r~   r   r   r   r   r   r   r   r   r   rU   )r:   r   	from_dictr   r   r   argsxs       r   r   QuotaDefinition.from_dict  s    5=4DJU? 99V,DLU? 99V,DLu$%*YY/?%@D!"(E127))<Y2ZD./6%?@E		Ju@vD<=%'(-		2E(FD$%%&+ii0A&BD"#&',yy1C'DD#$% %		+ 6D%KP99UfKg&hKga}'>'>q'AKg&hD"#5 !3EIIl4K!LD5 !3EIIl4K!LD{T{ 'is    Fc                 $    U R                  U5      $ )r   r   r   r   s     r   
_from_dictQuotaDefinition._from_dict       }}U##r   c                    0 n[        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R
                  b  U R
                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S	5      (       a  U R                  b  U R                  US	'   [        U S
5      (       a  U R                  b  U R                  US
'   [        U S5      (       a:  U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS'   [        U S5      (       a%  U R                  b  [        U R                  5      US'   [        U S5      (       a%  U R                  b  [        U R                  5      US'   U$ s  snf )1Return a json dictionary representing this model.rO   r&   r}   r~   r   r   r   r   r   r   r   r   r   )hasattrrO   r&   r}   r~   r   r   r   r   r   r   r   to_dictr   r
   r   r!   r   r   s      r   r   QuotaDefinition.to_dict  s-   4477#6''E$K4  TYY%: IIE&M4  TYY%: IIE&M4)**t/B/B/N&*&9&9E"#4677D<\<\<h373S3SE/0DEFF>>JAEAoAoE=>4,--$2H2H2T)-)?)?E%&4*++0D0D0P'+';';E#$4+,,1F1F1R(,(=(=E$%4%%$..*D!%E+4*++0D0D0P=A=Q=Q'R=Q		=Q'RE#$4&&4??+F"4T__"EE,4&&4??+F"4T__"EE, (Ss   1I>c                 "    U R                  5       $ r   r   r!   s    r   _to_dictQuotaDefinition._to_dict      ||~r   c                 H    [         R                  " U R                  5       SS9$ )z6Return a `str` version of this QuotaDefinition object.   indentrJ   rK   r   r   s    r   __str__QuotaDefinition.__str__      zz$,,.33r   otherc                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ z=Return `true` when self and other are equal, false otherwise.F
isinstance	__class____dict__r!   r   s     r   __eq__QuotaDefinition.__eq__   '    %00}}..r   c                     X:X  + $ zAReturn `true` when self and other are not equal, false otherwise.rU   r   s     r   __ne__QuotaDefinition.__ne__&        r   )r   r   rO   r   r   r&   r~   r   r   r   r}   r   r   )rq   rr   rs   rt   ru   rw   floatr   r   r   rv   r   r   r   r   r   r   rx   r   r   ry   rU   r   r   r{   r{     sD   2  $-1;?#'# $15##4% 4% 	4%
 4% 4% &+4% 494% !4% 4% 4% 4% o.4% 4% 4%  
!4%l d '8  > $ $   D4 4/- /$ /!- !$ !r   r{   c                       \ rS rSrSrS\S   SS4S jr\S\SS 4S	 j5       r	\S
 5       r
S\4S jrS rS\4S jrSS S\4S jrSS S\4S jrSrg)QuotaDefinitionListi+  ze
A list of quota definitions.

:attr List[QuotaDefinition] resources: The list of quota definitions.
	resourcesr{   r   Nc                     Xl         g)zr
Initialize a QuotaDefinitionList object.

:param List[QuotaDefinition] resources: The list of quota definitions.
Nr   r!   r   s     r   r   QuotaDefinitionList.__init__2  	     #r   r   c                     0 nSU;   a9  UR                  S5       Vs/ s H  n[        R                  U5      PM     snUS'   O[        S5      eU " S0 UD6$ s  snf )?Initialize a QuotaDefinitionList object from a json dictionary.r   zERequired property 'resources' not present in QuotaDefinitionList JSONrU   )r:   r{   r   rW   r   s       r   r   QuotaDefinitionList.from_dict:  s_     %GLyyQ\G] ^G]!!:!:1!=G] ^Dfgg{T{ !_   Ac                 $    U R                  U5      $ )r   r   r   s     r   r   QuotaDefinitionList._from_dictD  r   r   c                     0 n[        U S5      (       a:  U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS'   U$ s  snf r   r   r   r   r   r   s      r   r   QuotaDefinitionList.to_dictI  I    4%%$..*D7;~~!F~!))+~!FE+ "G   Ac                 "    U R                  5       $ r   r   r   s    r   r   QuotaDefinitionList._to_dictP  r   r   c                 H    [         R                  " U R                  5       SS9$ )z:Return a `str` version of this QuotaDefinitionList object.r   r   r   r   s    r   r   QuotaDefinitionList.__str__T  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   QuotaDefinitionList.__eq__X  r   r   c                     X:X  + $ r   rU   r   s     r   r   QuotaDefinitionList.__ne__^  r   r   r   rq   rr   rs   rt   ru   r   r   rv   r   r   r   r   r   rw   r   rx   r   r   ry   rU   r   r   r   r   +  s    #$'8"9 #d # d '<   $ $ 4 4/1 /d /!1 !d !r   r   c                       \ rS rSrSrSSS.S\S\SS4S jjr\S	\SS 4S
 j5       r	\S 5       r
S\4S jrS rS\4S jrSS S\4S jrSS S\4S jrSrg)ResCreateResourceGroupic  aJ  
A newly-created resource group.

:attr str id: (optional) An alpha-numeric value identifying the resource group.
:attr str crn: (optional) The full CRN (cloud resource name) associated with the
      resource group. For more on this format, see [Cloud Resource
      Names](https://cloud.ibm.com/docs/account?topic=account-crn).
NrO   crnrO   r   r   c                    Xl         X l        g)aa  
Initialize a ResCreateResourceGroup object.

:param str id: (optional) An alpha-numeric value identifying the resource
       group.
:param str crn: (optional) The full CRN (cloud resource name) associated
       with the resource group. For more on this format, see [Cloud Resource
       Names](https://cloud.ibm.com/docs/account?topic=account-crn).
Nr   )r!   rO   r   s      r   r   ResCreateResourceGroup.__init__m  s     r   r   c                 ~    0 nSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   U " S0 UD6$ )BInitialize a ResCreateResourceGroup object from a json dictionary.rO   r   rU   r:   r   r   r   s      r   r    ResCreateResourceGroup.from_dictz  sF     5=4DJE>))E*DK{T{r   c                 $    U R                  U5      $ )r   r   r   s     r   r   !ResCreateResourceGroup._from_dict  r   r   c                     0 n[        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   U$ )r   rO   r   )r   rO   r   r!   r   s     r   r   ResCreateResourceGroup.to_dict  sR    4477#6''E$K4DHH$888E%Lr   c                 "    U R                  5       $ r   r   r   s    r   r   ResCreateResourceGroup._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )z=Return a `str` version of this ResCreateResourceGroup object.r   r   r   r   s    r   r   ResCreateResourceGroup.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   ResCreateResourceGroup.__eq__  r   r   c                     X:X  + $ r   rU   r   s     r   r   ResCreateResourceGroup.__ne__  r   r   )r   rO   )rq   rr   rs   rt   ru   rw   r   rv   r   r   r   r   r   r   rx   r   r   ry   rU   r   r   r   r   c  s     %)T c s d  d '?   $ $ 4 4/4 / /!4 ! !r   r   c                       \ rS rSrSrSSSSSSSSSSSSSS.S\S\S\S\S	\S
\S\S\S\S\\   S\S\	S\	SS4S jjr
\S\SS 4S j5       r\S 5       rS\4S jrS rS\4S jrSS S\4S jrSS S\4S jrSrg)ResourceGroupi  a  
A resource group.

:attr str id: (optional) An alpha-numeric value identifying the resource group.
:attr str crn: (optional) The full CRN (cloud resource name) associated with the
      resource group. For more on this format, see [Cloud Resource
      Names](https://cloud.ibm.com/docs/account?topic=account-crn).
:attr str account_id: (optional) An alpha-numeric value identifying the account
      ID.
:attr str name: (optional) The human-readable name of the resource group.
:attr str state: (optional) The state of the resource group.
:attr bool default: (optional) Identify if this resource group is default of the
      account or not.
:attr str quota_id: (optional) An alpha-numeric value identifying the quota ID
      associated with the resource group.
:attr str quota_url: (optional) The URL to access the quota details that
      associated with the resource group.
:attr str payment_methods_url: (optional) The URL to access the payment methods
      details that associated with the resource group.
:attr List[object] resource_linkages: (optional) An array of the resources that
      linked to the resource group.
:attr str teams_url: (optional) The URL to access the team details that
      associated with the resource group.
:attr datetime created_at: (optional) The date when the resource group was
      initially created.
:attr datetime updated_at: (optional) The date when the resource group was last
      updated.
NrO   r   r$   r&   rb   r'   quota_id	quota_urlpayment_methods_urlresource_linkages	teams_urlr   r   rO   r   r$   r&   rb   r'   r   r   r   r   r   r   r   r   c                    Xl         X l        X0l        X@l        XPl        X`l        Xpl        Xl        Xl        Xl	        Xl
        Xl        Xl        g)a  
Initialize a ResourceGroup object.

:param str id: (optional) An alpha-numeric value identifying the resource
       group.
:param str crn: (optional) The full CRN (cloud resource name) associated
       with the resource group. For more on this format, see [Cloud Resource
       Names](https://cloud.ibm.com/docs/account?topic=account-crn).
:param str account_id: (optional) An alpha-numeric value identifying the
       account ID.
:param str name: (optional) The human-readable name of the resource group.
:param str state: (optional) The state of the resource group.
:param bool default: (optional) Identify if this resource group is default
       of the account or not.
:param str quota_id: (optional) An alpha-numeric value identifying the
       quota ID associated with the resource group.
:param str quota_url: (optional) The URL to access the quota details that
       associated with the resource group.
:param str payment_methods_url: (optional) The URL to access the payment
       methods details that associated with the resource group.
:param List[object] resource_linkages: (optional) An array of the resources
       that linked to the resource group.
:param str teams_url: (optional) The URL to access the team details that
       associated with the resource group.
:param datetime created_at: (optional) The date when the resource group was
       initially created.
:param datetime updated_at: (optional) The date when the resource group was
       last updated.
Nr   )r!   rO   r   r$   r&   rb   r'   r   r   r   r   r   r   r   s                 r   r   ResourceGroup.__init__  sH    \ $	
 "#6 !2"$$r   r   c                    0 nSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   S	U;   a  UR                  S	5      US	'   S
U;   a  UR                  S
5      US
'   SU;   a  UR                  S5      US'   SU;   a  [        UR                  S5      5      US'   SU;   a  [        UR                  S5      5      US'   U " S0 UD6$ )9Initialize a ResourceGroup object from a json dictionary.rO   r   r$   r&   rb   r'   r   r   r   r   r   r   r   rU   )r:   r   r   s      r   r   ResourceGroup.from_dict  sy    5=4DJE>))E*DK5 !&<!8DU? 99V,DLe!IIg.DM#ii	2DO$yy4D% %		+ 6D E)*/))4I*JD&'%'(-		2E(FD$%% %		+ 6D5 !3EIIl4K!LD5 !3EIIl4K!LD{T{r   c                 $    U R                  U5      $ )r   r   r   s     r   r   ResourceGroup._from_dict  r   r   c                    0 n[        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R
                  b  U R
                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S	5      (       a  U R                  b  U R                  US	'   [        U S
5      (       a  U R                  b  U R                  US
'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a%  U R                  b  [        U R                  5      US'   [        U S5      (       a%  U R                  b  [        U R                  5      US'   U$ )r   rO   r   r$   r&   rb   r'   r   r   r   r   r   r   r   )r   rO   r   r$   r&   rb   r'   r   r   r   r   r   r   r
   r   r   s     r   r   ResourceGroup.to_dict$  s   4477#6''E$K4DHH$888E%L4&&4??+F"&//E,4  TYY%: IIE&M4!!djj&<!ZZE'N4##(@#||E)4$$)B $E*4%%$..*D!%E+4.//D4L4L4X+/+C+CE'(4,--$2H2H2T)-)?)?E%&4%%$..*D!%E+4&&4??+F"4T__"EE,4&&4??+F"4T__"EE,r   c                 "    U R                  5       $ r   r   r   s    r   r   ResourceGroup._to_dictC  r   r   c                 H    [         R                  " U R                  5       SS9$ )z4Return a `str` version of this ResourceGroup object.r   r   r   r   s    r   r   ResourceGroup.__str__G  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   ResourceGroup.__eq__K  r   r   c                     X:X  + $ r   rU   r   s     r   r   ResourceGroup.__ne__Q  r   r   )r$   r   r   r'   rO   r&   r   r   r   r   rb   r   r   )rq   rr   rs   rt   ru   rw   rx   r   objectr   r   rv   r   r   r   r   r   r   r   r   ry   rU   r   r   r   r     s@   @ #'*.##:% :% 	:%
 :% :% :% :% :% :% !:%  <:% :% :% :%  
!:%x d   > $ $ >4 4/O / /!O ! !r   r   c                       \ rS rSrSrS\S   SS4S jr\S\SS 4S	 j5       r	\S
 5       r
S\4S jrS rS\4S jrSS S\4S jrSS S\4S jrSrg)ResourceGroupListiV  z_
A list of resource groups.

:attr List[ResourceGroup] resources: The list of resource groups.
r   r   r   Nc                     Xl         g)zl
Initialize a ResourceGroupList object.

:param List[ResourceGroup] resources: The list of resource groups.
Nr   r   s     r   r   ResourceGroupList.__init__]  r   r   r   c                     0 nSU;   a9  UR                  S5       Vs/ s H  n[        R                  U5      PM     snUS'   O[        S5      eU " S0 UD6$ s  snf )=Initialize a ResourceGroupList object from a json dictionary.r   zCRequired property 'resources' not present in ResourceGroupList JSONrU   )r:   r   r   rW   r   s       r   r   ResourceGroupList.from_dicte  s^     %EJYY{E[ \E[!8!8!;E[ \Ddee{T{ !]r   c                 $    U R                  U5      $ )r  r   r   s     r   r   ResourceGroupList._from_dicto  r   r   c                     0 n[        U S5      (       a:  U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS'   U$ s  snf r   r   r   s      r   r   ResourceGroupList.to_dictt  r   r   c                 "    U R                  5       $ r   r   r   s    r   r   ResourceGroupList._to_dict{  r   r   c                 H    [         R                  " U R                  5       SS9$ )z8Return a `str` version of this ResourceGroupList object.r   r   r   r   s    r   r   ResourceGroupList.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   ResourceGroupList.__eq__  r   r   c                     X:X  + $ r   rU   r   s     r   r   ResourceGroupList.__ne__  r   r   r   r   rU   r   r   r  r  V  s    #$"7 #D # d ':   $ $ 4 4// /D /!/ !D !r   r  c                       \ rS rSrSrSSSSS.S\S\S\S\S	S4
S
 jjr\S\	S	S 4S j5       r
\S 5       rS	\	4S jrS rS	\4S jrSS S	\4S jrSS S	\4S jrSrg)r   i  a  
A resource quota.

:attr str id: (optional) An alpha-numeric value identifying the quota.
:attr str resource_id: (optional) The human-readable name of the quota.
:attr str crn: (optional) The full CRN (cloud resource name) associated with the
      quota. For more on this format, see
      https://cloud.ibm.com/docs/account?topic=account-crn.
:attr float limit: (optional) The limit number of this resource.
NrO   resource_idr   limitrO   r#  r   r$  r   c                4    Xl         X l        X0l        X@l        g)a  
Initialize a ResourceQuota object.

:param str id: (optional) An alpha-numeric value identifying the quota.
:param str resource_id: (optional) The human-readable name of the quota.
:param str crn: (optional) The full CRN (cloud resource name) associated
       with the quota. For more on this format, see
       https://cloud.ibm.com/docs/account?topic=account-crn.
:param float limit: (optional) The limit number of this resource.
Nr"  )r!   rO   r#  r   r$  s        r   r   ResourceQuota.__init__  s     &
r   r   c                     0 nSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   U " S0 UD6$ )9Initialize a ResourceQuota object from a json dictionary._idrO   r#  r   r$  rU   r   r   s      r   r   ResourceQuota.from_dict  s|     E>5)DJE!"'))M":DE>))E*DKe!IIg.DM{T{r   c                 $    U R                  U5      $ )r(  r   r   s     r   r   ResourceQuota._from_dict  r   r   c                 r   0 n[        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   U$ )r   rO   r)  r#  r   r$  )r   rO   r#  r   r$  r   s     r   r   ResourceQuota.to_dict  s    4477#677E%L4''D,<,<,H#'#3#3E- 4DHH$888E%L4!!djj&<!ZZE'Nr   c                 "    U R                  5       $ r   r   r   s    r   r   ResourceQuota._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )z4Return a `str` version of this ResourceQuota object.r   r   r   r   s    r   r   ResourceQuota.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   ResourceQuota.__eq__  r   r   c                     X:X  + $ r   rU   r   s     r   r   ResourceQuota.__ne__  r   r   )r   rO   r$  r#  )rq   rr   rs   rt   ru   rw   r   r   rv   r   r   r   r   r   r   rx   r   r   ry   rU   r   r   r   r     s    	 %)Tdcg c s  [` lp   d    $ $ 4 4/O / /!O ! !r   r   )ru   r   typingr   r   rJ   ibm_cloud_sdk_corer   r   /ibm_cloud_sdk_core.authenticators.authenticatorr   $ibm_cloud_sdk_core.get_authenticatorr	   ibm_cloud_sdk_core.utilsr
   r   commonr   r   r{   r   r   r   r  r   rU   r   r   <module>r=     sz   &    < I S K #S Sv
d! d!N5! 5!p?! ?!Dn! n!b5! 5!pL! L!r   