
    imc                       S r SSKJ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  SSKJr  SSKJr  SS	KJrJr  S
SKJr   " S S\
5      r " S S5      r " S S5      r " S S5      r " S S5      r " S S5      r " S S5      r " 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 Partner Management APIs enable you to manage the IBM Cloud partner entities and fetch
multiple reports in different formats.

API Version: 1.0.0
    )datetime)Enum)DictListOptionalN)BaseServiceDetailedResponse)Authenticator)"get_authenticator_from_environment)datetime_to_stringstring_to_datetime   )get_sdk_headersc                   b   \ rS rSrSrSrSr\\4S\SS 4S jj5       r	 SS	\
SS4S
 jjrSSSSSSSSS.S\S\\   S\\   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\4S jjrSrg)PartnerManagementV1+   z"The Partner Management V1 service.zhttps://partner.cloud.ibm.compartner_managementservice_namereturnc                 N    [        U5      nU " U5      nUR                  U5        U$ )zz
Return a new client for the Partner Management service using the specified
       parameters and external configuration.
)r   configure_service)clsr   authenticatorservices       e/home/james-whalen/.local/lib/python3.13/site-packages/ibm_platform_services/partner_management_v1.pynew_instance PartnerManagementV1.new_instance1   s+     ;<Hm$!!,/    Nr   c                 B    [         R                  " X R                  US9  g)a9  
Construct a new client for the Partner 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!   PartnerManagementV1.__init__?   s     	T/G/GWder   )reseller_idcustomer_idchildrenmonth	viewpointrecurselimitoffset
partner_idr%   r&   r'   r(   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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  
Get partner resource usage report.

Returns the summary for the partner for a given month. Partner billing managers
are authorized to access this report.

:param str partner_id: Enterprise ID of the distributor or reseller for
       which the report is requested.
:param str reseller_id: (optional) Enterprise ID of the reseller for which
       the report is requested. This parameter cannot be used along with
       `customer_id` query parameter.
:param str customer_id: (optional) Account ID/Enterprise ID of the end
       customer for which the report is requested. This parameter cannot be used
       along with `reseller_id` query parameter.
:param bool children: (optional) Get report rolled-up to the direct
       children of the requested entity. Defaults to false. This parameter cannot
       be used along with `customer_id` query parameter.
:param str month: (optional) The billing month for which the usage report
       is requested. Format is `yyyy-mm`. Defaults to current month.
:param str viewpoint: (optional) Enables partner to view the cost of
       provisioned services as applicable at the given level. Defaults to the type
       of the calling partner. The valid values are `DISTRIBUTOR`, `RESELLER` and
       `END_CUSTOMER`.
:param bool recurse: (optional) Get usage report rolled-up to the end
       customers of the requesting partner. Defaults to false. This parameter
       cannot be used along with `reseller_id` query parameter or `customer_id`
       query parameter.
:param int limit: (optional) Number of usage records to be returned. The
       default value is 30. Maximum value is 100.
:param str offset: (optional) An opaque value representing the offset of
       the first item to be returned by a search query. If not specified, then the
       first page of results is returned. To retrieve the next page of search
       results, use the 'offset' query parameter value within the 'next.href' URL
       found within a prior search query response.
: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 `PartnerUsageReportSummary` object
partner_id must be providedV1get_resource_usage_reportr   service_versionoperation_id	r-   r%   r&   r'   r(   r)   r*   r+   r,   headersapplication/jsonAcceptz/v1/resource-usage-reportsGETmethodurlr6   params
ValueErrorr   DEFAULT_SERVICE_NAMEupdategetprepare_requestsend)r#   r-   r%   r&   r'   r(   r)   r*   r+   r,   kwargsr6   sdk_headersr=   r<   requestresponses                    r   r1   -PartnerManagementV1.get_resource_usage_reportP   s    j :;;%22 4

 	{# %&& "

 NN6::i01y!.*&&	 ' 
 99W//r   )r&   r%   dater+   rJ   c                4   U(       d  [        S5      e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$ )aL  
Get customers billing options.

Returns the billing options for the requested customer for a given month.

:param str partner_id: Enterprise ID of the distributor or reseller for
       which the report is requested.
:param str customer_id: (optional) Account ID/Enterprise ID of the end
       customer for which the report is requested. This parameter cannot be used
       along with `reseller_id` query parameter.
:param str reseller_id: (optional) Enterprise ID of the reseller for which
       the report is requested. This parameter cannot be used along with
       `customer_id` query parameter.
:param str date: (optional) The billing month for which the report is
       requested. Format is yyyy-mm. Defaults to current month.
:param int limit: (optional) Number of billing option reports returned. The
       default value is 200. Maximum value is 200.
: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 `BillingOptionsSummary` object
r/   r0   get_billing_optionsr2   r-   r&   r%   rJ   r+   r6   r7   r8   z/v1/billing-optionsr9   r:   r>   r#   r-   r&   r%   rJ   r+   rE   r6   rF   r=   r<   rG   rH   s                r   rL   'PartnerManagementV1.get_billing_options   s    @ :;;%22 .

 	{# %&&
 NN6::i01y!.#&&	 ' 
 99W//r   c                4   U(       d  [        S5      e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$ )at  
Get credit pools report.

Returns the subscription or commitment burn-down reports for the end customers for
a given month.

:param str partner_id: Enterprise ID of the distributor or reseller for
       which the report is requested.
:param str customer_id: (optional) Account ID/Enterprise ID of the end
       customer for which the report is requested. This parameter cannot be used
       along with `reseller_id` query parameter.
:param str reseller_id: (optional) Enterprise ID of the reseller for which
       the report is requested. This parameter cannot be used along with
       `customer_id` query parameter.
:param str date: (optional) The billing month for which the report is
       requested. Format is yyyy-mm. Defaults to current month.
:param int limit: (optional) Number of billing units fetched to get the
       credit pools report. The default value is 30. Maximum value is 30.
: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 `CreditPoolsReportSummary` object
r/   r0   get_credit_pools_reportr2   rM   r6   r7   r8   z/v1/credit-poolsr9   r:   r>   rN   s                r   rQ   +PartnerManagementV1.get_credit_pools_report   s    B :;;%22 2

 	{# %&&
 NN6::i01y!. &&	 ' 
 99W//r    )N)__name__
__module____qualname____firstlineno____doc__r"   r@   classmethodstrr   r
   r!   r   boolintr	   r1   rL   rQ   __static_attributes__rS   r   r   r   r   +   s   ,9/ 1 
  (,f$f 
f* &*%)#'##'"&# $YY c]	Y
 c]Y 4.Y }Y C=Y $Y }Y Y 
YF &*%)"#@@ c]	@
 c]@ sm@ }@ 
@T &*%)"#AA c]	A
 c]A smA }A 
A Ar   r   c                   0    \ rS rSrSr " S S\\5      rSrg)GetResourceUsageReportEnumsi9  z1
Enums for get_resource_usage_report parameters.
c                   $    \ rS rSrSrSrSrSrSrg)%GetResourceUsageReportEnums.Viewpointi>  z
Enables partner to view the cost of provisioned services as applicable at the
given level. Defaults to the type of the calling partner. The valid values are
`DISTRIBUTOR`, `RESELLER` and `END_CUSTOMER`.
DISTRIBUTORRESELLEREND_CUSTOMERrS   N)	rT   rU   rV   rW   rX   rb   rc   rd   r]   rS   r   r   	Viewpointra   >  s    	 $%r   re   rS   N)	rT   rU   rV   rW   rX   rZ   r   re   r]   rS   r   r   r_   r_   9  s    	&C 	&r   r_   c            5       0   \ 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\\	   S\\	   S\\   S\\   S\\   S\\   S\\   S\\   S\\   S\\   S\\
   S\\   S\\   S\\   S\\   SS44S 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) S*\\5      r " S+ S,\\5      r " S- S.\\5      r " S/ S0\\5      rS1rg)2BillingOptioniO  a  
Billing options report for the end customers.

:param str id: (optional) The ID of the billing option.
:param str billing_unit_id: (optional) The ID of the billing unit that's
      associated with the billing option.
:param str customer_id: (optional) Account ID of the customer.
:param str customer_type: (optional) The customer type. The valid values are
      `ENTERPRISE`, `ACCOUNT`, and `ACCOUNT_GROUP`.
:param str customer_name: (optional) A user-defined name for the customer.
:param str reseller_id: (optional) ID of the reseller in the heirarchy of the
      requested customer.
:param str reseller_name: (optional) Name of the reseller in the heirarchy of
      the requested customer.
:param str month: (optional) The billing month for which the burn-down report is
      requested. Format is yyyy-mm. Defaults to current month.
:param List[dict] errors: (optional) Errors in the billing.
:param str type: (optional) The type of billing option. The valid values are
      `SUBSCRIPTION` and `OFFER`.
:param datetime start_date: (optional) The start date of billing option.
:param datetime end_date: (optional) The end date of billing option.
:param str state: (optional) The state of the billing option. The valid values
      include `ACTIVE, `SUSPENDED`, and `CANCELED`.
:param str category: (optional) The category of the billing option. The valid
      values are `PLATFORM`, `SERVICE`, and `SUPPORT`.
:param dict payment_instrument: (optional) The payment method for support.
:param str part_number: (optional) Part number of the offering.
:param str catalog_id: (optional) ID of the catalog containing this offering.
:param str order_id: (optional) ID of the order containing this offering.
:param str po_number: (optional) PO Number of the offering.
:param str subscription_model: (optional) Subscription model.
:param int duration_in_months: (optional) The duration of the billing options in
      months.
:param float monthly_amount: (optional) Amount billed monthly for this offering.
:param dict billing_system: (optional) The support billing system.
:param str country_code: (optional) The country code for the billing unit.
:param str currency_code: (optional) The currency code of the billing unit.
Nidbilling_unit_idr&   customer_typecustomer_namer%   reseller_namer(   errorstype
start_dateend_datestatecategorypayment_instrumentpart_number
catalog_idorder_id	po_numbersubscription_modelduration_in_monthsmonthly_amountbilling_systemcountry_codecurrency_coderi   rj   r&   rk   rl   r%   rm   r(   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   c                D   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        UU l        UU l        UU l        UU l        UU l        UU l        UU l        UU l        g)a  
Initialize a BillingOption object.

:param str id: (optional) The ID of the billing option.
:param str billing_unit_id: (optional) The ID of the billing unit that's
       associated with the billing option.
:param str customer_id: (optional) Account ID of the customer.
:param str customer_type: (optional) The customer type. The valid values
       are `ENTERPRISE`, `ACCOUNT`, and `ACCOUNT_GROUP`.
:param str customer_name: (optional) A user-defined name for the customer.
:param str reseller_id: (optional) ID of the reseller in the heirarchy of
       the requested customer.
:param str reseller_name: (optional) Name of the reseller in the heirarchy
       of the requested customer.
:param str month: (optional) The billing month for which the burn-down
       report is requested. Format is yyyy-mm. Defaults to current month.
:param List[dict] errors: (optional) Errors in the billing.
:param str type: (optional) The type of billing option. The valid values
       are `SUBSCRIPTION` and `OFFER`.
:param datetime start_date: (optional) The start date of billing option.
:param datetime end_date: (optional) The end date of billing option.
:param str state: (optional) The state of the billing option. The valid
       values include `ACTIVE, `SUSPENDED`, and `CANCELED`.
:param str category: (optional) The category of the billing option. The
       valid values are `PLATFORM`, `SERVICE`, and `SUPPORT`.
:param dict payment_instrument: (optional) The payment method for support.
:param str part_number: (optional) Part number of the offering.
:param str catalog_id: (optional) ID of the catalog containing this
       offering.
:param str order_id: (optional) ID of the order containing this offering.
:param str po_number: (optional) PO Number of the offering.
:param str subscription_model: (optional) Subscription model.
:param int duration_in_months: (optional) The duration of the billing
       options in months.
:param float monthly_amount: (optional) Amount billed monthly for this
       offering.
:param dict billing_system: (optional) The support billing system.
:param str country_code: (optional) The country code for the billing unit.
:param str currency_code: (optional) The currency code of the billing unit.
Nrh   )r#   ri   rj   r&   rk   rl   r%   rm   r(   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   s                             r   r!   BillingOption.__init__w  s    J .&**&*
	$ 
 "4&$ ""4"4,,(*r   _dictc                    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  [        U5      US'   UR                  S5      =nb  XS'   UR                  S5      =nb  UUS'   UR                  S5      =nb  UUS'   UR                  S5      =nb  UUS'   UR                  S5      =nb  UUS'   UR                  S5      =nb  UUS'   UR                  S5      =nb  UUS'   UR                  S5      =nb  UUS'   UR                  S5      =nb  UUS'   UR                  S5      =nb  UUS'   UR                  S5      =nb  UUS'   UR                  S5      =nb  UUS'   UR                  S5      =nb  UUS'   U " S0 UD6$ )9Initialize a BillingOption object from a json dictionary.ri   rj   r&   rk   rl   r%   rm   r(   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   rS   rB   r   )r   r   argsri   rj   r&   rk   rl   r%   rm   r(   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   s                               r   	from_dictBillingOption.from_dict  s     ))D/!B.J$yy):;;OH&5"# 99]33K@"-"YY77MD$1!"YY77MD$1! 99]33K@"-"YY77MD$1!YYw''E4!Mii))F6#NIIf%%D2L))L11J>!3J!?D		*--H:1(;DYYw''E4!M		*--H:'D"')),@"AAN);D%& 99]33K@"-D))L11J>!+D		*--H:'D;//I< )D"')),@"AAN);D%&"')),@"AAN);D%&#ii(899NF%3D!"#ii(899NF%3D!"!IIn55LB#/D "YY77MD$1D!{T{r   c                 $    U R                  U5      $ )r   r   r   r   s     r   
_from_dictBillingOption._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                  5      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                  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 R0                  b  U R0                  US'   [        U S5      (       a  U R2                  b  U R2                  US'   [        U S5      (       a  U R4                  b  U R4                  US'   U$ )1Return a json dictionary representing this model.ri   rj   r&   rk   rl   r%   rm   r(   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   )hasattrri   rj   r&   rk   rl   r%   rm   r(   rn   ro   rp   r   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r#   r   s     r   to_dictBillingOption.to_dict  s   4477#6''E$K4*++0D0D0P'+';';E#$4''D,<,<,H#'#3#3E- 4))d.@.@.L%)%7%7E/"4))d.@.@.L%)%7%7E/"4''D,<,<,H#'#3#3E- 4))d.@.@.L%)%7%7E/"4!!djj&<!ZZE'N4""t{{'>"kkE(O4  TYY%: IIE&M4&&4??+F"4T__"EE,4$$)B 24== AE*4!!djj&<!ZZE'N4$$)B $E*4-..43J3J3V*.*A*AE&'4''D,<,<,H#'#3#3E- 4&&4??+F"&//E,4$$)B $E*4%%$..*D!%E+4-..43J3J3V*.*A*AE&'4-..43J3J3V*.*A*AE&'4)**t/B/B/N&*&9&9E"#4)**t/B/B/N&*&9&9E"#4((T->->-J$($5$5E.!4))d.@.@.L%)%7%7E/"r   c                 "    U R                  5       $ r   r   r#   s    r   _to_dictBillingOption._to_dictJ      ||~r   c                 H    [         R                  " U R                  5       SS9$ )z4Return a `str` version of this BillingOption object.   indentjsondumpsr   r   s    r   __str__BillingOption.__str__N      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__BillingOption.__eq__R  '    %00}}..r   c                     X:X  + $ zAReturn `true` when self and other are not equal, false otherwise.rS   r   s     r   __ne__BillingOption.__ne__X        r   c                   $    \ rS rSrSrSrSrSrSrg)BillingOption.CustomerTypeEnumi\  W
The customer type. The valid values are `ENTERPRISE`, `ACCOUNT`, and
`ACCOUNT_GROUP`.

ENTERPRISEACCOUNTACCOUNT_GROUPrS   N	rT   rU   rV   rW   rX   r   r   r   r]   rS   r   r   CustomerTypeEnumr   \      	
 "
'r   r   c                        \ rS rSrSrSrSrSrg)BillingOption.TypeEnumif  zN
The type of billing option. The valid values are `SUBSCRIPTION` and `OFFER`.
SUBSCRIPTIONOFFERrS   N)rT   rU   rV   rW   rX   r   r   r]   rS   r   r   TypeEnumr   f  s    	 &r   r   c                   $    \ rS rSrSrSrSrSrSrg)BillingOption.StateEnumin  za
The state of the billing option. The valid values include `ACTIVE, `SUSPENDED`,
and `CANCELED`.
ACTIVE	SUSPENDEDCANCELEDrS   N)	rT   rU   rV   rW   rX   r   r   r   r]   rS   r   r   	StateEnumr   n  s    	
 	r   r   c                   $    \ rS rSrSrSrSrSrSrg)BillingOption.CategoryEnumix  `
The category of the billing option. The valid values are `PLATFORM`, `SERVICE`,
and `SUPPORT`.
PLATFORMSERVICESUPPORTrS   N	rT   rU   rV   rW   rX   r   r   r   r]   rS   r   r   CategoryEnumr   x      	
 r   r   )r|   rj   rv   rs   r}   r~   r&   rl   rk   rz   rq   rn   ri   r(   r{   rw   ru   rt   rx   r%   rm   rp   rr   ry   ro   )rT   rU   rV   rW   rX   r   rZ   r   dictr   r\   floatr!   rY   r   r   r   r   r   r   r[   r   r   r   r   r   r   r   r]   rS   r   r   rg   rg   O  s   %T !)-%)'+'+%)'+#'+")-'+#"&-1%)$("&#',0,0*.)-&*'+7]+ SM]+ "#	]+
 c]]+  }]+  }]+ c]]+  }]+ }]+ d$]+ sm]+ X&]+ 8$]+ }]+  3-!]+" %TN#]+$ c]%]+& SM']+( 3-)]+* C=+]+, %SM-]+. %SM/]+0 !1]+2 !3]+4 sm5]+6  }7]+8 
9]+~ 5d 5 5 5n $ $5 5n4 4/O / /!O ! !(3 (3 C sD r   rg   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)BillingOptionsSummaryi  a5  
The billing options report for the customer.

:param int rows_count: (optional) The max number of reports in the response.
:param str next_url: (optional) The link to the next page of the search query.
:param List[BillingOption] resources: (optional) Aggregated usage report of all
      requested partners.
N
rows_countnext_url	resourcesr   r   r   rg   r   c                (    Xl         X l        X0l        g)aB  
Initialize a BillingOptionsSummary object.

:param int rows_count: (optional) The max number of reports in the
       response.
:param str next_url: (optional) The link to the next page of the search
       query.
:param List[BillingOption] resources: (optional) Aggregated usage report of
       all requested partners.
Nr   r#   r   r   r   s       r   r!   BillingOptionsSummary.__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 )AInitialize a BillingOptionsSummary object from a json dictionary.r   r   r   rS   )rB   rg   r   r   r   r   r   r   r   vs          r   r   BillingOptionsSummary.from_dict  s     ))L11J>!+		*--H:';//I<EN OY!8!8!;Y OD{T{ !P   A8c                 $    U R                  U5      $ )r   r   r   s     r   r    BillingOptionsSummary._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   r   appendr   r#   r   resources_listr   s       r   r   BillingOptionsSummary.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   BillingOptionsSummary._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )z<Return a `str` version of this BillingOptionsSummary object.r   r   r   r   s    r   r   BillingOptionsSummary.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   BillingOptionsSummary.__eq__  r   r   c                     X:X  + $ r   rS   r   s     r   r   BillingOptionsSummary.__ne__  r   r   r   r   r   rT   rU   rV   rW   rX   r   r\   rZ   r   r!   rY   r   r   r   r   r   r   r[   r   r   r]   rS   r   r   r   r     s     %)"&59# SM# 3-	#
 D12# 
#* 	d 	'> 	 	 $ $ "4 4/3 / /!3 ! !r   r   c                   X   \ 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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 S\\5      r " S S \\5      rS!rg)"CreditPoolsReporti  a  
Aggregated subscription burn-down report for the end customers.

:param str type: (optional) The category of the billing option. The valid values
      are `PLATFORM`, `SERVICE` and `SUPPORT`.
:param str billing_unit_id: (optional) The ID of the billing unit that's
      associated with the billing option.
:param str customer_id: (optional) Account ID of the customer.
:param str customer_type: (optional) The customer type. The valid values are
      `ENTERPRISE`, `ACCOUNT`, and `ACCOUNT_GROUP`.
:param str customer_name: (optional) A user-defined name for the customer.
:param str reseller_id: (optional) ID of the reseller in the heirarchy of the
      requested customer.
:param str reseller_name: (optional) Name of the reseller in the heirarchy of
      the requested customer.
:param str month: (optional) The billing month for which the burn-down report is
      requested. Format is yyyy-mm. Defaults to current month.
:param str currency_code: (optional) The currency code of the billing unit.
:param List[TermCredits] term_credits: (optional) A list of active subscription
      terms available within a credit.
:param Overage overage: (optional) Overage that was generated on the credit
      pool.
Nro   rj   r&   rk   rl   r%   rm   r(   r~   term_creditsoveragero   rj   r&   rk   rl   r%   rm   r(   r~   r   TermCreditsr   Overager   c                    Xl         X l        X0l        X@l        XPl        X`l        Xpl        Xl        Xl        Xl	        Xl
        g)a  
Initialize a CreditPoolsReport object.

:param str type: (optional) The category of the billing option. The valid
       values are `PLATFORM`, `SERVICE` and `SUPPORT`.
:param str billing_unit_id: (optional) The ID of the billing unit that's
       associated with the billing option.
:param str customer_id: (optional) Account ID of the customer.
:param str customer_type: (optional) The customer type. The valid values
       are `ENTERPRISE`, `ACCOUNT`, and `ACCOUNT_GROUP`.
:param str customer_name: (optional) A user-defined name for the customer.
:param str reseller_id: (optional) ID of the reseller in the heirarchy of
       the requested customer.
:param str reseller_name: (optional) Name of the reseller in the heirarchy
       of the requested customer.
:param str month: (optional) The billing month for which the burn-down
       report is requested. Format is yyyy-mm. Defaults to current month.
:param str currency_code: (optional) The currency code of the billing unit.
:param List[TermCredits] term_credits: (optional) A list of active
       subscription terms available within a credit.
:param Overage overage: (optional) Overage that was generated on the credit
       pool.
Nr   )r#   ro   rj   r&   rk   rl   r%   rm   r(   r~   r   r   s               r   r!   CreditPoolsReport.__init__  sD    L 	.&**&*
*(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)  U Vs/ s H  n[        R                  U5      PM     snUS
'   UR                  S5      =nb  [        R                  U5      US'   U " S0 UD6$ s  snf )=Initialize a CreditPoolsReport object from a json dictionary.ro   rj   r&   rk   rl   r%   rm   r(   r~   r   r   rS   )rB   r   r   r   )r   r   r   ro   rj   r&   rk   rl   r%   rm   r(   r~   r   r   r   s                  r   r   CreditPoolsReport.from_dict"  sw    IIf%%D2L$yy):;;OH&5"# 99]33K@"-"YY77MD$1!"YY77MD$1! 99]33K@"-"YY77MD$1!YYw''E4!M"YY77MD$1!!IIn55LBFR#SlK$9$9!$<l#SD yy++G8%//8DO{T{ $Ts   3Ec                 $    U R                  U5      $ )r  r   r   s     r   r   CreditPoolsReport._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      (       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 S5      (       aZ  U R                  bM  [        U R                  [        5      (       a  U R                  US'   U$ U R                  R                  5       US'   U$ )r   ro   rj   r&   rk   rl   r%   rm   r(   r~   r   r   )r   ro   rj   r&   rk   rl   r%   rm   r(   r~   r   r   r   r   r   r   )r#   r   term_credits_listr   s       r   r   CreditPoolsReport.to_dictC  s(   4  TYY%: IIE&M4*++0D0D0P'+';';E#$4''D,<,<,H#'#3#3E- 4))d.@.@.L%)%7%7E/"4))d.@.@.L%)%7%7E/"4''D,<,<,H#'#3#3E- 4))d.@.@.L%)%7%7E/"4!!djj&<!ZZE'N4))d.@.@.L%)%7%7E/"4((T->->-J "&&a&&%,,Q/%,,QYY[9	 '
 %6.!4##(@$,,--#'<<i   $(<<#7#7#9i r   c                 "    U R                  5       $ r   r   r   s    r   r   CreditPoolsReport._to_dictg  r   r   c                 H    [         R                  " U R                  5       SS9$ )z8Return a `str` version of this CreditPoolsReport object.r   r   r   r   s    r   r   CreditPoolsReport.__str__k  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   CreditPoolsReport.__eq__o  r   r   c                     X:X  + $ r   rS   r   s     r   r   CreditPoolsReport.__ne__u  r   r   c                   $    \ rS rSrSrSrSrSrSrg)CreditPoolsReport.TypeEnumiy  z_
The category of the billing option. The valid values are `PLATFORM`, `SERVICE` and
`SUPPORT`.
r   r   r   rS   Nr   rS   r   r   r   r  y  r   r   r   c                   $    \ rS rSrSrSrSrSrSrg)"CreditPoolsReport.CustomerTypeEnumi  r   r   r   r   rS   Nr   rS   r   r   r   r    r   r   r   )rj   r~   r&   rl   rk   r(   r   r%   rm   r   ro   )rT   rU   rV   rW   rX   r   rZ   r   r!   rY   r   r   r   r   r   r   r[   r   r   r   r   r   r]   rS   r   r   r   r     st   6 #)-%)'+'+%)'+#'+6:'+0 sm0 "#	0
 c]0  }0  }0 c]0  }0 }0  }0 tM230 )$0 
0d d ':  6 $ $" "H4 4// /D /!/ !D !3 (3 (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)CreditPoolsReportSummaryi  a0  
The aggregated credit pools report.

:param int rows_count: (optional) The max number of reports in the response.
:param str next_url: (optional) The link to the next page of the search query.
:param List[CreditPoolsReport] resources: (optional) Aggregated usage report of
      all requested partners.
Nr   r   r   r   r   r   c                (    Xl         X l        X0l        g)aI  
Initialize a CreditPoolsReportSummary object.

:param int rows_count: (optional) The max number of reports in the
       response.
:param str next_url: (optional) The link to the next page of the search
       query.
:param List[CreditPoolsReport] resources: (optional) Aggregated usage
       report of all requested partners.
Nr   r   s       r   r!   !CreditPoolsReportSummary.__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 )DInitialize a CreditPoolsReportSummary object from a json dictionary.r   r   r   rS   )rB   r   r   r   s          r   r   "CreditPoolsReportSummary.from_dict  s     ))L11J>!+		*--H:';//I<IR SA!2!<!<Q!? SD{T{ !Tr   c                 $    U R                  U5      $ )r  r   r   s     r   r   #CreditPoolsReportSummary._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    CreditPoolsReportSummary.to_dict  r   r   c                 "    U R                  5       $ r   r   r   s    r   r   !CreditPoolsReportSummary._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )z?Return a `str` version of this CreditPoolsReportSummary object.r   r   r   r   s    r   r    CreditPoolsReportSummary.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   CreditPoolsReportSummary.__eq__  r   r   c                     X:X  + $ r   rS   r   s     r   r   CreditPoolsReportSummary.__ne__  r   r   r   r   rS   r   r   r  r    s     %)"&9=# SM# 3-	#
 D!456# 
#* 	d 	'A 	 	 $ $ "4 4/6 /4 /!6 !4 !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)MetricUsagei  a  
An object that represents a metric.

:param str metric: The name of the metric.
:param str unit: A unit to qualify the quantity.
:param float quantity: The aggregated value for the metric.
:param float rateable_quantity: The quantity that is used for calculating
      charges.
:param float cost: The cost that was incurred by the metric.
:param float rated_cost: The pre-discounted cost that was incurred by the
      metric.
:param List[dict] price: (optional) The price with which cost was calculated.
N)pricemetricunitquantityrateable_quantitycost
rated_costr*  r   c                X    Xl         X l        X0l        X@l        XPl        X`l        Xpl        g)a   
Initialize a MetricUsage object.

:param str metric: The name of the metric.
:param str unit: A unit to qualify the quantity.
:param float quantity: The aggregated value for the metric.
:param float rateable_quantity: The quantity that is used for calculating
       charges.
:param float cost: The cost that was incurred by the metric.
:param float rated_cost: The pre-discounted cost that was incurred by the
       metric.
:param List[dict] price: (optional) The price with which cost was
       calculated.
N)r+  r,  r-  r.  r/  r0  r*  )r#   r+  r,  r-  r.  r/  r0  r*  s           r   r!   MetricUsage.__init__  s(    2 	 !2	$
r   r   c                    0 nUR                  S5      =nb  X2S'   O[        S5      eUR                  S5      =nb  XBS'   O[        S5      eUR                  S5      =nb  XRS'   O[        S5      eUR                  S5      =nb  XbS'   O[        S5      eUR                  S	5      =nb  XrS	'   O[        S
5      eUR                  S5      =nb  XS'   O[        S5      eUR                  S5      =n	b  XS'   U " S0 UD6$ )7Initialize a MetricUsage object from a json dictionary.r+  z:Required property 'metric' not present in MetricUsage JSONr,  z8Required property 'unit' not present in MetricUsage JSONr-  z<Required property 'quantity' not present in MetricUsage JSONr.  zERequired property 'rateable_quantity' not present in MetricUsage JSONr/  z8Required property 'cost' not present in MetricUsage JSONr0  z>Required property 'rated_cost' not present in MetricUsage JSONr*  rS   )rB   r?   )
r   r   r   r+  r,  r-  r.  r/  r0  r*  s
             r   r   MetricUsage.from_dict  s     ii))F6#N[\\IIf%%D2LYZZ		*--H:']^^!&+>!??L(9$%fggIIf%%D2LYZZ))L11J>!+_``YYw''E4!M{T{r   c                 $    U R                  U5      $ )r4  r   r   s     r   r   MetricUsage._from_dict2  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$ )r   r+  r,  r-  r.  r/  r0  r*  )r   r+  r,  r-  r.  r/  r0  r*  r   s     r   r   MetricUsage.to_dict7  s
   4""t{{'>"kkE(O4  TYY%: IIE&M4$$)B $E*4,--$2H2H2T)-)?)?E%&4  TYY%: IIE&M4&&4??+F"&//E,4!!djj&<!ZZE'Nr   c                 "    U R                  5       $ r   r   r   s    r   r   MetricUsage._to_dictJ  r   r   c                 H    [         R                  " U R                  5       SS9$ )z2Return a `str` version of this MetricUsage object.r   r   r   r   s    r   r   MetricUsage.__str__N  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   MetricUsage.__eq__R  r   r   c                     X:X  + $ r   rS   r   s     r   r   MetricUsage.__ne__X  r   r   )r/  r+  r*  r-  r.  r0  r,  )rT   rU   rV   rW   rX   rZ   r   r   r   r   r!   rY   r   r   r   r   r   r   r[   r   r   r]   rS   r   r   r)  r)    s    . '+  	
 !   T
# 
B d }  > $ $ &4 4/M /d /!M !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]  z
Overage that was generated on the credit pool.

:param float cost: (optional) The number of credits used as overage.
:param List[dict] resources: (optional) A list of resources that generated
      overage.
Nr/  r   r/  r   r   c                    Xl         X l        g)z
Initialize a Overage object.

:param float cost: (optional) The number of credits used as overage.
:param List[dict] resources: (optional) A list of resources that generated
       overage.
NrC  )r#   r/  r   s      r   r!   Overage.__init__f  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$ )3Initialize a Overage object from a json dictionary.r/  r   rS   rB   )r   r   r   r/  r   s        r   r   Overage.from_dictv  sL     IIf%%D2L;//I< ){T{r   c                 $    U R                  U5      $ )rG  r   r   s     r   r   Overage._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   r/  r   )r   r/  r   r   s     r   r   Overage.to_dict  sS    4  TYY%: IIE&M4%%$..*D!%E+r   c                 "    U R                  5       $ r   r   r   s    r   r   Overage._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )z.Return a `str` version of this Overage object.r   r   r   r   s    r   r   Overage.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   Overage.__eq__  r   r   c                     X:X  + $ r   rS   r   s     r   r   Overage.__ne__  r   r   )rT   rU   rV   rW   rX   r   r   r   r   r!   rY   r   r   r   r   r   rZ   r   r[   r   r   r]   rS   r   r   r   r   ]  s     !%*.	# uo# DJ'	#
 
#  d y   $ $ 4 4/I /$ /!I !$ !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)PartnerUsageReportSummaryFirsti  zq
The link to the first page of the search query.

:param str href: (optional) A link to a page of query results.
NhrefrY  r   c                    Xl         g)zu
Initialize a PartnerUsageReportSummaryFirst object.

:param str href: (optional) A link to a page of query results.
NrX  )r#   rY  s     r   r!   'PartnerUsageReportSummaryFirst.__init__  s	     	r   r   c                 F    0 nUR                  S5      =nb  X2S'   U " S0 UD6$ )JInitialize a PartnerUsageReportSummaryFirst object from a json dictionary.rY  rS   rH  )r   r   r   rY  s       r   r   (PartnerUsageReportSummaryFirst.from_dict  s0     IIf%%D2L{T{r   c                 $    U R                  U5      $ )r]  r   r   s     r   r   )PartnerUsageReportSummaryFirst._from_dict  r   r   c                 d    0 n[        U S5      (       a  U R                  b  U R                  US'   U$ )r   rY  )r   rY  r   s     r   r   &PartnerUsageReportSummaryFirst.to_dict  s/    4  TYY%: IIE&Mr   c                 "    U R                  5       $ r   r   r   s    r   r   'PartnerUsageReportSummaryFirst._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )zEReturn a `str` version of this PartnerUsageReportSummaryFirst object.r   r   r   r   s    r   r   &PartnerUsageReportSummaryFirst.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   %PartnerUsageReportSummaryFirst.__eq__  r   r   c                     X:X  + $ r   rS   r   s     r   r   %PartnerUsageReportSummaryFirst.__ne__  r   r   rT   rU   rV   rW   rX   r   rZ   r!   rY   r   r   r   r   r   r   r[   r   r   r]   rS   r   r   rW  rW    s     #
 sm
 
	
 d 'G   $ $ 4 4/< / /!< ! !r   rW  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)PartnerUsageReportSummaryNexti  z
The link to the next page of the search query.

:param str href: (optional) A link to a page of query results.
:param str offset: (optional) The value of the `_start` query parameter to fetch
      the next page.
NrY  r,   rY  r,   r   c                    Xl         X l        g)z
Initialize a PartnerUsageReportSummaryNext object.

:param str href: (optional) A link to a page of query results.
:param str offset: (optional) The value of the `_start` query parameter to
       fetch the next page.
Nrn  )r#   rY  r,   s      r   r!   &PartnerUsageReportSummaryNext.__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$ )IInitialize a PartnerUsageReportSummaryNext object from a json dictionary.rY  r,   rS   rH  )r   r   r   rY  r,   s        r   r   'PartnerUsageReportSummaryNext.from_dict  sK     IIf%%D2Lii))F6#N{T{r   c                 $    U R                  U5      $ )rr  r   r   s     r   r   (PartnerUsageReportSummaryNext._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   rY  r,   )r   rY  r,   r   s     r   r   %PartnerUsageReportSummaryNext.to_dict  sR    4  TYY%: IIE&M4""t{{'>"kkE(Or   c                 "    U R                  5       $ r   r   r   s    r   r   &PartnerUsageReportSummaryNext._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )zDReturn a `str` version of this PartnerUsageReportSummaryNext object.r   r   r   r   s    r   r   %PartnerUsageReportSummaryNext.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   $PartnerUsageReportSummaryNext.__eq__  r   r   c                     X:X  + $ r   rS   r   s     r   r   $PartnerUsageReportSummaryNext.__ne__  r   r   rk  rS   r   r   rm  rm    s     # $	 sm 	
 
  d 'F   $ $ 4 4/; / /!; ! !r   rm  c                   L   \ 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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) PartnerUsageReporti  au  
Aggregated usage report of a partner.

:param str entity_id: (optional) The ID of the entity.
:param str entity_type: (optional) The entity type.
:param str entity_crn: (optional) The Cloud Resource Name (CRN) of the entity
      towards which the resource usages were rolled up.
:param str entity_name: (optional) A user-defined name for the entity, such as
      the enterprise name or account name.
:param str entity_partner_type: (optional) Role of the `entity_id` for which the
      usage report is fetched.
:param str viewpoint: (optional) Enables partner to view the cost of provisioned
      services as applicable at the given level.
:param str month: (optional) The billing month for which the usage report is
      requested. Format is yyyy-mm.
:param str currency_code: (optional) The currency code of the billing unit.
:param str country_code: (optional) The country code of the billing unit.
:param float billable_cost: (optional) Billable charges that are aggregated from
      all entities in the report.
:param float billable_rated_cost: (optional) Aggregated billable charges before
      discounts.
:param float non_billable_cost: (optional) Non-billable charges that are
      aggregated from all entities in the report.
:param float non_billable_rated_cost: (optional) Aggregated non-billable charges
      before discounts.
:param List[ResourceUsage] resources: (optional)
N	entity_identity_type
entity_crnentity_nameentity_partner_typer)   r(   r~   r}   billable_costbillable_rated_costnon_billable_costnon_billable_rated_costr   r  r  r  r  r  r)   r(   r~   r}   r  r  r  r  r   ResourceUsager   c                    Xl         X l        X0l        X@l        XPl        X`l        Xpl        Xl        Xl        Xl	        Xl
        Xl        Xl        Xl        g)a  
Initialize a PartnerUsageReport object.

:param str entity_id: (optional) The ID of the entity.
:param str entity_type: (optional) The entity type.
:param str entity_crn: (optional) The Cloud Resource Name (CRN) of the
       entity towards which the resource usages were rolled up.
:param str entity_name: (optional) A user-defined name for the entity, such
       as the enterprise name or account name.
:param str entity_partner_type: (optional) Role of the `entity_id` for
       which the usage report is fetched.
:param str viewpoint: (optional) Enables partner to view the cost of
       provisioned services as applicable at the given level.
:param str month: (optional) The billing month for which the usage report
       is requested. Format is yyyy-mm.
:param str currency_code: (optional) The currency code of the billing unit.
:param str country_code: (optional) The country code of the billing unit.
:param float billable_cost: (optional) Billable charges that are aggregated
       from all entities in the report.
:param float billable_rated_cost: (optional) Aggregated billable charges
       before discounts.
:param float non_billable_cost: (optional) Non-billable charges that are
       aggregated from all entities in the report.
:param float non_billable_rated_cost: (optional) Aggregated non-billable
       charges before discounts.
:param List[ResourceUsage] resources: (optional)
Nr  )r#   r  r  r  r  r  r)   r(   r~   r}   r  r  r  r  r   s                  r   r!   PartnerUsageReport.__init__<  sT    Z #&$&#6 "
*(*#6 !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  XS'   UR                  S5      =nb  XS'   UR                  S5      =nb  XS'   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 PartnerUsageReport object from a json dictionary.r  r  r  r  r  r)   r(   r~   r}   r  r  r  r  r   rS   )rB   r  r   )r   r   r   r  r  r  r  r  r)   r(   r~   r}   r  r  r  r  r   r   s                     r   r   PartnerUsageReport.from_dictx  s    ;//I< ) 99]33K@"-))L11J>!+ 99]33K@"-#(99-B#CCP*=&';//I< )YYw''E4!M"YY77MD$1!!IIn55LB#/ "YY77MD$1!#(99-B#CCP*=&'!&+>!??L(9$%',yy1J'KK#X.E*+;//I<EN OY!8!8!;Y OD{T{ !Ps   F c                 $    U R                  U5      $ )r  r   r   s     r   r   PartnerUsageReport._from_dict  r   r   c                    0 n[        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R
                  b  U R
                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S	5      (       a  U R                  b  U R                  US	'   [        U S
5      (       a  U R                  b  U R                  US
'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a  U R                  b  U R                  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~   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       r   r   PartnerUsageReport.to_dict  sm   4%%$..*D!%E+4''D,<,<,H#'#3#3E- 4&&4??+F"&//E,4''D,<,<,H#'#3#3E- 4.//D4L4L4X+/+C+CE'(4%%$..*D!%E+4!!djj&<!ZZE'N4))d.@.@.L%)%7%7E/"4((T->->-J$($5$5E.!4))d.@.@.L%)%7%7E/"4.//D4L4L4X+/+C+CE'(4,--$2H2H2T)-)?)?E%&42338T8T8`/3/K/KE+,4%%$..*DN^^a&&"))!,"))!))+6	 $
 "0+r   c                 "    U R                  5       $ r   r   r   s    r   r   PartnerUsageReport._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )z9Return a `str` version of this PartnerUsageReport object.r   r   r   r   s    r   r   PartnerUsageReport.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   PartnerUsageReport.__eq__  r   r   c                     X:X  + $ r   rS   r   s     r   r   PartnerUsageReport.__ne__  r   r   )r  r  r}   r~   r  r  r  r  r  r(   r  r  r   r)   )rT   rU   rV   rW   rX   r   rZ   r   r   r!   rY   r   r   r   r   r   r   r[   r   r   r]   rS   r   r   r  r    s   > $(%)$(%)-1#'#'+&*)-/3-13759!:# C=:# c]	:#
 SM:# c]:# &c]:# C=:# }:#  }:# sm:#  :# &e_:# $E?:# "*%:#  D12!:#" 
#:#x d ';  B $ $% %N4 4/0 /T /!0 !T !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\
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)PartnerUsageReportSummaryi  a  
The aggregated partner usage report.

:param int limit: (optional) The maximum number of usage records in the
      response.
:param PartnerUsageReportSummaryFirst first: (optional) The link to the first
      page of the search query.
:param PartnerUsageReportSummaryNext next: (optional) The link to the next page
      of the search query.
:param List[PartnerUsageReport] reports: (optional) Aggregated usage report of
      all requested partners.
Nr+   firstnextreportsr+   r  rW  r  rm  r  r  r   c                4    Xl         X l        X0l        X@l        g)a  
Initialize a PartnerUsageReportSummary object.

:param int limit: (optional) The maximum number of usage records in the
       response.
:param PartnerUsageReportSummaryFirst first: (optional) The link to the
       first page of the search query.
:param PartnerUsageReportSummaryNext next: (optional) The link to the next
       page of the search query.
:param List[PartnerUsageReport] reports: (optional) Aggregated usage report
       of all requested partners.
Nr  )r#   r+   r  r  r  s        r   r!   "PartnerUsageReportSummary.__init__  s    ( 

	r   r   c                 z   0 nUR                  S5      =nb  X2S'   UR                  S5      =nb  [        R                  U5      US'   UR                  S5      =nb  [        R                  U5      US'   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 PartnerUsageReportSummary object from a json dictionary.r+   r  r  r  rS   )rB   rW  r   rm  r  )r   r   r   r+   r  r  r  r   s           r   r   #PartnerUsageReportSummary.from_dict   s     YYw''E4!MYYw''E4:DDUKDMIIf%%D28BB4HDLyy++G8HOP11;;A>PDO{T{ Qs   B8c                 $    U R                  U5      $ )r  r   r   s     r   r   $PartnerUsageReportSummary._from_dict  r   r   c                    0 n[        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       aY  U R                  bL  [        U R                  [        5      (       a  U R                  US'   OU R                  R                  5       US'   [        U S5      (       aY  U R                  bL  [        U R                  [        5      (       a  U R                  US'   OU R                  R                  5       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   r   r   r  r  r   )r#   r   reports_listr   s       r   r   !PartnerUsageReportSummary.to_dict  s%   4!!djj&<!ZZE'N4!!djj&<$**d++!%g!%!3!3!5g4  TYY%:$))T** $		f $		 1 1 3f4##(@L\\a&& ''* ''		4	 "
  ,)r   c                 "    U R                  5       $ r   r   r   s    r   r   "PartnerUsageReportSummary._to_dict,  r   r   c                 H    [         R                  " U R                  5       SS9$ )z@Return a `str` version of this PartnerUsageReportSummary object.r   r   r   r   s    r   r   !PartnerUsageReportSummary.__str__0  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r    PartnerUsageReportSummary.__eq__4  r   r   c                     X:X  + $ r   rS   r   s     r   r    PartnerUsageReportSummary.__ne__:  r   r   )r  r+   r  r  )rT   rU   rV   rW   rX   r   r\   r   r!   rY   r   r   r   r   r   rZ   r   r[   r   r   r]   rS   r   r   r  r    s       $<@:>8< } 89	
 67 $345 
2 d 'B   $ $ 2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\	\   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)	PlanUsagei?  a  
Aggregated values for the plan.

:param str plan_id: The ID of the plan.
:param str pricing_region: (optional) The pricing region for the plan.
:param str pricing_plan_id: (optional) The pricing plan with which the usage was
      rated.
:param bool billable: Whether the plan charges are billed to the customer.
:param float cost: The total cost that was incurred by the plan.
:param float rated_cost: The total pre-discounted cost that was incurred by the
      plan.
:param List[MetricUsage] usage: All of the metrics in the plan.
N)pricing_regionpricing_plan_idplan_idbillabler/  r0  usager)  r  r  r   c                X    Xl         X`l        Xpl        X l        X0l        X@l        XPl        g)a  
Initialize a PlanUsage object.

:param str plan_id: The ID of the plan.
:param bool billable: Whether the plan charges are billed to the customer.
:param float cost: The total cost that was incurred by the plan.
:param float rated_cost: The total pre-discounted cost that was incurred by
       the plan.
:param List[MetricUsage] usage: All of the metrics in the plan.
:param str pricing_region: (optional) The pricing region for the plan.
:param str pricing_plan_id: (optional) The pricing plan with which the
       usage was rated.
N)r  r  r  r  r/  r0  r  )r#   r  r  r/  r0  r  r  r  s           r   r!   PlanUsage.__init__N  s)    0 ,. 	$
r   r   c                 2   0 nUR                  S5      =nb  X2S'   O[        S5      eUR                  S5      =nb  XBS'   UR                  S5      =nb  XRS'   UR                  S5      =nb  XbS'   O[        S5      eUR                  S5      =nb  XrS'   O[        S5      eUR                  S	5      =nb  XS	'   O[        S
5      eUR                  S5      =n	b*  U	 V
s/ s H  n
[        R                  U
5      PM     sn
US'   O[        S5      eU " S0 UD6$ s  sn
f )5Initialize a PlanUsage object from a json dictionary.r  z9Required property 'plan_id' not present in PlanUsage JSONr  r  r  z:Required property 'billable' not present in PlanUsage JSONr/  z6Required property 'cost' not present in PlanUsage JSONr0  z<Required property 'rated_cost' not present in PlanUsage JSONr  z7Required property 'usage' not present in PlanUsage JSONrS   )rB   r?   r)  r   )r   r   r   r  r  r  r  r/  r0  r  r   s              r   r   PlanUsage.from_dictn  s8    yy++G8%OZ[[#ii(899NF%3!"$yy):;;OH&5"#		*--H:'[\\IIf%%D2LWXX))L11J>!+]^^YYw''E4?DEu![2215uEDMXYY{T{ Fs   Dc                 $    U R                  U5      $ )r  r   r   s     r   r   PlanUsage._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      (       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/  r0  r  )r   r  r  r  r  r/  r0  r  r   r   r   r   )r#   r   
usage_listr   s       r   r   PlanUsage.to_dict  sP   4##(@#||E)4)**t/B/B/N&*&9&9E"#4*++0D0D0P'+';';E#$4$$)B $E*4  TYY%: IIE&M4&&4??+F"&//E,4!!djj&<JZZa&&%%a(%%aiik2	  
 ('Nr   c                 "    U R                  5       $ r   r   r   s    r   r   PlanUsage._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )z0Return a `str` version of this PlanUsage object.r   r   r   r   s    r   r   PlanUsage.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   PlanUsage.__eq__  r   r   c                     X:X  + $ r   rS   r   s     r   r   PlanUsage.__ne__  r   r   )r  r/  r  r  r  r0  r  )rT   rU   rV   rW   rX   rZ   r[   r   r   r   r!   rY   r   r   r   r   r   r   r   r   r]   rS   r   r   r  r  ?  s    , )-)-  	
  M" ! "# 
@ d {  : $ $ 24 4/K /D /!K !D !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\SS 4S j5       r\
S 5       rS\4S jrS rS\4S jrSS S\4S jrSS S\4S jrSrg)r  i  a/  
A container for all the plans in the resource.

:param str resource_id: The ID of the resource.
:param str resource_name: (optional) The name of the resource.
:param float billable_cost: The billable charges for the partner.
:param float billable_rated_cost: The pre-discounted billable charges for the
      partner.
:param float non_billable_cost: The non-billable charges for the partner.
:param float non_billable_rated_cost: The pre-discounted, non-billable charges
      for the partner.
:param List[PlanUsage] plans: All of the plans in the resource.
N)resource_nameresource_idr  r  r  r  plansr  r  r   c                X    Xl         Xpl        X l        X0l        X@l        XPl        X`l        g)a%  
Initialize a ResourceUsage object.

:param str resource_id: The ID of the resource.
:param float billable_cost: The billable charges for the partner.
:param float billable_rated_cost: The pre-discounted billable charges for
       the partner.
:param float non_billable_cost: The non-billable charges for the partner.
:param float non_billable_rated_cost: The pre-discounted, non-billable
       charges for the partner.
:param List[PlanUsage] plans: All of the plans in the resource.
:param str resource_name: (optional) The name of the resource.
N)r  r  r  r  r  r  r  )r#   r  r  r  r  r  r  r  s           r   r!   ResourceUsage.__init__  s-    0 '**#6 !2'>$
r   r   c                 J   0 nUR                  S5      =nb  X2S'   O[        S5      eUR                  S5      =nb  XBS'   UR                  S5      =nb  XRS'   O[        S5      eUR                  S5      =nb  XbS'   O[        S5      eUR                  S5      =nb  XrS'   O[        S	5      eUR                  S
5      =nb  XS
'   O[        S5      eUR                  S5      =n	b*  U	 V
s/ s H  n
[        R                  U
5      PM     sn
US'   O[        S5      eU " S0 UD6$ s  sn
f )9Initialize a ResourceUsage object from a json dictionary.r  zARequired property 'resource_id' not present in ResourceUsage JSONr  r  zCRequired property 'billable_cost' not present in ResourceUsage JSONr  zIRequired property 'billable_rated_cost' not present in ResourceUsage JSONr  zGRequired property 'non_billable_cost' not present in ResourceUsage JSONr  zMRequired property 'non_billable_rated_cost' not present in ResourceUsage JSONr  z;Required property 'plans' not present in ResourceUsage JSONrS   )rB   r?   r  r   )r   r   r   r  r  r  r  r  r  r  r   s              r   r   ResourceUsage.from_dict  sK     99]33K@"-bcc"YY77MD$1!"YY77MD$1!dee#(99-B#CCP*=&'jkk!&+>!??L(9$%hii',yy1J'KK#X.E*+nooYYw''E4=BCUY003UCDM\]]{T{ Ds   'D c                 $    U R                  U5      $ )r  r   r   s     r   r   ResourceUsage._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      (       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   r  r  r  r  r  r  r  r   r   r   r   )r#   r   
plans_listr   s       r   r   ResourceUsage.to_dict  sc   4''D,<,<,H#'#3#3E- 4))d.@.@.L%)%7%7E/"4))d.@.@.L%)%7%7E/"4.//D4L4L4X+/+C+CE'(4,--$2H2H2T)-)?)?E%&42338T8T8`/3/K/KE+,4!!djj&<JZZa&&%%a(%%aiik2	  
 ('Nr   c                 "    U R                  5       $ r   r   r   s    r   r   ResourceUsage._to_dict*  r   r   c                 H    [         R                  " U R                  5       SS9$ )z4Return a `str` version of this ResourceUsage object.r   r   r   r   s    r   r   ResourceUsage.__str__.  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   ResourceUsage.__eq__2  r   r   c                     X:X  + $ r   rS   r   s     r   r   ResourceUsage.__ne__8  r   r   )r  r  r  r  r  r  r  )rT   rU   rV   rW   rX   rZ   r   r   r   r!   rY   r   r   r   r   r   r   r[   r   r   r]   rS   r   r   r  r    s    . (,  #	
 ! "' K   } 
@ d   > $ $ 24 4/O / /!O ! !r   r  c                   4   \ 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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 S\\5      rSrg)r   i=  a  
The subscription term that is active in the requested month.

:param str billing_option_id: (optional) The ID of the billing option from which
      the subscription term is derived.
:param str billing_option_model: (optional) Billing option model.
:param str category: (optional) The category of the billing option. The valid
      values are `PLATFORM`, `SERVICE`, and `SUPPORT`.
:param datetime start_date: (optional) The start date of the term in ISO format.
:param datetime end_date: (optional) The end date of the term in ISO format.
:param float total_credits: (optional) The total credit available in this term.
:param float starting_balance: (optional) The balance of available credit at the
      start of the current month.
:param float used_credits: (optional) The amount of credit used during the
      current month.
:param float current_balance: (optional) The balance of remaining credit in the
      subscription term.
:param List[dict] resources: (optional) A list of resources that used credit
      during the month.
N
billing_option_idbilling_option_modelrs   rp   rq   total_creditsstarting_balanceused_creditscurrent_balancer   r  r  rs   rp   rq   r  r  r  r  r   r   c       
         |    Xl         X l        X0l        X@l        XPl        X`l        Xpl        Xl        Xl        Xl	        g)a  
Initialize a TermCredits object.

:param str billing_option_id: (optional) The ID of the billing option from
       which the subscription term is derived.
:param str billing_option_model: (optional) Billing option model.
:param str category: (optional) The category of the billing option. The
       valid values are `PLATFORM`, `SERVICE`, and `SUPPORT`.
:param datetime start_date: (optional) The start date of the term in ISO
       format.
:param datetime end_date: (optional) The end date of the term in ISO
       format.
:param float total_credits: (optional) The total credit available in this
       term.
:param float starting_balance: (optional) The balance of available credit
       at the start of the current month.
:param float used_credits: (optional) The amount of credit used during the
       current month.
:param float current_balance: (optional) The balance of remaining credit in
       the subscription term.
:param List[dict] resources: (optional) A list of resources that used
       credit during the month.
Nr  )r#   r  r  rs   rp   rq   r  r  r  r  r   s              r   r!   TermCredits.__init__S  s=    J "3$8! $ * 0(."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  [        U5      US'   UR                  S5      =nb  [        U5      US'   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 " S0 UD6$ )7Initialize a TermCredits object from a json dictionary.r  r  rs   rp   rq   r  r  r  r  r   rS   r   )r   r   r   r  r  rs   rp   rq   r  r  r  r  r   s                r   r   TermCredits.from_dict  sF    !&+>!??L(9$%$)II.D$EE R+?'(		*--H:'))L11J>!3J!?D		*--H:1(;D"YY77MD$1! %		*< ==J'7#$!IIn55LB#/ $yy):;;OH&5"#;//I< ){T{r   c                 $    U R                  U5      $ )r  r   r   s     r   r   TermCredits._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                  5      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                  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   r  r  rs   rp   rq   r  r  r  r  r   )r   r  r  rs   rp   r   rq   r  r  r  r  r   r   s     r   r   TermCredits.to_dict  s   4,--$2H2H2T)-)?)?E%&4/00T5N5N5Z,0,E,EE()4$$)B $E*4&&4??+F"4T__"EE,4$$)B 24== AE*4))d.@.@.L%)%7%7E/"4+,,1F1F1R(,(=(=E$%4((T->->-J$($5$5E.!4*++0D0D0P'+';';E#$4%%$..*D!%E+r   c                 "    U R                  5       $ r   r   r   s    r   r   TermCredits._to_dict  r   r   c                 H    [         R                  " U R                  5       SS9$ )z2Return a `str` version of this TermCredits object.r   r   r   r   s    r   r   TermCredits.__str__  r   r   r   c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r   r   r   s     r   r   TermCredits.__eq__  r   r   c                     X:X  + $ r   rS   r   s     r   r   TermCredits.__ne__  r   r   c                   $    \ rS rSrSrSrSrSrSrg)TermCredits.CategoryEnumi  r   r   r   r   rS   Nr   rS   r   r   r   r    r   r   r   )
r  r  rs   r  rq   r   rp   r  r  r  )rT   rU   rV   rW   rX   r   rZ   r   r   r   r   r!   rY   r   r   r   r   r   r   r[   r   r   r   r   r]   rS   r   r   r   r   =  sQ   0 ,0.2"&)-'+)-,0(,+/*..# $C=.# 'sm	.#
 3-.# X&.# 8$.#  .# #5/.# uo.# "%.# DJ'.# 
.#` d }  2 $ $ 24 4/M /d /!M !d !sD r   r   c                       \ rS rSrSrSSSSSSSS.S\S\S\S\S	\S
\S\S\S\SS4S jjr	S\4S jr
S\\   4S jrS\\   4S jrSrg)GetResourceUsageReportPageri  zh
GetResourceUsageReportPager can be used to simplify the use of the "get_resource_usage_report" method.
N)r%   r&   r'   r(   r)   r*   r+   clientr-   r%   r&   r'   r(   r)   r*   r+   r   c       	             SU l         Xl        SS0U l        X l        X0l        X@l        XPl        X`l        Xpl        Xl	        Xl
        g)a  
Initialize a GetResourceUsageReportPager object.
:param str partner_id: Enterprise ID of the distributor or reseller for
       which the report is requested.
:param str reseller_id: (optional) Enterprise ID of the reseller for which
       the report is requested. This parameter cannot be used along with
       `customer_id` query parameter.
:param str customer_id: (optional) Account ID/Enterprise ID of the end
       customer for which the report is requested. This parameter cannot be used
       along with `reseller_id` query parameter.
:param bool children: (optional) Get report rolled-up to the direct
       children of the requested entity. Defaults to false. This parameter cannot
       be used along with `customer_id` query parameter.
:param str month: (optional) The billing month for which the usage report
       is requested. Format is `yyyy-mm`. Defaults to current month.
:param str viewpoint: (optional) Enables partner to view the cost of
       provisioned services as applicable at the given level. Defaults to the type
       of the calling partner. The valid values are `DISTRIBUTOR`, `RESELLER` and
       `END_CUSTOMER`.
:param bool recurse: (optional) Get usage report rolled-up to the end
       customers of the requesting partner. Defaults to false. This parameter
       cannot be used along with `reseller_id` query parameter or `customer_id`
       query parameter.
:param int limit: (optional) Number of usage records to be returned. The
       default value is 30. Maximum value is 100.
Tr  N)	_has_next_client_page_context_partner_id_reseller_id_customer_id	_children_month
_viewpoint_recurse_limit)
r#   r  r-   r%   r&   r'   r(   r)   r*   r+   s
             r   r!   $GetResourceUsageReportPager.__init__  sH    N $d^%''!#r   c                     U R                   $ )zE
Returns true if there are potentially more results to be retrieved.
)r  r   s    r   has_next$GetResourceUsageReportPager.has_next  s     ~~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                  U R                  U R                  U R                  R                  S5      S9	R                  5       nSnUR                  S5      nUb  UR                  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 PartnerUsageReport.
:rtype: List[dict]
zNo more results available)messager  r5   Nr,   Fr  )r  StopIterationr  r1   r  r  r	  r
  r  r  r  r  r  rB   
get_resultr  )r#   resultr  next_page_links       r   get_next$GetResourceUsageReportPager.get_next  s     }}(CDD77''))))^^++ooMM++%%))&1 8 

 *, 	 F+%!%%h/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 PartnerUsageReport.
:rtype: List[dict]
)r  r  extend)r#   results	next_pages      r   get_all#GetResourceUsageReportPager.get_all:  s?     mmooINN9% mmoo r   )r
  r  r	  r  r  r  r  r  r  r  r  )rT   rU   rV   rW   rX   r   rZ   r[   r\   r!   r  r   r   r  r  r]   rS   r   r   r  r    s      1 $1 	1
 1 1 1 1 1 1 1 
1f$ %$t* %>d r   r  )%rX   r   enumr   typingr   r   r   r   ibm_cloud_sdk_corer   r	   /ibm_cloud_sdk_core.authenticators.authenticatorr
   $ibm_cloud_sdk_core.get_authenticatorr   ibm_cloud_sdk_core.utilsr   r   commonr   r   r_   rg   r   r   r  r)  r   rW  rm  r  r  r  r  r   r  rS   r   r   <module>r(     s   &   ' '  < I S K #K+ K\& &,q qh	Q! Q!ht( t(nQ! Q!hx! x!vA! A!H7! 7!tA! A!Hw! w!tc! c!L{! {!|}! }!@X X@h hr   