
    i                       S r SSKJr  SSKJrJrJr  SSKrSSKJrJ	r	J
r
  SSKJr  SSKJr  SSKJr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 " 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" " S' S(5      r#g))z
The Enterprise Management API enables you to create and manage an enterprise, account
groups, and accounts within the enterprise.

API Version: 1.0
    )datetime)DictListOptionalN)BaseServiceDetailedResponseget_query_param)Authenticator)"get_authenticator_from_environment)convert_model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	 S6S	\
SS4S
 jjrSS.S\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\4S jrSSSS.S\S\\   S\\   S\\   S\4
S jjrSSS.S\S\S\\   S\\   S\4
S jjrSSS .S\S\S!\S"\S#   S$\S%   S\4S& jjrSSSSSSS'.S\\   S\\   S\\   S\\   S\\   S(\\   S\4S) jjrS\S\4S* jrS\S\S\4S+ jrS\S\4S, jrS\S\S\S\4S- jrSSSSSSS..S\\   S/\\   S\\   S\\   S\\   S(\\   S\4S0 jjrS\S\4S1 jrSSS2.S\S\\   S\\   S\4S3 jjrS\S\4S4 jrS5rg)7EnterpriseManagementV1*   z%The Enterprise Management V1 service.z#https://enterprise.cloud.ibm.com/v1enterprise_managementservice_namereturnc                 N    [        U5      nU " U5      nUR                  U5        U$ )z}
Return a new client for the Enterprise Management service using the
       specified parameters and external configuration.
)r   configure_service)clsr   authenticatorservices       h/home/james-whalen/.local/lib/python3.13/site-packages/ibm_platform_services/enterprise_management_v1.pynew_instance#EnterpriseManagementV1.new_instance0   s+     ;<Hm$!!,/    Nr   c                 B    [         R                  " X R                  US9  g)a<  
Construct a new client for the Enterprise Management 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"   EnterpriseManagementV1.__init__>   s     	T/G/GWder   )domainsource_account_idnameprimary_contact_iam_idr&   c                   Uc  [        S5      eUc  [        S5      eUc  [        S5      e0 n[        U R                  SSS9nUR                  U5        UUUU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        US
	 SUS'   SnU R                  SUUUS9nU R                  " U40 UD6nU$ s  sn
n	f )aX  
Create an enterprise.

Create a new enterprise, which you can use to centrally manage multiple accounts.
To create an enterprise, you must have an active Subscription account.
<br/><br/>The API creates an enterprise entity, which is the root of the
enterprise hierarchy. It also creates a new enterprise account that is used to
manage the enterprise. All subscriptions, support entitlements, credits, and
discounts from the source subscription account are migrated to the enterprise
account, and the source account becomes a child account in the hierarchy. The user
that you assign as the enterprise primary contact is also assigned as the owner of
the enterprise account.

:param str source_account_id: The ID of the account that is used to create
       the enterprise.
:param str name: The name of the enterprise. This field must have 3 - 60
       characters.
:param str primary_contact_iam_id: The IAM ID of the enterprise primary
       contact, such as `IBMid-0123ABC`. The IAM ID must already exist.
:param str domain: (optional) A domain or subdomain for the enterprise,
       such as `example.com` or `my.example.com`.
: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 `CreateEnterpriseResponse` object
z"source_account_id must be providedname must be provided'primary_contact_iam_id must be providedV1create_enterpriser   service_versionoperation_id)r'   r(   r)   r&   application/jsoncontent-typeheadersAccept/enterprisesPOSTmethodurlr4   data

ValueErrorr   DEFAULT_SERVICE_NAMEupdateitemsjsondumpsgetprepare_requestsend)r$   r'   r(   r)   r&   kwargsr4   sdk_headersr;   kvr:   requestresponses                 r   r.   (EnterpriseManagementV1.create_enterpriseO   s,   F $ABB<455!)FGG%22 ,

 	{# "3&<	
 $(::<A<!1<Azz$"4NN6::i01y!.&&	 ' 
 99W//% Bs   -	C5:C5enterprise_account_idaccount_group_id
account_id
next_docidlimitrN   rO   rP   rQ   rR   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        US	 SUS'   Sn
U R	                  S	U
UU	S
9nU R
                  " U40 UD6nU$ )a  
List enterprises.

Retrieve all enterprises for a given ID by passing the IDs on query parameters. If
no ID is passed, the enterprises for which the calling identity is the primary
contact are returned. You can use pagination parameters to filter the results.
<br/><br/>This method ensures that only the enterprises that the user has access
to are returned. Access can be controlled either through a policy on a specific
enterprise, or account-level platform services access roles, such as
Administrator, Editor, Operator, or Viewer. When you call the method with the
`enterprise_account_id` or `account_id` query parameter, the account ID in the
token is compared with that in the query parameter. If these account IDs match,
authentication isn't performed and the enterprise information is returned. If the
account IDs don't match, authentication is performed and only then is the
enterprise information returned in the response.

:param str enterprise_account_id: (optional) Get enterprises for a given
       enterprise account ID.
:param str account_group_id: (optional) Get enterprises for a given account
       group ID.
:param str account_id: (optional) Get enterprises for a given account ID.
:param str next_docid: (optional) The first item to be returned in the page
       of results. This value can be obtained from the next_url property from the
       previous call of the operation. If not specified, then the first page of
       results is returned.
:param int limit: (optional) Return results up to this limit. Valid values
       are between `0` and `100`.
: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 `ListEnterprisesResponse` object
r-   list_enterprisesr/   rM   r4   r2   r5   r6   GETr9   r:   r4   paramsr   r>   r?   rC   rD   rE   )r$   rN   rO   rP   rQ   rR   rF   r4   rG   rW   r:   rJ   rK   s                r   rT   'EnterpriseManagementV1.list_enterprises   s    T %22 +

 	{# &; 0$$
 NN6::i01y!.&&	 ' 
 99W//r   enterprise_idc                    U(       d  [        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        US	 SUS'   S/nU R                  U5      n[        [        XV5      5      nS	R                  " S0 UD6nU R                  S
UUS9n	U R                  " U	40 UD6n
U
$ )a  
Get enterprise by ID.

Retrieve an enterprise by the `enterprise_id` parameter. All data related to the
enterprise is returned only if the caller has access to retrieve the enterprise.

:param str enterprise_id: The ID of the enterprise to retrieve.
: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 `Enterprise` object
enterprise_id must be providedr-   get_enterpriser/   r4   r2   r5   rZ   /enterprises/{enterprise_id}rU   r9   r:   r4    r=   r   r>   r?   rC   encode_path_varsdictzipformatrD   rE   )r$   rZ   rF   r4   rG   path_param_keyspath_param_valuespath_param_dictr:   rJ   rK   s              r   r]   %EnterpriseManagementV1.get_enterprise   s    " =>>%22 )

 	{#NN6::i01y!.*+ 11-@s?FG,33FoF&& ' 
 99W//r   r(   r&   r)   c                *   U(       d  [        S5      e0 n[        U R                  SSS9nUR                  U5        UUU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        US	 S	/nU R                  U5      n[        [        X5      5      nS
R                  " S0 UD6nU R                  SUUUS9nU R                  " U40 UD6nU$ s  sn
n	f )a  
Update an enterprise.

Update the name, domain, or IAM ID of the primary contact for an existing
enterprise. The new primary contact must already be a user in the enterprise
account.

:param str enterprise_id: The ID of the enterprise to retrieve.
:param str name: (optional) The new name of the enterprise. This field must
       have 3 - 60 characters.
:param str domain: (optional) The new domain of the enterprise. This field
       has a limit of 60 characters.
:param str primary_contact_iam_id: (optional) The IAM ID of the user to be
       the new primary contact for the enterprise.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
r\   r-   update_enterpriser/   rj   r2   r3   r4   rZ   r^   PATCHr8   r`   r=   r   r>   r?   r@   rA   rB   rC   rb   rc   rd   re   rD   rE   )r$   rZ   r(   r&   r)   rF   r4   rG   r;   rH   rI   rf   rg   rh   r:   rJ   rK   s                    r   rl   (EnterpriseManagementV1.update_enterprise  s.   8 =>>%22 ,

 	{# &<

 $(::<A<!1<Azz$"4NN6::i01y!*+ 11-@s?FG,33FoF&&	 ' 
 99W//) Bs   	D!Dparentbilling_unit_idrq   rr   c                N   U(       d  [        S5      eU(       d  [        S5      e0 n[        U R                  SSS9nUR                  U5        UU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        US		 S
S/nU R                  X5      n[        [        X5      5      nSR                  " S0 UD6nU R                  SUUUS9nU R                  " U40 UD6nU$ s  sn
n	f )a  
Import an account into an enterprise.

Import an existing stand-alone account into an enterprise. The existing account
can be any type: trial (`TRIAL`), Lite (`STANDARD`), Pay-As-You-Go (`PAYG`), or
Subscription (`SUBSCRIPTION`). In the case of a `SUBSCRIPTION` account, the
credits, promotional offers, and discounts are migrated to the billing unit of the
enterprise. For a billable account (`PAYG` or `SUBSCRIPTION`), the country and
currency code of the existing account and the billing unit of the enterprise must
match. The API returns a `202` response and performs asynchronous operations to
import the account into the enterprise. <br/></br>For more information about
impacts to the account, see [Adding accounts to an
enterprise](https://{DomainName}/docs/account?topic=account-enterprise-add).

:param str enterprise_id: The ID of the enterprise to import the
       stand-alone account into.
:param str account_id: The ID of the existing stand-alone account to be
       imported.
:param str parent: (optional) The CRN of the expected parent of the
       imported account. The parent is the enterprise or account group that the
       account is added to.
:param str billing_unit_id: (optional) The ID of the [billing
       unit](/apidocs/enterprise-apis/billing-unit) to use for billing this
       account in the enterprise.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
r\   account_id must be providedr-   import_account_to_enterpriser/   rp   r2   r3   r4   rZ   rP   z9/enterprises/{enterprise_id}/import/accounts/{account_id}PUTr8   r`   rn   )r$   rZ   rP   rq   rr   rF   r4   rG   r;   rH   rI   rf   rg   rh   r:   rJ   rK   s                    r   ru   3EnterpriseManagementV1.import_account_to_enterpriseV  s>   L =>>:;;%22 7

 	{# .
 $(::<A<!1<Azz$"4NN6::i01y!*L9 11-Ls?FGIPPcSbc&&	 ' 
 99W//) Bs   %	D!2D!)traitsoptionsowner_iam_idrx   CreateAccountRequestTraitsry   CreateAccountRequestOptionsc                0   Uc  [        S5      eUc  [        S5      eUc  [        S5      eUb  [        U5      nUb  [        U5      n0 n[        U R                  SSS9nUR	                  U5        UUUUU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        US
	 SUS'   SnU R                  SUUU	S9nU R                  " U40 UD6nU$ s  snn
f )a  
Create a new account in an enterprise.

Create a new account as a part of an existing enterprise. The API creates an
account entity under the parent that is specified in the payload of the request.
The request also takes in the name and the owner of this new account. The owner
must have a valid IBMid that's registered with IBM Cloud, but they don't need to
be a user in the enterprise account.

:param str parent: The CRN of the parent under which the account will be
       created. The parent can be an existing account group or the enterprise
       itself.
:param str name: The name of the account. This field must have 3 - 60
       characters.
:param str owner_iam_id: The IAM ID of the account owner, such as
       `IBMid-0123ABC`. The IAM ID must already exist.
:param CreateAccountRequestTraits traits: (optional) The traits object can
       be used to set properties on child accounts of an enterprise. You can pass
       a field to opt-out of the default multi-factor authentication setting or
       enable enterprise-managed IAM when creating a child account in the
       enterprise. This is an optional field.
:param CreateAccountRequestOptions options: (optional) The options object
       can be used to set properties on child accounts of an enterprise. You can
       pass a field to to create IAM service id with IAM api keyg when creating a
       child account in the enterprise. This is an optional field.
: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 `CreateAccountResponse` object
parent must be providedr+   zowner_iam_id must be providedr-   create_accountr/   )rq   r(   rz   rx   ry   r2   r3   r4   r5   	/accountsr7   r8   )r=   r   r   r>   r?   r@   rA   rB   rC   rD   rE   )r$   rq   r(   rz   rx   ry   rF   r4   rG   r;   rH   rI   r:   rJ   rK   s                  r   r   %EnterpriseManagementV1.create_account  sN   P >677<455<=="6*F#G,G%22 )

 	{# (
 $(::<A<!1<Azz$"4NN6::i01y!.&&	 ' 
 99W//% Bs   
	DDrZ   rO   rQ   rq   rR   include_deletedr   c                   0 n[        U R                  SSS9n	UR                  U	5        UUUUUUS.n
SU;   a#  UR                  UR                  S5      5        US	 SUS'   SnU R	                  S	UUU
S
9nU R
                  " U40 UD6nU$ )a  
List accounts.

Retrieve all accounts based on the values that are passed in the query parameters.
If no query parameter is passed, all of the accounts in the enterprise for which
the calling identity has access are returned. <br/><br/>You can use pagination
parameters to filter the results. The `limit` field can be used to limit the
number of results that are displayed for this method.<br/><br/>This method ensures
that only the accounts that the user has access to are returned. Access can be
controlled either through a policy on a specific account, or account-level
platform services access roles, such as Administrator, Editor, Operator, or
Viewer. When you call the method with the `enterprise_id`, `account_group_id` or
`parent` query parameter, all of the accounts that are immediate children of this
entity are returned. Authentication is performed on all the accounts before they
are returned to the user to ensure that only those accounts are returned to which
the calling identity has access to.

:param str enterprise_id: (optional) Get accounts that are either immediate
       children or are a part of the hierarchy for a given enterprise ID.
:param str account_group_id: (optional) Get accounts that are either
       immediate children or are a part of the hierarchy for a given account group
       ID.
:param str next_docid: (optional) The first item to be returned in the page
       of results. This value can be obtained from the next_url property from the
       previous call of the operation. If not specified, then the first page of
       results is returned.
:param str parent: (optional) Get accounts that are either immediate
       children or are a part of the hierarchy for a given parent CRN.
:param int limit: (optional) Return results up to this limit. Valid values
       are between `0` and `100`.
:param bool include_deleted: (optional) Include the deleted accounts from
       an enterprise when used in conjunction with enterprise_id.
: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 `ListAccountsResponse` object
r-   list_accountsr/   r   r4   r2   r5   r   rU   rV   rX   )r$   rZ   rO   rQ   rq   rR   r   rF   r4   rG   rW   r:   rJ   rK   s                 r   r   $EnterpriseManagementV1.list_accounts  s    ` %22 (

 	{# + 0$.
 NN6::i01y!.&&	 ' 
 99W//r   c                    U(       d  [        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        US	 SUS'   S/nU R                  U5      n[        [        XV5      5      nS	R                  " S0 UD6nU R                  S
UUS9n	U R                  " U	40 UD6n
U
$ )a  
Get account by ID.

Retrieve an account by the `account_id` parameter. All data related to the account
is returned only if the caller has access to retrieve the account.

:param str account_id: The ID of the target account.
: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 `Account` object
rt   r-   get_accountr/   r4   r2   r5   rP   /accounts/{account_id}rU   r_   r`   ra   r$   rP   rF   r4   rG   rf   rg   rh   r:   rJ   rK   s              r   r   "EnterpriseManagementV1.get_accountH  s    " :;;%22 &

 	{#NN6::i01y!.'. 11*=s?FG&--@@&& ' 
 99W//r   c                 B   U(       d  [        S5      eUc  [        S5      e0 n[        U R                  SSS9nUR                  U5        SU0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        US		 S
/n	U R                  U5      n
[        [        X5      5      nSR                  " S0 UD6nU R                  SUUUS9nU R                  " U40 UD6nU$ s  snnf )a  
Move an account within the enterprise.

Move an account to a different parent within the same enterprise.

:param str account_id: The ID of the target account.
:param str parent: The CRN of the new parent within the enterprise.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
rt   r~   r-   update_accountr/   rq   r2   r3   r4   rP   r   rm   r8   r`   rn   )r$   rP   rq   rF   r4   rG   r;   rH   rI   rf   rg   rh   r:   rJ   rK   s                  r   r   %EnterpriseManagementV1.update_accountu  s:   $ :;;>677%22 )

 	{# f
 $(::<A<!1<Azz$"4NN6::i01y!'. 11*=s?FG&--@@&&	 ' 
 99W//) Bs    	D-Dc                    U(       d  [        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        US	 S/nU R                  U5      n[        [        XV5      5      nSR                  " S
0 UD6nU R                  SUUS	9n	U R                  " U	40 UD6n
U
$ )a  
Remove an account from its enterprise.

Remove an account from the enterprise its currently in. After an account is
removed, it will be canceled and cannot be reactivated.

:param str account_id: The ID of the target account.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
rt   r-   delete_accountr/   r4   rP   r   DELETEr_   r`   ra   r   s              r   r   %EnterpriseManagementV1.delete_account  s    " :;;%22 )

 	{#NN6::i01y!'. 11*=s?FG&--@@&& ' 
 99W//r   c                    Uc  [        S5      eUc  [        S5      eUc  [        S5      e0 n[        U R                  SSS9nUR                  U5        UUU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        US
	 SUS'   Sn
U R                  SU
UUS9nU R                  " U40 UD6nU$ s  sn	nf )a  
Create an account group.

Create a new account group, which can be used to group together multiple accounts.
To create an account group, you must have an existing enterprise. The API creates
an account group entity under the parent that is specified in the payload of the
request. The request also takes in the name and the primary contact of this new
account group.

:param str parent: The CRN of the parent under which the account group will
       be created. The parent can be an existing account group or the enterprise
       itself.
:param str name: The name of the account group. This field must have 3 - 60
       characters.
:param str primary_contact_iam_id: The IAM ID of the primary contact for
       this account group, such as `IBMid-0123ABC`. The IAM ID must already exist.
: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 `CreateAccountGroupResponse` object
r~   r+   r,   r-   create_account_groupr/   )rq   r(   r)   r2   r3   r4   r5   /account-groupsr7   r8   r<   )r$   rq   r(   r)   rF   r4   rG   r;   rH   rI   r:   rJ   rK   s                r   r   +EnterpriseManagementV1.create_account_group  s'   8 >677<455!)FGG%22 /

 	{# &<

 $(::<A<!1<Azz$"4NN6::i01y!.&&	 ' 
 99W//% Bs   ,	C49C4rZ   parent_account_group_idrQ   rq   rR   r   r   c                   0 n[        U R                  SSS9n	UR                  U	5        UUUUUUS.n
SU;   a#  UR                  UR                  S5      5        US	 SUS'   SnU R	                  S	UUU
S
9nU R
                  " U40 UD6nU$ )a
	  
List account groups.

Retrieve all account groups based on the values that are passed in the query
parameters. If no query parameter is passed, all of the account groups in the
enterprise for which the calling identity has access are returned. <br/><br/>You
can use pagination parameters to filter the results. The `limit` field can be used
to limit the number of results that are displayed for this method.<br/><br/>This
method ensures that only the account groups that the user has access to are
returned. Access can be controlled either through a policy on a specific account
group, or account-level platform services access roles, such as Administrator,
Editor, Operator, or Viewer. When you call the method with the `enterprise_id`,
`parent_account_group_id` or `parent` query parameter, all of the account groups
that are immediate children of this entity are returned. Authentication is
performed on all account groups before they are returned to the user to ensure
that only those account groups are returned to which the calling identity has
access.

:param str enterprise_id: (optional) Get account groups that are either
       immediate children or are a part of the hierarchy for a given enterprise
       ID.
:param str parent_account_group_id: (optional) Get account groups that are
       either immediate children or are a part of the hierarchy for a given
       account group ID.
:param str next_docid: (optional) The first item to be returned in the page
       of results. This value can be obtained from the next_url property from the
       previous call of the operation. If not specified, then the first page of
       results is returned.
:param str parent: (optional) Get account groups that are either immediate
       children or are a part of the hierarchy for a given parent CRN.
:param int limit: (optional) Return results up to this limit. Valid values
       are between `0` and `100`.
:param bool include_deleted: (optional) Include the deleted account groups
       from an enterprise when used in conjunction with other query parameters.
: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 `ListAccountGroupsResponse` object
r-   list_account_groupsr/   r   r4   r2   r5   r   rU   rV   rX   )r$   rZ   r   rQ   rq   rR   r   rF   r4   rG   rW   r:   rJ   rK   s                 r   r   *EnterpriseManagementV1.list_account_groups  s    d %22 .

 	{# +'>$.
 NN6::i01y!.&&	 ' 
 99W//r   c                    U(       d  [        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        US	 SUS'   S/nU R                  U5      n[        [        XV5      5      nS	R                  " S0 UD6nU R                  S
UUS9n	U R                  " U	40 UD6n
U
$ )a  
Get account group by ID.

Retrieve an account by the `account_group_id` parameter. All data related to the
account group is returned only if the caller has access to retrieve the account
group.

:param str account_group_id: The ID of the account group to retrieve.
: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 `AccountGroup` object
!account_group_id must be providedr-   get_account_groupr/   r4   r2   r5   rO   "/account-groups/{account_group_id}rU   r_   r`   ra   r$   rO   rF   r4   rG   rf   rg   rh   r:   rJ   rK   s              r   r   (EnterpriseManagementV1.get_account_groupr  s    $  @AA%22 ,

 	{#NN6::i01y!.-. 112BCs?FG299LOL&& ' 
 99W//r   r(   r)   c                (   U(       d  [        S5      e0 n[        U R                  SSS9nUR                  U5        UU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        US	 S	/n
U R                  U5      n[        [        X5      5      nS
R                  " S0 UD6nU R                  SUUUS9nU R                  " U40 UD6nU$ s  sn	nf )a  
Update an account group.

Update the name or IAM ID of the primary contact for an existing account group.
The new primary contact must already be a user in the enterprise account.

:param str account_group_id: The ID of the account group to retrieve.
:param str name: (optional) The new name of the account group. This field
       must have 3 - 60 characters.
:param str primary_contact_iam_id: (optional) The IAM ID of the user to be
       the new primary contact for the account group.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
r   r-   update_account_groupr/   r   r2   r3   r4   rO   r   rm   r8   r`   rn   )r$   rO   r(   r)   rF   r4   rG   r;   rH   rI   rf   rg   rh   r:   rJ   rK   s                   r   r   +EnterpriseManagementV1.update_account_group  s,   0  @AA%22 /

 	{# &<
 $(::<A<!1<Azz$"4NN6::i01y!-. 112BCs?FG299LOL&&	 ' 
 99W//) Bs   	D Dc                    U(       d  [        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        US	 S/nU R                  U5      n[        [        XV5      5      nSR                  " S
0 UD6nU R                  SUUS	9n	U R                  " U	40 UD6n
U
$ )a(  
Delete an account group from the enterprise.

Delete an existing account group from the enterprise. You can't delete an account
group that has child account groups, the delete request will fail. This API
doesn't perform a recursive delete on the child account groups, it only deletes
the current account group.

:param str account_group_id: The ID of the account group to retrieve.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse
r   r-   delete_account_groupr/   r4   rO   r   r   r_   r`   ra   r   s              r   r   +EnterpriseManagementV1.delete_account_group  s    &  @AA%22 /

 	{#NN6::i01y!-. 112BCs?FG299LOL&& ' 
 99W//r   r`   )N) __name__
__module____qualname____firstlineno____doc__r#   r>   classmethodstrr   r
   r"   r   r   r.   intrT   r]   rl   ru   r   boolr   r   r   r   r   r   r   r   r   __static_attributes__r`   r   r   r   r   *   s   /?2 1 
"  (,f$f 
f. !%II I !$	I I 
I\ 04*.$($(#H  (}H #3-	H
 SMH SMH }H 
HT++ 
	+b # $04?? sm	?
 ? !)? 
?T !%)-JJ J
 J "#J 
Jd :>;?SS S 	S 56S 78S 
Sp (,*.$( $#*.O  }O #3-	O
 SMO O }O "$O 
Ob++ 
	+Z55 5
 
5n** 
	*`AA A !$	A 
AL (,15$( $#*.Q  }Q "*#	Q
 SMQ Q }Q "$Q 
Qf,, 
	,d #04:: sm	:
 !): 
:x,, 
	,r   r   c            %       j   \ 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\\   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)"Accounti  aq  
An account resource.

:param str url: (optional) The URL of the account.
:param str id: (optional) The account ID.
:param str crn: (optional) The Cloud Resource Name (CRN) of the account.
:param str parent: (optional) The CRN of the parent of the account.
:param str enterprise_account_id: (optional) The enterprise account ID.
:param str enterprise_id: (optional) The enterprise ID that the account is a
      part of.
:param str enterprise_path: (optional) The path from the enterprise to this
      particular account.
:param str name: (optional) The name of the account.
:param str state: (optional) The state of the account.
:param str owner_iam_id: (optional) The IAM ID of the owner of the account.
:param bool paid: (optional) The type of account - whether it is free or paid.
:param str owner_email: (optional) The email address of the owner of the
      account.
:param bool is_enterprise_account: (optional) The flag to indicate whether the
      account is an enterprise account or not.
:param datetime created_at: (optional) The time stamp at which the account was
      created.
:param str created_by: (optional) The IAM ID of the user or service that created
      the account.
:param datetime updated_at: (optional) The time stamp at which the account was
      last updated.
:param str updated_by: (optional) The IAM ID of the user or service that updated
      the account.
Nr:   idcrnrq   rN   rZ   enterprise_pathr(   staterz   paidowner_emailis_enterprise_account
created_at
created_by
updated_at
updated_byr:   r   r   rq   rN   rZ   r   r(   r   rz   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        Xl        Xl        UU l        UU l        g)a  
Initialize a Account object.

:param str url: (optional) The URL of the account.
:param str id: (optional) The account ID.
:param str crn: (optional) The Cloud Resource Name (CRN) of the account.
:param str parent: (optional) The CRN of the parent of the account.
:param str enterprise_account_id: (optional) The enterprise account ID.
:param str enterprise_id: (optional) The enterprise ID that the account is
       a part of.
:param str enterprise_path: (optional) The path from the enterprise to this
       particular account.
:param str name: (optional) The name of the account.
:param str state: (optional) The state of the account.
:param str owner_iam_id: (optional) The IAM ID of the owner of the account.
:param bool paid: (optional) The type of account - whether it is free or
       paid.
:param str owner_email: (optional) The email address of the owner of the
       account.
:param bool is_enterprise_account: (optional) The flag to indicate whether
       the account is an enterprise account or not.
:param datetime created_at: (optional) The time stamp at which the account
       was created.
:param str created_by: (optional) The IAM ID of the user or service that
       created the account.
:param datetime updated_at: (optional) The time stamp at which the account
       was last updated.
:param str updated_by: (optional) The IAM ID of the user or service that
       updated the account.
Nr   )r$   r:   r   r   rq   rN   rZ   r   r(   r   rz   r   r   r   r   r   r   r   s                     r   r"   Account.__init__/  sd    f %:"*.	
(	&%:"$$$$r   _dictc                 r   0 nUR                  S5      =nb  X2S'   UR                  S5      =nb  XBS'   UR                  S5      =nb  XRS'   UR                  S5      =nb  XbS'   UR                  S5      =nb  XrS'   UR                  S5      =nb  XS'   UR                  S5      =n	b  XS'   UR                  S5      =n
b  XS'   UR                  S	5      =nb  XS	'   UR                  S
5      =nb  XS
'   UR                  S5      =nb  XS'   UR                  S5      =nb  XS'   UR                  S5      =nb  XS'   UR                  S5      =nb  [        U5      US'   UR                  S5      =nb  UUS'   UR                  S5      =nb  [        U5      US'   UR                  S5      =nb  UUS'   U " S0 UD6$ )3Initialize a Account object from a json dictionary.r:   r   r   rq   rN   rZ   r   r(   r   rz   r   r   r   r   r   r   r   r`   rC   r   )r   r   argsr:   r   r   rq   rN   rZ   r   r(   r   rz   r   r   r   r   r   r   r   s                       r   	from_dictAccount.from_dictt  s    99U##C0K))D/!B.J99U##C0Kii))F6#N%*YY/F%GG!T,A()"YY77MD$1!$yy):;;OH&5"#IIf%%D2LYYw''E4!M!IIn55LB#/ IIf%%D2L 99]33K@"-%*YY/F%GG!T,A()))L11J>!3J!?D))L11J>!+D))L11J>!3J!?D))L11J>!+D{T{r   c                 $    U R                  U5      $ )r   r   r   r   s     r   
_from_dictAccount._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                  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                   US'   [        U S5      (       a%  U R"                  b  [        U R"                  5      US'   [        U S5      (       a  U R$                  b  U R$                  US'   U$ )1Return a json dictionary representing this model.r:   r   r   rq   rN   rZ   r   r(   r   rz   r   r   r   r   r   r   r   )hasattrr:   r   r   rq   rN   rZ   r   r(   r   rz   r   r   r   r   r   r   r   r   r$   r   s     r   to_dictAccount.to_dict  s   4DHH$888E%L4477#6''E$K4DHH$888E%L4""t{{'>"kkE(O4011d6P6P6\-1-G-GE)*4))d.@.@.L%)%7%7E/"4*++0D0D0P'+';';E#$4  TYY%: IIE&M4!!djj&<!ZZE'N4((T->->-J$($5$5E.!4  TYY%: IIE&M4''D,<,<,H#'#3#3E- 4011d6P6P6\-1-G-GE)*4&&4??+F"4T__"EE,4&&4??+F"&//E,4&&4??+F"4T__"EE,4&&4??+F"&//E,r   c                 "    U R                  5       $ r   r   r$   s    r   _to_dictAccount._to_dict      ||~r   c                 H    [         R                  " U R                  5       SS9$ )z.Return a `str` version of this Account object.   indentrA   rB   r   r   s    r   __str__Account.__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__Account.__eq__  '    %00}}..r   c                     X:X  + $ zAReturn `true` when self and other are not equal, false otherwise.r`   r   s     r   __ne__Account.__ne__        r   )r   r   r   rN   rZ   r   r   r   r(   r   rz   r   rq   r   r   r   r:   )r   r   r   r   r   r   r   r   r   r"   r   r   r   r   r   r   r   r   r   r   r`   r   r   r   r     s   B " ! $/3'+)-"#&*#%)04)-$()-$('C% c]C% SM	C%
 c]C% C%  (}C%  }C% "#C% smC% }C% smC% tnC% c]C%  (~C%  X&!C%" SM#C%$ X&%C%& SM'C%( 
)C%J %d %y % %N $ $% %N4 4/I /$ /!I !$ !r   r   c            !       R   \ 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\\   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) AccountGroupi  a,  
An account group resource.

:param str url: (optional) The URL of the account group.
:param str id: (optional) The account group ID.
:param str crn: (optional) The Cloud Resource Name (CRN) of the account group.
:param str parent: (optional) The CRN of the parent of the account group.
:param str enterprise_account_id: (optional) The enterprise account ID.
:param str enterprise_id: (optional) The enterprise ID that the account group is
      a part of.
:param str enterprise_path: (optional) The path from the enterprise to this
      particular account group.
:param str name: (optional) The name of the account group.
:param str state: (optional) The state of the account group.
:param str primary_contact_iam_id: (optional) The IAM ID of the primary contact
      of the account group.
:param str primary_contact_email: (optional) The email address of the primary
      contact of the account group.
:param datetime created_at: (optional) The time stamp at which the account group
      was created.
:param str created_by: (optional) The IAM ID of the user or service that created
      the account group.
:param datetime updated_at: (optional) The time stamp at which the account group
      was last updated.
:param str updated_by: (optional) The IAM ID of the user or service that updated
      the account group.
Nr:   r   r   rq   rN   rZ   r   r(   r   r)   primary_contact_emailr   r   r   r   r:   r   r   rq   rN   rZ   r   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        Xl        Xl        g)aB  
Initialize a AccountGroup object.

:param str url: (optional) The URL of the account group.
:param str id: (optional) The account group ID.
:param str crn: (optional) The Cloud Resource Name (CRN) of the account
       group.
:param str parent: (optional) The CRN of the parent of the account group.
:param str enterprise_account_id: (optional) The enterprise account ID.
:param str enterprise_id: (optional) The enterprise ID that the account
       group is a part of.
:param str enterprise_path: (optional) The path from the enterprise to this
       particular account group.
:param str name: (optional) The name of the account group.
:param str state: (optional) The state of the account group.
:param str primary_contact_iam_id: (optional) The IAM ID of the primary
       contact of the account group.
:param str primary_contact_email: (optional) The email address of the
       primary contact of the account group.
:param datetime created_at: (optional) The time stamp at which the account
       group was created.
:param str created_by: (optional) The IAM ID of the user or service that
       created the account group.
:param datetime updated_at: (optional) The time stamp at which the account
       group was last updated.
:param str updated_by: (optional) The IAM ID of the user or service that
       updated the account group.
Nr   )r$   r:   r   r   rq   rN   rZ   r   r(   r   r)   r   r   r   r   r   s                   r   r"   AccountGroup.__init__  sU    ^ %:"*.	
&<#%:"$$$$r   r   c                    0 nUR                  S5      =nb  X2S'   UR                  S5      =nb  XBS'   UR                  S5      =nb  XRS'   UR                  S5      =nb  XbS'   UR                  S5      =nb  XrS'   UR                  S5      =nb  XS'   UR                  S5      =n	b  XS'   UR                  S5      =n
b  XS'   UR                  S	5      =nb  XS	'   UR                  S
5      =nb  XS
'   UR                  S5      =nb  XS'   UR                  S5      =nb  [        U5      US'   UR                  S5      =nb  XS'   UR                  S5      =nb  [        U5      US'   UR                  S5      =nb  UUS'   U " S0 UD6$ )8Initialize a AccountGroup object from a json dictionary.r:   r   r   rq   rN   rZ   r   r(   r   r)   r   r   r   r   r   r`   r   )r   r   r   r:   r   r   rq   rN   rZ   r   r(   r   r)   r   r   r   r   r   s                     r   r   AccountGroup.from_dict7  s    99U##C0K))D/!B.J99U##C0Kii))F6#N%*YY/F%GG!T,A()"YY77MD$1!$yy):;;OH&5"#IIf%%D2LYYw''E4!M&+ii0H&II"V-C)*%*YY/F%GG!T,A()))L11J>!3J!?D))L11J>!+))L11J>!3J!?D))L11J>!+D{T{r   c                 $    U R                  U5      $ )r   r   r   s     r   r   AccountGroup._from_dict[  r   r   c                 t   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                  US'   [        U S5      (       a%  U R                  b  [        U R                  5      US'   [        U S5      (       a  U R                   b  U R                   US'   U$ )r   r:   r   r   rq   rN   rZ   r   r(   r   r)   r   r   r   r   r   )r   r:   r   r   rq   rN   rZ   r   r(   r   r)   r   r   r   r   r   r   r   s     r   r   AccountGroup.to_dict`  sH   4DHH$888E%L4477#6''E$K4DHH$888E%L4""t{{'>"kkE(O4011d6P6P6\-1-G-GE)*4))d.@.@.L%)%7%7E/"4*++0D0D0P'+';';E#$4  TYY%: IIE&M4!!djj&<!ZZE'N4122t7R7R7^.2.I.IE*+4011d6P6P6\-1-G-GE)*4&&4??+F"4T__"EE,4&&4??+F"&//E,4&&4??+F"4T__"EE,4&&4??+F"&//E,r   c                 "    U R                  5       $ r   r   r   s    r   r   AccountGroup._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )z3Return a `str` version of this AccountGroup object.r   r   r   r   s    r   r   AccountGroup.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   AccountGroup.__eq__  r   r   c                     X:X  + $ r   r`   r   s     r   r   AccountGroup.__ne__  r   r   )r   r   r   rN   rZ   r   r   r(   rq   r   r)   r   r   r   r:   r   r   r   r   r   r   r   r   r"   r   r   r   r   r   r   r   r   r   r   r   r`   r   r   r   r     s   > " ! $/3'+)-"#04/3)-$()-$(#=% c]=% SM	=%
 c]=% =%  (}=%  }=% "#=% sm=% }=% !)=%  (}=% X&=% SM=%  X&!=%" SM#=%$ 
%=%~ !d !~ ! !F $ $! !F4 4/N /t /!N !t !r   r   c                       \ rS rSrSr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)CreateAccountGroupResponsei  z
A newly-created account group.

:param str account_group_id: (optional) The ID of the account group entity that
      was created.
NrO   rO   r   c                    Xl         g)z
Initialize a CreateAccountGroupResponse object.

:param str account_group_id: (optional) The ID of the account group entity
       that was created.
Nr  )r$   rO   s     r   r"   #CreateAccountGroupResponse.__init__  s
     !1r   r   c                 F    0 nUR                  S5      =nb  X2S'   U " S0 UD6$ )FInitialize a CreateAccountGroupResponse object from a json dictionary.rO   r`   rC   )r   r   r   rO   s       r   r   $CreateAccountGroupResponse.from_dict  s4      %		*< ==J'7#${T{r   c                 $    U R                  U5      $ )r  r   r   s     r   r   %CreateAccountGroupResponse._from_dict  r   r   c                 d    0 n[        U S5      (       a  U R                  b  U R                  US'   U$ )r   rO   )r   rO   r   s     r   r   "CreateAccountGroupResponse.to_dict  s6    4+,,1F1F1R(,(=(=E$%r   c                 "    U R                  5       $ r   r   r   s    r   r   #CreateAccountGroupResponse._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )zAReturn a `str` version of this CreateAccountGroupResponse object.r   r   r   r   s    r   r   "CreateAccountGroupResponse.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   !CreateAccountGroupResponse.__eq__  r   r   c                     X:X  + $ r   r`   r   s     r   r   !CreateAccountGroupResponse.__ne__  r   r   r   r   r   r   r   r   r   r"   r   r   r   r   r   r   r   r   r   r   r   r`   r   r   r  r    s     +/1 #3-1 
	1 d 'C   $ $ 4 4/8 /T /!8 !T !r   r  c                       \ rS rSrSr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  
The options object can be used to set properties on child accounts of an enterprise.
You can pass a field to to create IAM service id with IAM api keyg when creating a
child account in the enterprise. This is an optional field.

:param bool create_iam_service_id_with_apikey_and_owner_policies: (optional) By
      default create_iam_service_id_with_apikey_and_owner_policies is turned off for a
      newly created child account. You can enable this property by passing 'true' in
      this boolean field. IAM service id has account owner IAM policies and the API
      key associated with it can generate a token and setup resources in the account.
      This is an optional field.
N4create_iam_service_id_with_apikey_and_owner_policiesr#  r   c                    Xl         g)a  
Initialize a CreateAccountRequestOptions object.

:param bool create_iam_service_id_with_apikey_and_owner_policies:
       (optional) By default create_iam_service_id_with_apikey_and_owner_policies
       is turned off for a newly created child account. You can enable this
       property by passing 'true' in this boolean field. IAM service id has
       account owner IAM policies and the API key associated with it can generate
       a token and setup resources in the account. This is an optional field.
Nr"  )r$   r#  s     r   r"   $CreateAccountRequestOptions.__init__  s     EyAr   r   c                 J    0 nUR                  S5      =n b  UUS'   U " S0 UD6$ )GInitialize a CreateAccountRequestOptions object from a json dictionary.r#  r`   r  )r   r   r   r#  s       r   r   %CreateAccountRequestOptions.from_dict  sJ     DIIIFE @ 	 E GH {T{r   c                 $    U R                  U5      $ )r'  r   r   s     r   r   &CreateAccountRequestOptions._from_dict  r   r   c                 d    0 n[        U S5      (       a  U R                  b  U R                  US'   U$ )r   r#  )r   r#  r   s     r   r   #CreateAccountRequestOptions.to_dict  s>    DPQQIIU II HI r   c                 "    U R                  5       $ r   r   r   s    r   r   $CreateAccountRequestOptions._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )zBReturn a `str` version of this CreateAccountRequestOptions object.r   r   r   r   s    r   r   #CreateAccountRequestOptions.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   "CreateAccountRequestOptions.__eq__  r   r   c                     X:X  + $ r   r`   r   s     r   r   "CreateAccountRequestOptions.__ne__  r   r   )r   r   r   r   r   r   r   r"   r   r   r   r   r   r   r   r   r   r   r   r`   r   r   r|   r|     s      PTy ?Gtny 
	y" d 'D   $ $
 
4 4/9 /d /!9 !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)r{   i#  a  
The traits object can be used to set properties on child accounts of an enterprise.
You can pass a field to opt-out of the default multi-factor authentication setting or
enable enterprise-managed IAM when creating a child account in the enterprise. This is
an optional field.

:param str mfa: (optional) By default MFA is set to `NONE_NO_ROPC` on a child
      account, which disables CLI logins with only a password. To opt out, pass the
      traits object with the mfa field set to empty string. This is an optional field.
:param bool enterprise_iam_managed: (optional) By default enterprise-managed IAM
      is turned off for a newly created child account. You can enable this property by
      passing 'true' in this boolean field. Enabling enterprise-managed IAM allows the
      enterprise account to assign IAM resources, like access groups, trusted
      profiles, and account settings, to the child account. This is an optional field.
Nmfaenterprise_iam_managedr7  r8  r   c                    Xl         X l        g)a  
Initialize a CreateAccountRequestTraits object.

:param str mfa: (optional) By default MFA is set to `NONE_NO_ROPC` on a
       child account, which disables CLI logins with only a password. To opt out,
       pass the traits object with the mfa field set to empty string. This is an
       optional field.
:param bool enterprise_iam_managed: (optional) By default
       enterprise-managed IAM is turned off for a newly created child account. You
       can enable this property by passing 'true' in this boolean field. Enabling
       enterprise-managed IAM allows the enterprise account to assign IAM
       resources, like access groups, trusted profiles, and account settings, to
       the child account. This is an optional field.
Nr6  )r$   r7  r8  s      r   r"   #CreateAccountRequestTraits.__init__4  s    ( &<#r   r   c                 v    0 nUR                  S5      =nb  X2S'   UR                  S5      =nb  XBS'   U " S0 UD6$ )FInitialize a CreateAccountRequestTraits object from a json dictionary.r7  r8  r`   r  )r   r   r   r7  r8  s        r   r   $CreateAccountRequestTraits.from_dictK  sO     99U##C0K&+ii0H&II"V-C)*{T{r   c                 $    U R                  U5      $ )r<  r   r   s     r   r   %CreateAccountRequestTraits._from_dictU  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   r7  r8  )r   r7  r8  r   s     r   r   "CreateAccountRequestTraits.to_dictZ  sY    4DHH$888E%L4122t7R7R7^.2.I.IE*+r   c                 "    U R                  5       $ r   r   r   s    r   r   #CreateAccountRequestTraits._to_dictc  r   r   c                 H    [         R                  " U R                  5       SS9$ )zAReturn a `str` version of this CreateAccountRequestTraits object.r   r   r   r   s    r   r   "CreateAccountRequestTraits.__str__g  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   !CreateAccountRequestTraits.__eq__k  r   r   c                     X:X  + $ r   r`   r   s     r   r   !CreateAccountRequestTraits.__ne__q  r   r   )r8  r7  )r   r   r   r   r   r   r   r   r"   r   r   r   r   r   r   r   r   r   r   r`   r   r   r{   r{   #  s    & "15	= c]= !)	=
 
=. d 'C   $ $ 4 4/8 /T /!8 !T !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)CreateAccountResponseiv  a  
A newly-created account.

:param str account_id: (optional) The ID of the account entity that was created.
:param str iam_service_id: (optional) The iam_service_id of the account entity
      that was created.
:param str iam_apikey_id: (optional) The iam_apikey_id of the account entity
      that was created.
:param str iam_apikey: (optional) The iam_apikey of the account entity with
      owner iam policies that was created.
NrP   iam_service_idiam_apikey_id
iam_apikeyrP   rM  rN  rO  r   c                4    Xl         X l        X0l        X@l        g)a  
Initialize a CreateAccountResponse object.

:param str account_id: (optional) The ID of the account entity that was
       created.
:param str iam_service_id: (optional) The iam_service_id of the account
       entity that was created.
:param str iam_apikey_id: (optional) The iam_apikey_id of the account
       entity that was created.
:param str iam_apikey: (optional) The iam_apikey of the account entity with
       owner iam policies that was created.
NrL  )r$   rP   rM  rN  rO  s        r   r"   CreateAccountResponse.__init__  s    ( %,*$r   r   c                     0 nUR                  S5      =nb  X2S'   UR                  S5      =nb  XBS'   UR                  S5      =nb  XRS'   UR                  S5      =nb  XbS'   U " S0 UD6$ )AInitialize a CreateAccountResponse object from a json dictionary.rP   rM  rN  rO  r`   r  )r   r   r   rP   rM  rN  rO  s          r   r   CreateAccountResponse.from_dict  s     ))L11J>!+#ii(899NF%3!""YY77MD$1!))L11J>!+{T{r   c                 $    U R                  U5      $ )rS  r   r   s     r   r    CreateAccountResponse._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   rP   rM  rN  rO  )r   rP   rM  rN  rO  r   s     r   r   CreateAccountResponse.to_dict  s    4&&4??+F"&//E,4)**t/B/B/N&*&9&9E"#4))d.@.@.L%)%7%7E/"4&&4??+F"&//E,r   c                 "    U R                  5       $ r   r   r   s    r   r   CreateAccountResponse._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )z<Return a `str` version of this CreateAccountResponse object.r   r   r   r   s    r   r   CreateAccountResponse.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   CreateAccountResponse.__eq__  r   r   c                     X:X  + $ r   r`   r   s     r   r   CreateAccountResponse.__ne__  r   r   )rP   rO  rN  rM  r   r`   r   r   rK  rK  v  s    
 %)(,'+$(% SM% !	%
  }% SM% 
%2 d '>   $ $ 4 4/3 / /!3 ! !r   rK  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)CreateEnterpriseResponsei  a|  
The response from calling create enterprise.

:param str enterprise_id: (optional) The ID of the enterprise entity that was
      created. This entity is the root of the hierarchy.
:param str enterprise_account_id: (optional) The ID of the enterprise account
      that was created. The enterprise account is used to manage billing and access to
      the enterprise management.
NrZ   rN   rZ   rN   r   c                    Xl         X l        g)a  
Initialize a CreateEnterpriseResponse object.

:param str enterprise_id: (optional) The ID of the enterprise entity that
       was created. This entity is the root of the hierarchy.
:param str enterprise_account_id: (optional) The ID of the enterprise
       account that was created. The enterprise account is used to manage billing
       and access to the enterprise management.
Nrc  )r$   rZ   rN   s      r   r"   !CreateEnterpriseResponse.__init__  s     +%:"r   r   c                 v    0 nUR                  S5      =nb  X2S'   UR                  S5      =nb  XBS'   U " S0 UD6$ )DInitialize a CreateEnterpriseResponse object from a json dictionary.rZ   rN   r`   r  )r   r   r   rZ   rN   s        r   r   "CreateEnterpriseResponse.from_dict  sP     "YY77MD$1!%*YY/F%GG!T,A(){T{r   c                 $    U R                  U5      $ )rg  r   r   s     r   r   #CreateEnterpriseResponse._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   rZ   rN   )r   rZ   rN   r   s     r   r    CreateEnterpriseResponse.to_dict  s^    4))d.@.@.L%)%7%7E/"4011d6P6P6\-1-G-GE)*r   c                 "    U R                  5       $ r   r   r   s    r   r   !CreateEnterpriseResponse._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )z?Return a `str` version of this CreateEnterpriseResponse object.r   r   r   r   s    r   r    CreateEnterpriseResponse.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   CreateEnterpriseResponse.__eq__  r   r   c                     X:X  + $ r   r`   r   s     r   r   CreateEnterpriseResponse.__ne__  r   r   )rN   rZ   r   r`   r   r   rb  rb    s     (,/3	;  };  (}	;
 
;$ d 'A   $ $ 4 4/6 /4 /!6 !4 !r   rb  c                   F   \ 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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)
Enterprisei  a  
An enterprise resource.

:param str url: (optional) The URL of the enterprise.
:param str id: (optional) The enterprise ID.
:param str enterprise_account_id: (optional) The enterprise account ID.
:param str crn: (optional) The Cloud Resource Name (CRN) of the enterprise.
:param str name: (optional) The name of the enterprise.
:param str domain: (optional) The domain of the enterprise.
:param str state: (optional) The state of the enterprise.
:param str primary_contact_iam_id: (optional) The IAM ID of the primary contact
      of the enterprise, such as `IBMid-0123ABC`.
:param str primary_contact_email: (optional) The email of the primary contact of
      the enterprise.
:param str source_account_id: (optional) The ID of the account that is used to
      create the enterprise.
:param datetime created_at: (optional) The time stamp at which the enterprise
      was created.
:param str created_by: (optional) The IAM ID of the user or service that created
      the enterprise.
:param datetime updated_at: (optional) The time stamp at which the enterprise
      was last updated.
:param str updated_by: (optional) The IAM ID of the user or service that updated
      the enterprise.
Nr:   r   rN   r   r(   r&   r   r)   r   r'   r   r   r   r   r:   r   rN   r   r(   r&   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        Xl        g)a  
Initialize a Enterprise object.

:param str url: (optional) The URL of the enterprise.
:param str id: (optional) The enterprise ID.
:param str enterprise_account_id: (optional) The enterprise account ID.
:param str crn: (optional) The Cloud Resource Name (CRN) of the enterprise.
:param str name: (optional) The name of the enterprise.
:param str domain: (optional) The domain of the enterprise.
:param str state: (optional) The state of the enterprise.
:param str primary_contact_iam_id: (optional) The IAM ID of the primary
       contact of the enterprise, such as `IBMid-0123ABC`.
:param str primary_contact_email: (optional) The email of the primary
       contact of the enterprise.
:param str source_account_id: (optional) The ID of the account that is used
       to create the enterprise.
:param datetime created_at: (optional) The time stamp at which the
       enterprise was created.
:param str created_by: (optional) The IAM ID of the user or service that
       created the enterprise.
:param datetime updated_at: (optional) The time stamp at which the
       enterprise was last updated.
:param str updated_by: (optional) The IAM ID of the user or service that
       updated the enterprise.
Nrw  )r$   r:   r   rN   r   r(   r&   r   r)   r   r'   r   r   r   r   s                  r   r"   Enterprise.__init__2  sO    V %:"	
&<#%:"!2$$$$r   r   c                    0 nUR                  S5      =nb  X2S'   UR                  S5      =nb  XBS'   UR                  S5      =nb  XRS'   UR                  S5      =nb  XbS'   UR                  S5      =nb  XrS'   UR                  S5      =nb  XS'   UR                  S5      =n	b  XS'   UR                  S5      =n
b  XS'   UR                  S	5      =nb  XS	'   UR                  S
5      =nb  XS
'   UR                  S5      =nb  [        U5      US'   UR                  S5      =nb  XS'   UR                  S5      =nb  [        U5      US'   UR                  S5      =nb  UUS'   U " S0 UD6$ )6Initialize a Enterprise object from a json dictionary.r:   r   rN   r   r(   r&   r   r)   r   r'   r   r   r   r   r`   r   )r   r   r   r:   r   rN   r   r(   r&   r   r)   r   r'   r   r   r   r   s                    r   r   Enterprise.from_dictl  s    99U##C0K))D/!B.J%*YY/F%GG!T,A()99U##C0KIIf%%D2Lii))F6#NYYw''E4!M&+ii0H&II"V-C)*%*YY/F%GG!T,A()!&+>!??L(9$%))L11J>!3J!?D))L11J>!+))L11J>!3J!?D))L11J>!+D{T{r   c                 $    U R                  U5      $ )r{  r   r   s     r   r   Enterprise._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                  5      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                  US'   U$ )r   r:   r   rN   r   r(   r&   r   r)   r   r'   r   r   r   r   )r   r:   r   rN   r   r(   r&   r   r)   r   r'   r   r   r   r   r   r   s     r   r   Enterprise.to_dict  s    4DHH$888E%L4477#6''E$K4011d6P6P6\-1-G-GE)*4DHH$888E%L4  TYY%: IIE&M4""t{{'>"kkE(O4!!djj&<!ZZE'N4122t7R7R7^.2.I.IE*+4011d6P6P6\-1-G-GE)*4,--$2H2H2T)-)?)?E%&4&&4??+F"4T__"EE,4&&4??+F"&//E,4&&4??+F"4T__"EE,4&&4??+F"&//E,r   c                 "    U R                  5       $ r   r   r   s    r   r   Enterprise._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )z1Return a `str` version of this Enterprise object.r   r   r   r   s    r   r   Enterprise.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   Enterprise.__eq__  r   r   c                     X:X  + $ r   r`   r   s     r   r   Enterprise.__ne__  r   r   )r   r   r   r&   rN   r   r(   r   r)   r'   r   r   r   r:   r
  r`   r   r   rv  rv    s   : " /3!" $#04/3+/)-$()-$(!8% c]8% SM	8%
  (}8% c]8% sm8% 8% }8% !)8%  (}8% $C=8% X&8% SM8% X&8%  SM!8%" 
#8%t d |  B $ $ B4 4/L /T /!L !T !r   rv  c            	           \ rS rSrSr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)ListAccountGroupsResponsei  aJ  
The list_account_groups operation response.

:param int rows_count: (optional) The number of enterprises returned from
      calling list account groups.
:param str next_url: (optional) A string that represents the link to the next
      page of results.
:param List[AccountGroup] resources: (optional) A list of account groups.
N
rows_countnext_url	resourcesr  r  r  r   r   c                (    Xl         X l        X0l        g)aO  
Initialize a ListAccountGroupsResponse object.

:param int rows_count: (optional) The number of enterprises returned from
       calling list account groups.
:param str next_url: (optional) A string that represents the link to the
       next page of results.
:param List[AccountGroup] resources: (optional) A list of account groups.
Nr  r$   r  r  r  s       r   r"   "ListAccountGroupsResponse.__init__        % "r   r   c                     0 nUR                  S5      =nb  X2S'   UR                  S5      =nb  XBS'   UR                  S5      =nb)  U Vs/ s H  n[        R                  U5      PM     snUS'   U " S0 UD6$ s  snf )EInitialize a ListAccountGroupsResponse object from a json dictionary.r  r  r  r`   )rC   r   r   r   r   r   r  r  r  rI   s          r   r   #ListAccountGroupsResponse.from_dict  s     ))L11J>!+		*--H:';//I<DM NIq!7!7!:I ND{T{ !O   A8c                 $    U R                  U5      $ )r  r   r   s     r   r   $ListAccountGroupsResponse._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      (       am  U R                  b`  / nU R                   HJ  n[	        U[
        5      (       a  UR                  U5        M+  UR                  UR                  5       5        ML     X!S'   U$ r   r  r  r  r   r  r  r  r   rc   appendr   r$   r   resources_listrI   s       r   r   !ListAccountGroupsResponse.to_dict      4&&4??+F"&//E,4$$)B $E*4%%$..*DN^^a&&"))!,"))!))+6	 $
 "0+r   c                 "    U R                  5       $ r   r   r   s    r   r   "ListAccountGroupsResponse._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )z@Return a `str` version of this ListAccountGroupsResponse object.r   r   r   r   s    r   r   !ListAccountGroupsResponse.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r    ListAccountGroupsResponse.__eq__  r   r   c                     X:X  + $ r   r`   r   s     r   r    ListAccountGroupsResponse.__ne__  r   r   r  r  r  r   r   r   r   r   r   r   r   r   r"   r   r   r   r   r   r   r   r   r   r   r   r`   r   r   r  r    s     %)"&48# SM# 3-	#
 D01# 
#( 	d 	'B 	 	 $ $ "4 4/7 /D /!7 !D !r   r  c            	           \ rS rSrSr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)ListAccountsResponsei  a3  
The list_accounts operation response.

:param int rows_count: (optional) The number of enterprises returned from
      calling list accounts.
:param str next_url: (optional) A string that represents the link to the next
      page of results.
:param List[Account] resources: (optional) A list of accounts.
Nr  r  r  r  r   r   c                (    Xl         X l        X0l        g)a9  
Initialize a ListAccountsResponse object.

:param int rows_count: (optional) The number of enterprises returned from
       calling list accounts.
:param str next_url: (optional) A string that represents the link to the
       next page of results.
:param List[Account] resources: (optional) A list of accounts.
Nr  r  s       r   r"   ListAccountsResponse.__init__&  r  r   r   c                     0 nUR                  S5      =nb  X2S'   UR                  S5      =nb  XBS'   UR                  S5      =nb)  U Vs/ s H  n[        R                  U5      PM     snUS'   U " S0 UD6$ s  snf )@Initialize a ListAccountsResponse object from a json dictionary.r  r  r  r`   )rC   r   r   r  s          r   r   ListAccountsResponse.from_dict:  s     ))L11J>!+		*--H:';//I<?H Iy!!2!21!5y ID{T{ !Jr  c                 $    U R                  U5      $ )r  r   r   s     r   r   ListAccountsResponse._from_dictF  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      (       am  U R                  b`  / nU R                   HJ  n[	        U[
        5      (       a  UR                  U5        M+  UR                  UR                  5       5        ML     X!S'   U$ r  r  r  s       r   r   ListAccountsResponse.to_dictK  r  r   c                 "    U R                  5       $ r   r   r   s    r   r   ListAccountsResponse._to_dict\  r   r   c                 H    [         R                  " U R                  5       SS9$ )z;Return a `str` version of this ListAccountsResponse object.r   r   r   r   s    r   r   ListAccountsResponse.__str__`  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   ListAccountsResponse.__eq__d  r   r   c                     X:X  + $ r   r`   r   s     r   r   ListAccountsResponse.__ne__j  r   r   r  r  r`   r   r   r  r    s     %)"&/3# SM# 3-	#
 DO,# 
#( 	d 	'= 	 	 $ $ "4 4/2 /t /!2 !t !r   r  c            	           \ rS rSrSr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)ListEnterprisesResponseio  aH  
The response from calling list enterprises.

:param int rows_count: (optional) The number of enterprises returned from
      calling list enterprise.
:param str next_url: (optional) A string that represents the link to the next
      page of results.
:param List[Enterprise] resources: (optional) A list of enterprise objects.
Nr  r  r  r  rv  r   c                (    Xl         X l        X0l        g)aK  
Initialize a ListEnterprisesResponse object.

:param int rows_count: (optional) The number of enterprises returned from
       calling list enterprise.
:param str next_url: (optional) A string that represents the link to the
       next page of results.
:param List[Enterprise] resources: (optional) A list of enterprise objects.
Nr  r  s       r   r"    ListEnterprisesResponse.__init__z  r  r   r   c                     0 nUR                  S5      =nb  X2S'   UR                  S5      =nb  XBS'   UR                  S5      =nb)  U Vs/ s H  n[        R                  U5      PM     snUS'   U " S0 UD6$ s  snf )CInitialize a ListEnterprisesResponse object from a json dictionary.r  r  r  r`   )rC   rv  r   r  s          r   r   !ListEnterprisesResponse.from_dict  s     ))L11J>!+		*--H:';//I<BK L)Q!5!5a!8) LD{T{ !Mr  c                 $    U R                  U5      $ )r  r   r   s     r   r   "ListEnterprisesResponse._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      (       am  U R                  b`  / nU R                   HJ  n[	        U[
        5      (       a  UR                  U5        M+  UR                  UR                  5       5        ML     X!S'   U$ r  r  r  s       r   r   ListEnterprisesResponse.to_dict  r  r   c                 "    U R                  5       $ r   r   r   s    r   r    ListEnterprisesResponse._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )z>Return a `str` version of this ListEnterprisesResponse object.r   r   r   r   s    r   r   ListEnterprisesResponse.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   ListEnterprisesResponse.__eq__  r   r   c                     X:X  + $ r   r`   r   s     r   r   ListEnterprisesResponse.__ne__  r   r   r  r  r`   r   r   r  r  o  s     %)"&26# SM# 3-	#
 D./# 
#( 	d 	'@ 	 	 $ $ "4 4/5 /$ /!5 !$ !r   r  c                   ~    \ rS rSrSrSSSSS.S\S\S\S\S	\S
S4S jjrS
\	4S jr
S
\\   4S jrS
\\   4S jrSrg)EnterprisesPageri  zT
EnterprisesPager can be used to simplify the use of the "list_enterprises" method.
N)rN   rO   rP   rR   clientrN   rO   rP   rR   r   c                `    SU l         Xl        SS0U l        X l        X0l        X@l        XPl        g)a  
Initialize a EnterprisesPager object.
:param str enterprise_account_id: (optional) Get enterprises for a given
       enterprise account ID.
:param str account_group_id: (optional) Get enterprises for a given account
       group ID.
:param str account_id: (optional) Get enterprises for a given account ID.
:param int limit: (optional) Return results up to this limit. Valid values
       are between `0` and `100`.
TnextN)	_has_next_client_page_context_enterprise_account_id_account_group_id_account_id_limit)r$   r  rN   rO   rP   rR   s         r   r"   EnterprisesPager.__init__  s3    & $d^&;#!1%r   c                     U R                   $ zE
Returns true if there are potentially more results to be retrieved.
r  r   s    r   has_nextEnterprisesPager.has_next       ~~r   c           	         U R                  5       (       d	  [        SS9eU R                  R                  U R                  U R
                  U R                  U R                  U R                  R                  S5      S9R                  5       nSnUR                  S5      nUb  [        US5      nX R                  S'   Uc  SU l        UR                  S	5      $ )
z
Returns the next page of results.
:return: A List[dict], where each element is a dict that represents an instance of Enterprise.
:rtype: List[dict]
No more results availablemessager  )rN   rO   rP   rR   rQ   Nr  rQ   Fr  )r  StopIterationr  rT   r  r  r  r  r  rC   
get_resultr	   r  r$   resultr  next_page_links       r   get_nextEnterprisesPager.get_next  s     }}(CDD.."&"="=!33''++))--f5 / 
 *, 	 J/%"><@D%)6"<"DNzz+&&r   c                     / nU R                  5       (       a8  U R                  5       nUR                  U5        U R                  5       (       a  M8  U$ )z
Returns all results by invoking get_next() repeatedly
until all pages of results have been retrieved.
:return: A List[dict], where each element is a dict that represents an instance of Enterprise.
:rtype: List[dict]
r  r  extendr$   results	next_pages      r   get_allEnterprisesPager.get_all		  ?     mmooINN9% mmoo r   )r  r  r  r  r  r  r  )r   r   r   r   r   r   r   r   r"   r   r  r   rc   r  r  r   r`   r   r   r  r    s     &* $ '  #	
    
6$ '$t* '6d r   r  c                       \ rS rSrSrSSSSSS.S\S\S\S\S	\S
\SS4S jjr	S\4S jr
S\\   4S jrS\\   4S jrSrg)AccountsPageri	  zN
AccountsPager can be used to simplify the use of the "list_accounts" method.
N)rZ   rO   rq   rR   r   r  rZ   rO   rq   rR   r   r   c                l    SU l         Xl        SS0U l        X l        X0l        X@l        XPl        X`l        g)a  
Initialize a AccountsPager object.
:param str enterprise_id: (optional) Get accounts that are either immediate
       children or are a part of the hierarchy for a given enterprise ID.
:param str account_group_id: (optional) Get accounts that are either
       immediate children or are a part of the hierarchy for a given account group
       ID.
:param str parent: (optional) Get accounts that are either immediate
       children or are a part of the hierarchy for a given parent CRN.
:param int limit: (optional) Return results up to this limit. Valid values
       are between `0` and `100`.
:param bool include_deleted: (optional) Include the deleted accounts from
       an enterprise when used in conjunction with enterprise_id.
Tr  N)r  r  r  _enterprise_idr  _parentr  _include_deleted)r$   r  rZ   rO   rq   rR   r   s          r   r"   AccountsPager.__init__	  s8    0 $d^+!1 /r   c                     U R                   $ r  r  r   s    r   r  AccountsPager.has_next=	  r  r   c           
         U R                  5       (       d	  [        SS9eU R                  R                  U R                  U R
                  U R                  U R                  U R                  U R                  R                  S5      S9R                  5       nSnUR                  S5      nUb  [        US5      nX R                  S'   Uc  SU l        UR                  S	5      $ )
z
Returns the next page of results.
:return: A List[dict], where each element is a dict that represents an instance of Account.
:rtype: List[dict]
r  r  r  )rZ   rO   rq   rR   r   rQ   Nr  rQ   Fr  )r  r  r  r   r  r  r  r  r  r  rC   r  r	   r  r  s       r   r  AccountsPager.get_nextC	  s     }}(CDD++--!33<<++ 11))--f5 , 
 *, 	 J/%"><@D%)6"<"DNzz+&&r   c                     / nU R                  5       (       a8  U R                  5       nUR                  U5        U R                  5       (       a  M8  U$ )z
Returns all results by invoking get_next() repeatedly
until all pages of results have been retrieved.
:return: A List[dict], where each element is a dict that represents an instance of Account.
:rtype: List[dict]
r  r  s      r   r  AccountsPager.get_all_	  r  r   )r  r  r  r  r  r  r  r  r   r   r   r   r   r   r   r   r   r"   r  r   rc   r  r  r   r`   r   r   r  r  	  s     " $ $0 '0 	0
 0 0 0 0 
0B$ '$t* '8d r   r  c                       \ rS rSrSrSSSSSS.S\S\S\S\S	\S
\SS4S jjr	S\4S jr
S\\   4S jrS\\   4S jrSrg)AccountGroupsPagerim	  zY
AccountGroupsPager can be used to simplify the use of the "list_account_groups" method.
N)rZ   r   rq   rR   r   r  rZ   r   rq   rR   r   r   c                l    SU l         Xl        SS0U l        X l        X0l        X@l        XPl        X`l        g)a  
Initialize a AccountGroupsPager object.
:param str enterprise_id: (optional) Get account groups that are either
       immediate children or are a part of the hierarchy for a given enterprise
       ID.
:param str parent_account_group_id: (optional) Get account groups that are
       either immediate children or are a part of the hierarchy for a given
       account group ID.
:param str parent: (optional) Get account groups that are either immediate
       children or are a part of the hierarchy for a given parent CRN.
:param int limit: (optional) Return results up to this limit. Valid values
       are between `0` and `100`.
:param bool include_deleted: (optional) Include the deleted account groups
       from an enterprise when used in conjunction with other query parameters.
Tr  N)r  r  r  r  _parent_account_group_idr  r  r  )r$   r  rZ   r   rq   rR   r   s          r   r"   AccountGroupsPager.__init__r	  s8    2 $d^+(?% /r   c                     U R                   $ r  r  r   s    r   r  AccountGroupsPager.has_next	  r  r   c           
         U R                  5       (       d	  [        SS9eU R                  R                  U R                  U R
                  U R                  U R                  U R                  U R                  R                  S5      S9R                  5       nSnUR                  S5      nUb  [        US5      nX R                  S'   Uc  SU l        UR                  S	5      $ )
z
Returns the next page of results.
:return: A List[dict], where each element is a dict that represents an instance of AccountGroup.
:rtype: List[dict]
r  r  r  )rZ   r   rq   rR   r   rQ   Nr  rQ   Fr  )r  r  r  r   r  r
  r  r  r  r  rC   r  r	   r  r  s       r   r  AccountGroupsPager.get_next	  s     }}(CDD11--$($A$A<<++ 11))--f5 2 
 *, 	 J/%"><@D%)6"<"DNzz+&&r   c                     / nU R                  5       (       a8  U R                  5       nUR                  U5        U R                  5       (       a  M8  U$ )z
Returns all results by invoking get_next() repeatedly
until all pages of results have been retrieved.
:return: A List[dict], where each element is a dict that represents an instance of AccountGroup.
:rtype: List[dict]
r  r  s      r   r  AccountGroupsPager.get_all	  r  r   )r  r  r  r  r  r  r  r
  r  r`   r   r   r  r  m	  s     "'+ $ 0 ' 0 	 0
 "% 0  0  0  0 
 0D$ '$t* '8d r   r  )$r   r   typingr   r   r   rA   ibm_cloud_sdk_corer   r   r	   /ibm_cloud_sdk_core.authenticators.authenticatorr
   $ibm_cloud_sdk_core.get_authenticatorr   ibm_cloud_sdk_core.utilsr   r   r   commonr   r   r   r   r  r|   r{   rK  rb  rv  r  r  r  r  r  r  r`   r   r   <module>r     s   &  ' '  M M I S Z Z #^[ ^LH! H!Vx! x!v9! 9!xN! N!bP! P!fV! V!rE! E!Pm! m!`Q! Q!hQ! Q!hQ! Q!rL L^S SlT Tr   