
    id                    h   S r SSKJr  SSKJrJrJr  SSK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  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% " S+ S,5      r& " S- S.5      r' " S/ S05      r( " S1 S2\%5      r) " S3 S4\%5      r* " S5 S6\%5      r+ " S7 S85      r, " S9 S:5      r-g);z
Case management API for creating cases, getting case statuses, adding comments to a case,
adding and removing users from a case watchlist, downloading and adding attachments, and
more.

API Version: 1.0.0
    )Enum)BinaryIODictListN)BaseServiceDetailedResponseget_query_param)Authenticator)"get_authenticator_from_environment)convert_listconvert_model   )get_sdk_headersc                      \ rS rSrSrSrSr\\4S\SS 4S jj5       r	 S9S	\
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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$\S\\   S\4S% jjrS$\S&S'S\4S( jrS$\S)\S\4S* jrSS+.S$\S\S   S\4S, jjrSS+.S$\S\S   S\4S- jjrSSSSS..S$\S/\S\S0\S1\S\4S2 jjrS$\S3\\   S\4S4 jrS$\S5\S\4S6 jrS$\S5\S\4S7 jrS8rg):CaseManagementV1,   zThe Case Management V1 service.z7https://support-center.cloud.ibm.com/case-management/v1case_managementservice_namereturnc                 N    [        U5      nU " U5      nUR                  U5        U$ )zw
Return a new client for the Case Management service using the specified
       parameters and external configuration.
)r   configure_service)clsr   authenticatorservices       b/home/james-whalen/.local/lib/python3.13/site-packages/ibm_platform_services/case_management_v1.pynew_instanceCaseManagementV1.new_instance2   s+     ;<Hm$!!,/    Nr   c                 B    [         R                  " X R                  US9  g)a6  
Construct a new client for the Case 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!   CaseManagementV1.__init__@   s     	T/G/GWder   offsetlimitsearchsortstatusfieldsr&   r'   r(   r)   r*   r+   c                4   0 n[        U R                  SSS9n	UR                  U	5        UUUU[        U5      [        U5      S.n
SU;   a#  UR                  UR	                  S5      5        US	 SUS'   SnU R                  S	XU
S
9nU R                  " U40 UD6nU$ )aC  
Get cases in account.

Get cases in the account that are specified by the content of the IAM token.

:param int offset: (optional) Number of cases that are skipped.
:param int limit: (optional) Number of cases that are returned.
:param str search: (optional) String that a case might contain.
:param str sort: (optional) Sort field and direction. If omitted, default
       to descending of updated date. Prefix "~" signifies sort in descending.
:param List[str] status: (optional) Case status filter.
:param List[str] fields: (optional) Selected fields of interest instead of
       all of the case information.
: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 `CaseList` object
V1	get_casesr   service_versionoperation_idr%   headersapplication/jsonAccept/casesGETmethodurlr2   params)r   DEFAULT_SERVICE_NAMEupdater   getprepare_requestsend)r#   r&   r'   r(   r)   r*   r+   kwargsr2   sdk_headersr:   r9   requestresponses                 r   r.   CaseManagementV1.get_casesQ   s    : %22DWb
 	{# "6*"6*
 NN6::i01y!.&&eV\&]99W//r   )severityeuoffering	resources	watchlistinvoice_numbersla_credit_requesttypesubjectdescriptionrE   rF   CasePayloadEurG   OfferingrH   ResourcePayloadrI   UserrJ   rK   c                   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Ub  U Vs/ s H  n[        U5      PM     nnUb  U Vs/ s H  n[        U5      PM     nn0 n[        U R                  SSS9nUR	                  U5        UUUUUUUUU	U
S.
nUR                  5        VVs0 s H  u  nnUc  M  UU_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XS9nU R                  " U40 UD6nU$ s  snf s  snf s  snnf )a  
Create a case.

Create a support case to resolve issues in your account.

:param str type: Case type.
:param str subject: Short description used to identify the case.
:param str description: Detailed description of the issue.
:param int severity: (optional) Severity of the case. Smaller values mean
       higher severity.
:param CasePayloadEu eu: (optional) Specify if the case should be treated
       as EU regulated. Only one of the following properties is required. Call EU
       support utility endpoint to determine which property must be specified for
       your account.
:param Offering offering: (optional) Offering details.
:param List[ResourcePayload] resources: (optional) List of resources to
       attach to case. If you attach Classic IaaS devices, use the type and id
       fields if the Cloud Resource Name (CRN) is unavailable. Otherwise, pass the
       resource CRN. The resource list must be consistent with the value that is
       selected for the resource offering.
:param List[User] watchlist: (optional) Array of user IDs to add to the
       watchlist.
:param str invoice_number: (optional) Invoice number of "Billing and
       Invoice" case type.
:param bool sla_credit_request: (optional) Flag to indicate if case is for
       an Service Level Agreement (SLA) credit request.
: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 `Case` object
ztype must be providedzsubject must be providedzdescription must be providedr-   create_caser/   )
rL   rM   rN   rE   rF   rG   rH   rI   rJ   rK   r3   content-typer2   r4   r5   POSTr8   r9   r2   data)
ValueErrorr   r   r;   r<   itemsjsondumpsr=   r>   r?   )r#   rL   rM   rN   rE   rF   rG   rH   rI   rJ   rK   r@   xr2   rA   rX   kvr9   rB   rC   s                        r   rT   CaseManagementV1.create_case   s   \ <455?788;<<>r"B$X.H 3<=9aq)9I= 3<=9aq)9I=%22DWd
 	{# &  "","4
 $(::<A<!Q11<Azz$"4NN6::i01y!.&&f#w&Z99W//E >=& Bs   E,E
EE)r+   case_numberc                   U(       d  [        S5      e0 n[        U R                  SSS9nUR                  U5        S[	        U5      0nSU;   a#  UR                  UR                  S5      5        US	 SUS'   S	/nU R                  U5      n[        [        Xx5      5      n	S
R                  " S0 U	D6n
U R                  SXUS9nU R                  " U40 UD6nU$ )a  
Get a case in account.

View a case in the account that is specified by the case number.

:param str case_number: Unique identifier of a case.
:param List[str] fields: (optional) Selected fields of interest instead of
       all of the case information.
: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 `Case` object
case_number must be providedr-   get_caser/   r+   r2   r3   r4   ra   z/cases/{case_number}r6   r7    )rY   r   r;   r<   r   r=   encode_path_varsdictzipformatr>   r?   )r#   ra   r+   r@   r2   rA   r:   path_param_keyspath_param_valuespath_param_dictr9   rB   rC   s                r   rd   CaseManagementV1.get_case   s     ;<<%22DWa
 	{#L01NN6::i01y!.(/ 11+>s?FG$++>o>&&eV\&]99W//r   status_payloadStatusPayloadc                 $   U(       d  [        S5      eUc  [        S5      e[        U[        5      (       a  [        U5      n0 n[	        U R
                  SSS9nUR                  U5        [        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                  U5      n[        [        Xx5      5      n	SR                  " S0 U	D6n
U R                  SXUS9nU R                  " U40 UD6nU$ )a  
Update case status.

Mark the case as resolved or unresolved, or accept the provided resolution.

:param str case_number: Unique identifier of a case.
:param StatusPayload status_payload:
: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 `Case` object
rc   zstatus_payload must be providedr-   update_case_statusr/   r3   rU   r2   r4   ra   z/cases/{case_number}/statusPUTrW   re   )rY   
isinstancero   r   r   r;   r<   r[   r\   r=   rf   rg   rh   ri   r>   r?   )r#   ra   rn   r@   r2   rA   rX   rj   rk   rl   r9   rB   rC   s                r   rq   #CaseManagementV1.update_case_status  s    ;<<!>??nm44*>:N%22DWk
 	{#zz.)"4NN6::i01y!.(/ 11+>s?FG+22E_E&&eTX&Y99W//r   commentc                 J   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US
'   S/n	U R                  U5      n
[        [        X5      5      nSR                  " S0 UD6nU R                  SXUS9nU R                  " U40 UD6nU$ s  snnf )a  
Add comment to case.

Add a comment to a case to be viewed by a support engineer.

:param str case_number: Unique identifier of a case.
:param str comment: Comment to add to the case.
: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 `Comment` object
rc   zcomment must be providedr-   add_commentr/   ru   r3   rU   r2   r4   ra   z/cases/{case_number}/commentsrr   rW   re   rY   r   r;   r<   rZ   r[   r\   r=   rf   rg   rh   ri   r>   r?   )r#   ra   ru   r@   r2   rA   rX   r^   r_   rj   rk   rl   r9   rB   rC   s                  r   rw   CaseManagementV1.add_comment5  s2    ;<<?788%22DWd
 	{#7##'::<A<!1<Azz$"4NN6::i01y!.(/ 11+>s?FG-44GG&&eTX&Y99W//! Bs    	D-DrI   c                t   U(       d  [        S5      eUb  U Vs/ s H  n[        U5      PM     nn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  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                  U5      n[        [        X5      5      nSR                  " S0 UD6nU R                  SXUS9nU R                  " U40 UD6nU$ s  snf s  sn	nf )a  
Add users to watchlist of case.

Add users to the watchlist of case. By adding a user to the watchlist of the case,
you are granting them read and write permissions, so the user can view the case,
receive updates, and make updates to the case. Note that the user must be in the
account to be added to the watchlist.

:param str case_number: Unique identifier of a case.
:param List[User] watchlist: (optional) Array of user ID objects.
: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 `WatchlistAddResponse` object
rc   r-   add_watchlistr/   rI   r3   rU   r2   r4   ra   /cases/{case_number}/watchlistrr   rW   re   rY   r   r   r;   r<   rZ   r[   r\   r=   rf   rg   rh   ri   r>   r?   r#   ra   rI   r@   r]   r2   rA   rX   r^   r_   rj   rk   rl   r9   rB   rC   s                   r   r|   CaseManagementV1.add_watchlist_  sE     ;<< 3<=9aq)9I=%22DWf
 	{#Y'#'::<A<!1<Azz$"4NN6::i01y!.(/ 11+>s?FG.55HH&&eTX&Y99W//1 > B   D/0	D4=D4c                t   U(       d  [        S5      eUb  U Vs/ s H  n[        U5      PM     nn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  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                  U5      n[        [        X5      5      nSR                  " S0 UD6nU R                  SXUS9nU R                  " U40 UD6nU$ s  snf s  sn	nf )a  
Remove users from watchlist of case.

Remove users from the watchlist of a case if you don't want them to view the case,
receive updates, or make updates to the case.

:param str case_number: Unique identifier of a case.
:param List[User] watchlist: (optional) Array of user ID objects.
: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 `Watchlist` object
rc   r-   remove_watchlistr/   rI   r3   rU   r2   r4   ra   r}   DELETErW   re   r~   r   s                   r   r   !CaseManagementV1.remove_watchlist  sE    ;<< 3<=9aq)9I=%22DWi
 	{#Y'#'::<A<!1<Azz$"4NN6::i01y!.(/ 11+>s?FG.55HH&&hCW[&\99W//1 > Br   crnrL   idnoter   r   r   c                0   U(       d  [        S5      e0 n[        U R                  SSS9nUR                  U5        X#XES.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                  U5      n[        [        X5      5      nSR                  " S0 UD6nU R                  SXU	S9nU R                  " U40 UD6nU$ s  snn
f )a4  
Add a resource to case.

Add a resource to case by specifying the Cloud Resource Name (CRN), or id and type
if attaching a class iaaS resource.

:param str case_number: Unique identifier of a case.
:param str crn: (optional) Cloud Resource Name of the resource.
:param str type: (optional) Only used to attach Classic IaaS devices that
       have no CRN.
:param float id: (optional) Deprecated: Only used to attach Classic IaaS
       devices that have no CRN. Id of Classic IaaS device. This is deprecated in
       favor of the crn field.
:param str note: (optional) A note about this resource.
: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 `Resource` object
rc   r-   add_resourcer/   r   r3   rU   r2   r4   ra   z/cases/{case_number}/resourcesrr   rW   re   rx   )r#   ra   r   rL   r   r   r@   r2   rA   rX   r^   r_   rj   rk   rl   r9   rB   rC   s                     r   r   CaseManagementV1.add_resource  s!   , ;<<%22DWe
 	{#A#'::<A<!1<Azz$"4NN6::i01y!.(/ 11+>s?FG.55HH&&eTX&Y99W//! Bs   	D Dfilec                 p   U(       d  [        S5      eUc  [        S5      e0 n[        U R                  SSS9nUR                  U5        / nU HY  n[	        U5      nUR                  S5      =(       d    SUS   UR                  S	5      =(       d    S
4nUR                  SU45        M[     SU;   a#  UR                  UR                  S5      5        US	 SUS'   S/n	U R                  U5      n
[        [        X5      5      nSR                  " S0 UD6nU R                  SXUS9nU R                  " U40 UD6nU$ )a  
Add attachments to a support case.

You can add attachments to a case to provide more information for the support team
about the issue that you're experiencing.

:param str case_number: Unique identifier of a case.
:param list[FileWithMetadata] file: file of supported types, 8MB in size
       limit.
: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 `Attachment` object
rc   Nzfile must be providedr-   upload_filer/   filenamerX   content_typeapplication/octet-streamr   r2   r3   r4   ra   z /cases/{case_number}/attachmentsrr   )r8   r9   r2   filesre   )rY   r   r;   r<   r   r=   appendrf   rg   rh   ri   r>   r?   )r#   ra   r   r@   r2   rA   	form_dataitem_filerj   rk   rl   r9   rB   rC   s                  r   r   CaseManagementV1.upload_file  sB    ;<<<455%22DWd
 	{#	D &DXXj)1T4<.AYAw]wxEfe_- 
 NN6::i01y!.(/ 11+>s?FG077J/J&&eU^&_99W//r   file_idc                    U(       d  [        S5      e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	S
/nU R                  X5      n[        [        Xg5      5      nSR                  " S0 UD6n	U R                  SXS9n
U R                  " U
40 UD6nU$ )ae  
Download an attachment.

Download an attachment from a case.

:param str case_number: Unique identifier of a case.
:param str file_id: Unique identifier of a file.
:param dict headers: A `dict` containing the request headers
:return: A `DetailedResponse` containing the result, headers and HTTP status code.
:rtype: DetailedResponse with `BinaryIO` result
rc   file_id must be providedr-   download_filer/   r2   r   r4   ra   r   */cases/{case_number}/attachments/{file_id}r6   r8   r9   r2   re   rY   r   r;   r<   r=   rf   rg   rh   ri   r>   r?   r#   ra   r   r@   r2   rA   rj   rk   rl   r9   rB   rC   s               r   r   CaseManagementV1.download_file  s     ;<<788%22DWf
 	{#NN6::i01y!6()4 11+Gs?FG:AATOT&&e&N99W//r   c                    U(       d  [        S5      e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	S
/nU R                  X5      n[        [        Xg5      5      nSR                  " S0 UD6n	U R                  SXS9n
U R                  " U
40 UD6nU$ )a  
Remove attachment from case.

Remove an attachment from a case.

:param str case_number: Unique identifier of a case.
:param str file_id: Unique identifier of a file.
: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 `AttachmentList` object
rc   r   r-   delete_filer/   r2   r3   r4   ra   r   r   r   r   re   r   r   s               r   r   CaseManagementV1.delete_file:  s     ;<<788%22DWd
 	{#NN6::i01y!.()4 11+Gs?FG:AATOT&&hC&Q99W//r   re   )N)__name__
__module____qualname____firstlineno____doc__r"   r;   classmethodstrr   r
   r!   intr   r   r.   boolrT   rd   rq   rw   r|   r   floatr   r   r   r   r   __static_attributes__re   r   r   r   r   ,   s   )S, 1 
  (,f$f 
f(   5 5 	5
 5 5 S	5 S	5 
5z "#-1"&"#'[[ [ 	[ [ [ [ )*[ <[ [ ![ 
[z AE $C $DI $Sc $L(c (? (aq (T(s (S (GW (T LP + +DL +^n +Z OS )C )tF| )aq )X /3RVdh//(+/:=/JO/^a/	/b+s +$x. +O_ +Z# #s #IY #J#s #S #GW #r   r   c                   H    \ rS rSrSr " S S\\5      r " S S\\5      rSr	g)	GetCasesEnumsi`  z!
Enums for get_cases parameters.
c                   0    \ rS rSrSrSrSrSrSrSr	Sr
S	rg
)GetCasesEnums.Statusie  z
Case status filter.
newin_progresswaiting_on_clientresolution_providedresolvedclosedre   N)r   r   r   r   r   NEWIN_PROGRESSWAITING_ON_CLIENTRESOLUTION_PROVIDEDRESOLVEDCLOSEDr   re   r   r   Statusr   e  s)    	 #/3r   r   c                   p    \ rS rSrSrSrSrSrSrSr	Sr
S	rS
rSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrg)GetCasesEnums.Fieldsiq  E
Selected fields of interest instead of all of the case information.
numbershort_descriptionrN   
created_at
created_by
updated_at
updated_bycontactcontact_typer*   rE   support_tier
resolutionclose_notesrJ   agent_close_onlyrF   rI   attachmentsrH   commentsrG   re   Nr   r   r   r   r   NUMBERSHORT_DESCRIPTIONDESCRIPTION
CREATED_AT
CREATED_BY
UPDATED_AT
UPDATED_BYCONTACTCONTACT_TYPESTATUSSEVERITYSUPPORT_TIER
RESOLUTIONCLOSE_NOTESINVOICE_NUMBERAGENT_CLOSE_ONLYEU	WATCHLISTATTACHMENTS	RESOURCESCOMMENTSOFFERINGr   re   r   r   Fieldsr   q  y    	 /#!
!
!
!
%%!
#)-	#	r   r   re   N)
r   r   r   r   r   r   r   r   r   r   re   r   r   r   r   `  s#    
d 
d r   r   c                   0    \ rS rSrSr " S S\\5      rSrg)GetCaseEnumsi  z 
Enums for get_case parameters.
c                   p    \ rS rSrSrSrSrSrSrSr	Sr
S	rS
rSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrg)GetCaseEnums.Fieldsi  r   r   r   rN   r   r   r   r   r   r   r*   rE   r   r   r   rJ   r   rF   rI   r   rH   r   rG   re   Nr   re   r   r   r   r     r   r   r   re   N)	r   r   r   r   r   r   r   r   r   re   r   r   r   r     s    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)
Attachmenti  ad  
Details of an attachment.

:attr str id: (optional) Unique identifier of the attachment in database.
:attr str filename: (optional) Name of the attachment.
:attr int size_in_bytes: (optional) Size of the attachment in bytes.
:attr str created_at: (optional) Date time of uploading in UTC.
:attr str url: (optional) URL of the attachment used to download.
Nr   r   size_in_bytesr   r9   r   r   r   r   r9   r   c                @    Xl         X l        X0l        X@l        XPl        g)ao  
Initialize a Attachment object.

:param str id: (optional) Unique identifier of the attachment in database.
:param str filename: (optional) Name of the attachment.
:param int size_in_bytes: (optional) Size of the attachment in bytes.
:param str created_at: (optional) Date time of uploading in UTC.
:param str url: (optional) URL of the attachment used to download.
Nr   )r#   r   r   r   r   r9   s         r   r!   Attachment.__init__  s    $  *$r   _dictc                    0 nSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   U " S0 UD6$ )6Initialize a Attachment object from a json dictionary.r   r   r   r   r9   re   r=   r   r   argss      r   	from_dictAttachment.from_dict  s     5=4DJ$yy4De#$)IIo$>D!5 !&<!8DE>))E*DK{T{r   c                 $    U R                  U5      $ )r   r   r   r   s     r   
_from_dictAttachment._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$ )1Return a json dictionary representing this model.r   r   r   r   r9   )hasattrr   r   r   r   r9   r#   r   s     r   to_dictAttachment.to_dict  s    4477#6''E$K4$$)B $E*4))d.@.@.L%)%7%7E/"4&&4??+F"&//E,4DHH$888E%Lr   c                 "    U R                  5       $ r  r  r#   s    r   _to_dictAttachment._to_dict      ||~r   c                 H    [         R                  " U R                  5       SS9$ )z1Return a `str` version of this Attachment object.   indentr[   r\   r  r  s    r   __str__Attachment.__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rs   	__class____dict__r#   r  s     r   __eq__Attachment.__eq__  '    %00}}..r   c                     X:X  + $ zAReturn `true` when self and other are not equal, false otherwise.re   r  s     r   __ne__Attachment.__ne__
        r   )r   r   r   r   r9   )r   r   r   r   r   r   r   r!   r   r   r   r   r  r  r  r   r  r$  r   re   r   r   r   r     s     !  	
    
0 d |   $ $ 4 4/L /T /!L !T !r   r   c                       \ rS rSrSr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)AttachmentListi  zi
List of attachments in the case.

:attr List[Attachment] attachments: (optional) New attachments array.
Nr   r   r   r   c                    Xl         g)zm
Initialize a AttachmentList object.

:param List[Attachment] attachments: (optional) New attachments array.
Nr)  )r#   r   s     r   r!   AttachmentList.__init__  s
     'r   r   c                     0 nSU;   a8  UR                  S5       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 AttachmentList object from a json dictionary.r   re   )r=   r   r   r   r   r   r]   s       r   r   AttachmentList.from_dict  sR     E!DIIImD\"]D\q:#7#7#:D\"]D{T{ #^   A	c                 $    U R                  U5      $ )r-  r   r   s     r   r   AttachmentList._from_dict&  r  r   c                     0 n[        U S5      (       a:  U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS'   U$ s  snf )r  r   )r  r   r  r#   r   r]   s      r   r  AttachmentList.to_dict+  sO    4''D,<,<,H9=9I9I#J9IAIIK9I#JE-  $K   Ac                 "    U R                  5       $ r
  r  r  s    r   r  AttachmentList._to_dict2  r  r   c                 H    [         R                  " U R                  5       SS9$ )z5Return a `str` version of this AttachmentList object.r  r  r  r  s    r   r  AttachmentList.__str__6  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  AttachmentList.__eq__:  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  AttachmentList.__ne__@  r&  r   r   r   r   r   r   r   r!   r   r   r   r   r  r  r   r  r   r  r$  r   re   r   r   r(  r(    s     =A 'tL'9 'T ' d '7   $ $ 4 4/, / /!, ! !r   r(  c            +       ^   \ rS rSrSrSSSSSSSSSSSSSSSSSSSSS.S\S\S\S\S	S
S\S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)/CaseiE  a  
The support case.

:attr str number: (optional) Identifying number of a created case.
:attr str short_description: (optional) Short description of what the case is
      about.
:attr str description: (optional) Full description of what the case is about.
:attr str created_at: (optional) Date and time of case creation in UTC.
:attr User created_by: (optional) User info in a case.
:attr str updated_at: (optional) Date and time of the last update on the case in
      UTC.
:attr User updated_by: (optional) User info in a case.
:attr str contact_type: (optional) Name of the console to interact with the
      contact.
:attr User contact: (optional) User info in a case.
:attr str status: (optional) Status type of the case.
:attr float severity: (optional) Severity level of the case.
:attr str support_tier: (optional) Support tier of the account.
:attr str resolution: (optional) Standard reasons of resolving case.
:attr str close_notes: (optional) Notes of case closing.
:attr CaseEu eu: (optional) EU support.
:attr List[User] watchlist: (optional) List of users in the case watchlist.
:attr List[Attachment] attachments: (optional) List of files that are attached
      to the case.
:attr Offering offering: (optional) Offering details.
:attr List[Resource] resources: (optional) List of attached resources.
:attr List[Comment] comments: (optional) List of comments and updates that are
      sorted in chronological order.
Nr   r   rN   r   r   r   r   r   r   r*   rE   r   r   r   rF   rI   r   rG   rH   r   r   r   rN   r   r   rR   r   r   r   r   r*   rE   r   r   r   rF   CaseEurI   r   r   rG   rP   rH   Resourcer   Commentr   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        UU l        UU l        UU l        g)a  
Initialize a Case object.

:param str number: (optional) Identifying number of a created case.
:param str short_description: (optional) Short description of what the case
       is about.
:param str description: (optional) Full description of what the case is
       about.
:param str created_at: (optional) Date and time of case creation in UTC.
:param User created_by: (optional) User info in a case.
:param str updated_at: (optional) Date and time of the last update on the
       case in UTC.
:param User updated_by: (optional) User info in a case.
:param str contact_type: (optional) Name of the console to interact with
       the contact.
:param User contact: (optional) User info in a case.
:param str status: (optional) Status type of the case.
:param float severity: (optional) Severity level of the case.
:param str support_tier: (optional) Support tier of the account.
:param str resolution: (optional) Standard reasons of resolving case.
:param str close_notes: (optional) Notes of case closing.
:param CaseEu eu: (optional) EU support.
:param List[User] watchlist: (optional) List of users in the case
       watchlist.
:param List[Attachment] attachments: (optional) List of files that are
       attached to the case.
:param Offering offering: (optional) Offering details.
:param List[Resource] resources: (optional) List of attached resources.
:param List[Comment] comments: (optional) List of comments and updates that
       are sorted in chronological order.
NrB  )r#   r   r   rN   r   r   r   r   r   r   r*   rE   r   r   r   rF   rI   r   rG   rH   r   s                        r   r!   Case.__init__d  sy    n !2&$$$$( ($&"& " r   r   c                 ,   0 nSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a'  [        R                  UR                  S5      5      US'   SU;   a  UR                  S5      US'   SU;   a'  [        R                  UR                  S5      5      US'   SU;   a  UR                  S5      US'   S	U;   a'  [        R                  UR                  S	5      5      US	'   S
U;   a  UR                  S
5      US
'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a'  [        R                  UR                  S5      5      US'   SU;   a8  UR                  S5       Vs/ s H  n[        R                  U5      PM     snUS'   SU;   a8  UR                  S5       Vs/ s H  n[        R                  U5      PM     snUS'   SU;   a'  [
        R                  UR                  S5      5      US'   SU;   a8  UR                  S5       Vs/ s H  n[        R                  U5      PM     snUS'   SU;   a8  UR                  S5       Vs/ s H  n[        R                  U5      PM     snUS'   U " S0 UD6$ s  snf s  snf s  snf s  snf )0Initialize a Case object from a json dictionary.r   r   rN   r   r   r   r   r   r   r*   rE   r   r   r   rF   rI   r   rG   rH   r   re   )r=   rR   r   rC  r   rP   rD  rE  r.  s       r   r   Case.from_dict  s    u"YYx0DN%'(-		2E(FD$%E!"'))M":D5 !&<!8D5 !%		,0G!HD5 !&<!8D5 !%		,0G!HDU"#(99^#<D "nnUYYy-ABDOu"YYx0DN$yy4DU"#(99^#<D 5 !&<!8DE!"'))M":D5=))%))D/:DJ%<AIIk<R S<Rq!2<R SDE!DIIImD\"]D\q:#7#7#:D\"]D'11%))J2GHD%@E		+@V W@V1!3!3A!6@V WD>Cii
>ST>S 1 1! 4>STD{T{ !T"] !XTs   .L,LLLc                 $    U R                  U5      $ )rI  r   r   s     r   r   Case._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
                  R                  5       US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S5      (       a*  U R                  b  U R                  R                  5       US'   [        U S5      (       a  U R                  b  U R                  US'   [        U S	5      (       a*  U R                  b  U R                  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                   R                  5       US'   [        U S5      (       a:  U R"                  b-  U R"                   Vs/ s H  o"R                  5       PM     snUS'   [        U S5      (       a:  U R$                  b-  U R$                   Vs/ s H  o"R                  5       PM     snUS'   [        U S5      (       a*  U R&                  b  U R&                  R                  5       US'   [        U S5      (       a:  U R(                  b-  U R(                   Vs/ s H  o"R                  5       PM     snUS'   [        U S5      (       a:  U R*                  b-  U R*                   Vs/ s H  o"R                  5       PM     snUS'   U$ s  snf s  snf s  snf s  snf )r  r   r   rN   r   r   r   r   r   r   r*   rE   r   r   r   rF   rI   r   rG   rH   r   )r  r   r   rN   r   r   r  r   r   r   r   r*   rE   r   r   r   rF   rI   r   rG   rH   r   r4  s      r   r  Case.to_dict  s~   4""t{{'>"kkE(O4,--$2H2H2T)-)?)?E%&4''D,<,<,H#'#3#3E- 4&&4??+F"&//E,4&&4??+F"&//"9"9";E,4&&4??+F"&//E,4&&4??+F"&//"9"9";E,4((T->->-J$($5$5E.!4##(@#||335E)4""t{{'>"kkE(O4$$)B $E*4((T->->-J$($5$5E.!4&&4??+F"&//E,4''D,<,<,H#'#3#3E- 4477#6''//+E$K4%%$..*D7;~~!F~!))+~!FE+4''D,<,<,H9=9I9I#J9IAIIK9I#JE- 4$$)B $ 5 5 7E*4%%$..*D7;~~!F~!))+~!FE+4$$)B6:mm Dmm DE* "G#J "G Ds   
QQQ&Qc                 "    U R                  5       $ r
  r  r  s    r   r  Case._to_dict  r  r   c                 H    [         R                  " U R                  5       SS9$ )z+Return a `str` version of this Case object.r  r  r  r  s    r   r  Case.__str__  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  Case.__eq__  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  Case.__ne__  r&  r   c                        \ rS rSrSrSrSrSrg)Case.ContactTypeEnumi"  z3
Name of the console to interact with the contact.
zCloud Support CenterzIMS Consolere   N)r   r   r   r   r   CLOUD_SUPPORT_CENTERIMS_CONSOLEr   re   r   r   ContactTypeEnumrX  "  s    	  6#r   r[  c                   (    \ rS rSrSrSrSrSrSrSr	g)	Case.SupportTierEnumi*  z
Support tier of the account.
FreeBasicStandardPremiumre   N)
r   r   r   r   r   FREEBASICSTANDARDPREMIUMr   re   r   r   SupportTierEnumr]  *  s    	 r   rf  )r   r   r   r   r   r   r   rN   rF   r   rG   r   rH   rE   r   r*   r   r   r   rI   )r   r   r   r   r   r   r   r   r!   r   r   r   r   r  r  r  r   r  r$  r   r[  rf  r   re   r   r   rA  rA  E  s   B !%!!  "&*.#&*$(-J! J! 	J!
 J! J! J! J! J! J! J! J! J! J! J!  !J!" #J!$ <%J!& ,''J!( )J!* 
#+J!, y/-J!. 
/J!X +d +v + +Z $ $+ +Z4 4/F /t /!F !t !$#t $#t r   rA  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)rC  i5  z
EU support.

:attr bool support: (optional) Identifying whether the case has EU Support.
:attr str data_center: (optional) Information about the data center.
Nsupportdata_centerri  rj  r   c                    Xl         X l        g)z
Initialize a CaseEu object.

:param bool support: (optional) Identifying whether the case has EU
       Support.
:param str data_center: (optional) Information about the data center.
Nrh  )r#   ri  rj  s      r   r!   CaseEu.__init__=  s     &r   r   c                 ~    0 nSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   U " S0 UD6$ )2Initialize a CaseEu object from a json dictionary.ri  rj  re   r   r   s      r   r   CaseEu.from_dictH  sJ     #ii	2DOE!"'))M":D{T{r   c                 $    U R                  U5      $ )rn  r   r   s     r   r   CaseEu._from_dictR  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  ri  rj  )r  ri  rj  r  s     r   r  CaseEu.to_dictW  sX    4##(@#||E)4''D,<,<,H#'#3#3E- r   c                 "    U R                  5       $ r
  r  r  s    r   r  CaseEu._to_dict`  r  r   c                 H    [         R                  " U R                  5       SS9$ )z-Return a `str` version of this CaseEu object.r  r  r  r  s    r   r  CaseEu.__str__d  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  CaseEu.__eq__h  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  CaseEu.__ne__n  r&  r   )rj  ri  )r   r   r   r   r   r   r   r!   r   r   r   r   r  r  r  r  r$  r   re   r   r   rC  rC  5  s     +/4 	'4 	'S 	'D 	' d x   $ $ 4 4/H / /!H ! !r   rC  c                       \ rS rSrSrSSSSSSS.S\SSSSS	SS
SS\S   SS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)CaseListis  a/  
Response of a GET /cases request.

:attr int total_count: (optional) Total number of cases that satisfy the query.
:attr PaginationLink first: (optional) Container for URL pointer to related
      pages of cases.
:attr PaginationLink next: (optional) Container for URL pointer to related pages
      of cases.
:attr PaginationLink previous: (optional) Container for URL pointer to related
      pages of cases.
:attr PaginationLink last: (optional) Container for URL pointer to related pages
      of cases.
:attr List[Case] cases: (optional) List of cases.
Ntotal_countfirstnextpreviouslastcasesr  r  PaginationLinkr  r  r  r  rA  r   c                L    Xl         X l        X0l        X@l        XPl        X`l        g)a<  
Initialize a CaseList object.

:param int total_count: (optional) Total number of cases that satisfy the
       query.
:param PaginationLink first: (optional) Container for URL pointer to
       related pages of cases.
:param PaginationLink next: (optional) Container for URL pointer to related
       pages of cases.
:param PaginationLink previous: (optional) Container for URL pointer to
       related pages of cases.
:param PaginationLink last: (optional) Container for URL pointer to related
       pages of cases.
:param List[Case] cases: (optional) List of cases.
Nr~  )r#   r  r  r  r  r  r  s          r   r!   CaseList.__init__  s#    2 '
	 	
r   r   c                 8   0 nSU;   a  UR                  S5      US'   SU;   a'  [        R                  UR                  S5      5      US'   SU;   a'  [        R                  UR                  S5      5      US'   SU;   a'  [        R                  UR                  S5      5      US'   SU;   a'  [        R                  UR                  S5      5      US'   SU;   a8  UR                  S5       Vs/ s H  n[        R                  U5      PM     snUS'   U " S0 UD6$ s  snf )4Initialize a CaseList object from a json dictionary.r  r  r  r  r  r  re   )r=   r  r   rA  r.  s       r   r   CaseList.from_dict  s     E!"'))M":De*44UYYw5GHDMU?)33EIIf4EFDL-77		*8MNDU?)33EIIf4EFDLe8=		'8JK8J1T^^A.8JKDM{T{ Ls   *Dc                 $    U R                  U5      $ )r  r   r   s     r   r   CaseList._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                  R                  5       US'   [        U S5      (       a*  U R                  b  U R                  R                  5       US'   [        U S5      (       a*  U R
                  b  U R
                  R                  5       US'   [        U S5      (       a*  U R                  b  U R                  R                  5       US'   [        U S5      (       a:  U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS'   U$ s  snf )r  r  r  r  r  r  r  )r  r  r  r  r  r  r  r  r4  s      r   r  CaseList.to_dict  s    4''D,<,<,H#'#3#3E- 4!!djj&<!ZZ//1E'N4  TYY%: II--/E&M4$$)B $ 5 5 7E*4  TYY%: II--/E&M4!!djj&<37::>:aiik:>E'N ?s   E)c                 "    U R                  5       $ r
  r  r  s    r   r  CaseList._to_dict  r  r   c                 H    [         R                  " U R                  5       SS9$ )z/Return a `str` version of this CaseList object.r  r  r  r  s    r   r  CaseList.__str__  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  CaseList.__eq__  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  CaseList.__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   re   r   r   r}  r}  s  s    $  "&!%%)!%"   	
  #  F| 
@ d z  " $ $ "4 4/J /4 /!J !4 !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)rO   i  a  
Specify if the case should be treated as EU regulated. Only one of the following
properties is required. Call EU support utility endpoint to determine which property
must be specified for your account.

:attr bool supported: (optional) indicating whether the case is EU supported.
:attr int data_center: (optional) If EU supported utility endpoint specifies
      data center, then pass the data center id to mark a case as EU supported.
N	supportedrj  r  rj  r   c                    Xl         X l        g)a!  
Initialize a CasePayloadEu object.

:param bool supported: (optional) indicating whether the case is EU
       supported.
:param int data_center: (optional) If EU supported utility endpoint
       specifies data center, then pass the data center id to mark a case as EU
       supported.
Nr  )r#   r  rj  s      r   r!   CasePayloadEu.__init__  s     #&r   r   c                 ~    0 nSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   U " S0 UD6$ )9Initialize a CasePayloadEu object from a json dictionary.r  rj  re   r   r   s      r   r   CasePayloadEu.from_dict  sK     % %		+ 6DE!"'))M":D{T{r   c                 $    U R                  U5      $ )r  r   r   s     r   r   CasePayloadEu._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  rj  )r  r  rj  r  s     r   r  CasePayloadEu.to_dict  sX    4%%$..*D!%E+4''D,<,<,H#'#3#3E- r   c                 "    U R                  5       $ r
  r  r  s    r   r  CasePayloadEu._to_dict  r  r   c                 H    [         R                  " U R                  5       SS9$ )z4Return a `str` version of this CasePayloadEu object.r  r  r  r  s    r   r  CasePayloadEu.__str__  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  CasePayloadEu.__eq__  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  CasePayloadEu.__ne__  r&  r   )rj  r  )r   r   r   r   r   r   r   r!   r   r   r   r   r  r  r   r  r  r$  r   re   r   r   rO   rO     s     -1T 'T 's 'd ' d    $ $ 4 4/O / /!O ! !r   rO   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)rE  i!  z
A comment in a case.

:attr str value: (optional) The comment.
:attr str added_at: (optional) Date time when comment was added in UTC.
:attr User added_by: (optional) User info in a case.
Nvalueadded_atadded_byr  r  r  rR   r   c                (    Xl         X l        X0l        g)z
Initialize a Comment object.

:param str value: (optional) The comment.
:param str added_at: (optional) Date time when comment was added in UTC.
:param User added_by: (optional) User info in a case.
Nr  )r#   r  r  r  s       r   r!   Comment.__init__*  s     
  r   r   c                     0 nSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a'  [        R                  UR                  S5      5      US'   U " S0 UD6$ )3Initialize a Comment object from a json dictionary.r  r  r  re   r=   rR   r   r   s      r   r   Comment.from_dict6  sn     e!IIg.DM$yy4D#~~eii
.CDD{T{r   c                 $    U R                  U5      $ )r  r   r   s     r   r   Comment._from_dictB  r  r   c                 4   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                  R	                  5       US'   U$ )r  r  r  r  )r  r  r  r  r  r  s     r   r  Comment.to_dictG  s    4!!djj&<!ZZE'N4$$)B $E*4$$)B $ 5 5 7E*r   c                 "    U R                  5       $ r
  r  r  s    r   r  Comment._to_dictR  r  r   c                 H    [         R                  " U R                  5       SS9$ )z.Return a `str` version of this Comment object.r  r  r  r  s    r   r  Comment.__str__V  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  Comment.__eq__Z  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  Comment.__ne__`  r&  r   )r  r  r  r   r   r   r   r   r   r!   r   r   r   r   r  r  r  r   r  r$  r   re   r   r   rE  rE  !  s     (,TVZ 
! 
!s 
!V 
!_c 
! 	d 	y 	 	 $ $	 	4 4/I /$ /!I !$ !r   rE  c                       \ rS rSrSrS\SSSS4S jr\S	\SS 4S
 j5       r	\S 5       r
S\4S jrS rS\4S jrSS S\4S jrSS S\4S jrSrg)rP   ie  zb
Offering details.

:attr str name: Name of the offering.
:attr OfferingType type: Offering type.
namerL   OfferingTyper   Nc                     Xl         X l        g)zp
Initialize a Offering object.

:param str name: Name of the offering.
:param OfferingType type: Offering type.
Nr  rL   )r#   r  rL   s      r   r!   Offering.__init__m  s     		r   r   c                     0 nSU;   a  UR                  S5      US'   O[        S5      eSU;   a(  [        R                  UR                  S5      5      US'   O[        S5      eU " S0 UD6$ )4Initialize a Offering object from a json dictionary.r  z5Required property 'name' not present in Offering JSONrL   z5Required property 'type' not present in Offering JSONre   )r=   rY   r  r   r   s      r   r   Offering.from_dictw  sj     U? 99V,DLVWWU?'11%))F2CDDLVWW{T{r   c                 $    U R                  U5      $ )r  r   r   s     r   r   Offering._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                  R                  5       US'   U$ )r  r  rL   )r  r  rL   r  r  s     r   r  Offering.to_dict  s[    4  TYY%: IIE&M4  TYY%: II--/E&Mr   c                 "    U R                  5       $ r
  r  r  s    r   r  Offering._to_dict  r  r   c                 H    [         R                  " U R                  5       SS9$ )z/Return a `str` version of this Offering object.r  r  r  r  s    r   r  Offering.__str__  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  Offering.__eq__  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  Offering.__ne__  r&  r   r  r  re   r   r   rP   rP   e  s    S  4  d z   $ $ 4 4/J /4 /!J !4 !r   rP   c                       \ rS rSrSr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  
Offering type.

:attr str group: Offering type group. "crn_service_name" is preferred over
      "category" as the latter is legacy and will be deprecated in the future.
:attr str key: CRN service name of the offering.
:attr str kind: (optional) Optional. Platform kind of the offering.
:attr str id: (optional) Offering id in the catalog. This alone is enough to
      identify the offering.
N)kindr   groupkeyr  r   r   c                4    Xl         X l        X0l        X@l        g)a  
Initialize a OfferingType object.

:param str group: Offering type group. "crn_service_name" is preferred over
       "category" as the latter is legacy and will be deprecated in the future.
:param str key: CRN service name of the offering.
:param str kind: (optional) Optional. Platform kind of the offering.
:param str id: (optional) Offering id in the catalog. This alone is enough
       to identify the offering.
N)r  r  r  r   )r#   r  r  r  r   s        r   r!   OfferingType.__init__  s     
	r   r   c                    0 nSU;   a  UR                  S5      US'   O[        S5      eSU;   a  UR                  S5      US'   O[        S5      eSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   U " S0 UD6$ )8Initialize a OfferingType object from a json dictionary.r  z:Required property 'group' not present in OfferingType JSONr  z8Required property 'key' not present in OfferingType JSONr  r   re   r=   rY   r   s      r   r   OfferingType.from_dict  s     e!IIg.DM[\\E>))E*DKYZZU? 99V,DL5=4DJ{T{r   c                 $    U R                  U5      $ )r  r   r   s     r   r   OfferingType._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  r  r  r  r   )r  r  r  r  r   r  s     r   r  OfferingType.to_dict  s    4!!djj&<!ZZE'N4DHH$888E%L4  TYY%: IIE&M4477#6''E$Kr   c                 "    U R                  5       $ r
  r  r  s    r   r  OfferingType._to_dict  r  r   c                 H    [         R                  " U R                  5       SS9$ )z3Return a `str` version of this OfferingType object.r  r  r  r  s    r   r  OfferingType.__str__  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  OfferingType.__eq__  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  OfferingType.__ne__  r&  r   c                        \ rS rSrSrSrSrSrg)OfferingType.GroupEnumi  z
Offering type group. "crn_service_name" is preferred over "category" as the latter
is legacy and will be deprecated in the future.
crn_service_namecategoryre   N)r   r   r   r   r   CRN_SERVICE_NAMECATEGORYr   re   r   r   	GroupEnumr    s    	
 .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   re   r   r   r  r    s    	 =AD c  c c UY   d ~  " $ $ 4 4/N /t /!N !t !C 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  zq
Container for URL pointer to related pages of cases.

:attr str href: (optional) URL to related pages of cases.
Nhrefr  r   c                    Xl         g)za
Initialize a PaginationLink object.

:param str href: (optional) URL to related pages of cases.
Nr  )r#   r  s     r   r!   PaginationLink.__init__	  s	     	r   r   c                 J    0 nSU;   a  UR                  S5      US'   U " S0 UD6$ ):Initialize a PaginationLink object from a json dictionary.r  re   r   r   s      r   r   PaginationLink.from_dict  s.     U? 99V,DL{T{r   c                 $    U R                  U5      $ )r  r   r   s     r   r   PaginationLink._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  PaginationLink.to_dict  s/    4  TYY%: IIE&Mr   c                 "    U R                  5       $ r
  r  r  s    r   r  PaginationLink._to_dict%  r  r   c                 H    [         R                  " U R                  5       SS9$ )z5Return a `str` version of this PaginationLink object.r  r  r  r  s    r   r  PaginationLink.__str__)  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  PaginationLink.__eq__-  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  PaginationLink.__ne__3  r&  r   r  re   r   r   r  r    s     '+  t  d '7   $ $ 4 4/, / /!, ! !r   r  c                       \ rS rSrSrSSSSSS.S\S\S\S\S	\S
S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)rD  i8  a  
A resource record of a case.

:attr str crn: (optional) ID of the resource.
:attr str name: (optional) Name of the resource.
:attr str type: (optional) Type of resource.
:attr str url: (optional) URL of resource.
:attr str note: (optional) Note about resource.
Nr   r  rL   r9   r   r   r  rL   r9   r   r   c                @    Xl         X l        X0l        X@l        XPl        g)a  
Initialize a Resource object.

:param str crn: (optional) ID of the resource.
:param str name: (optional) Name of the resource.
:param str type: (optional) Type of resource.
:param str url: (optional) URL of resource.
:param str note: (optional) Note about resource.
Nr
  )r#   r   r  rL   r9   r   s         r   r!   Resource.__init__C  s     			r   r   c                    0 nSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   U " S0 UD6$ )4Initialize a Resource object from a json dictionary.r   r  rL   r9   r   re   r   r   s      r   r   Resource.from_dictU  s     E>))E*DKU? 99V,DLU? 99V,DLE>))E*DKU? 99V,DL{T{r   c                 $    U R                  U5      $ )r  r   r   s     r   r   Resource._from_dicte  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$ )r  r   r  rL   r9   r   )r  r   r  rL   r9   r   r  s     r   r  Resource.to_dictj  s    4DHH$888E%L4  TYY%: IIE&M4  TYY%: IIE&M4DHH$888E%L4  TYY%: IIE&Mr   c                 "    U R                  5       $ r
  r  r  s    r   r  Resource._to_dicty  r  r   c                 H    [         R                  " U R                  5       SS9$ )z/Return a `str` version of this Resource object.r  r  r  r  s    r   r  Resource.__str__}  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  Resource.__eq__  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  Resource.__ne__  r&  r   )r   r  r   rL   r9   r  re   r   r   rD  rD  8  s     !dQUcg(+:=KN]`	$ d z   $ $ 4 4/J /4 /!J !4 !r   rD  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)rQ   i  a  
Payload to add a resource to a case.

:attr str crn: (optional) Cloud Resource Name of the resource.
:attr str type: (optional) Only used to attach Classic IaaS devices that have no
      CRN.
:attr float id: (optional) Deprecated: Only used to attach Classic IaaS devices
      that have no CRN. Id of Classic IaaS device. This is deprecated in favor of the
      crn field.
:attr str note: (optional) A note about this resource.
Nr   r   rL   r   r   r   c                4    Xl         X l        X0l        X@l        g)a  
Initialize a ResourcePayload object.

:param str crn: (optional) Cloud Resource Name of the resource.
:param str type: (optional) Only used to attach Classic IaaS devices that
       have no CRN.
:param float id: (optional) Deprecated: Only used to attach Classic IaaS
       devices that have no CRN. Id of Classic IaaS device. This is deprecated in
       favor of the crn field.
:param str note: (optional) A note about this resource.
Nr   )r#   r   rL   r   r   s        r   r!   ResourcePayload.__init__  s     		r   r   c                     0 nSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   U " S0 UD6$ );Initialize a ResourcePayload object from a json dictionary.r   rL   r   r   re   r   r   s      r   r   ResourcePayload.from_dict  sx     E>))E*DKU? 99V,DL5=4DJU? 99V,DL{T{r   c                 $    U R                  U5      $ )r   r   r   s     r   r   ResourcePayload._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  r   rL   r   r   )r  r   rL   r   r   r  s     r   r  ResourcePayload.to_dict  s    4DHH$888E%L4  TYY%: IIE&M4477#6''E$K4  TYY%: IIE&Mr   c                 "    U R                  5       $ r
  r  r  s    r   r  ResourcePayload._to_dict  r  r   c                 H    [         R                  " U R                  5       SS9$ )z6Return a `str` version of this ResourcePayload object.r  r  r  r  s    r   r  ResourcePayload.__str__  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  ResourcePayload.__eq__  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  ResourcePayload.__ne__  r&  r   )r   r   r   rL   )r   r   r   r   r   r   r   r!   r   r   r   r   r  r  r  r   r  r$  r   re   r   r   rQ   rQ     s    
 &*t[_ s   UX dh " d '8   $ $ 4 4/- /$ /!- !$ !r   rQ   c                       \ rS rSrSrS\SS4S jr\S\SS 4S j5       r	\S\4S	 j5       r
\S\S\4S
 j5       r " S S\\5      rSrg)ro   i  zY
Payload to update status of the case.

:attr str action: action to perform on the case.
actionr   Nc                 \    SR                  SR                  / SQ5      5      n[        U5      e)zW
Initialize a StatusPayload object.

:param str action: action to perform on the case.
zVCannot instantiate base class. Instead, instantiate one of the defined subclasses: {0}, ResolvePayloadUnresolvePayloadAcceptPayload)ri   join	Exception)r#   r/  msgs      r   r!   StatusPayload.__init__  s.     gmmIIMN
 nr   r   c                     U R                  U5      nX :w  a  UR                  U5      $ SR                  SR                  / SQ5      5      n[	        U5      e)9Initialize a StatusPayload object from a json dictionary.zCannot convert dictionary into an instance of base class 'StatusPayload'. The discriminator value should map to a valid subclass: {1}r1  r2  )_get_class_by_discriminatorr   ri   r6  r7  )r   r   
disc_classr8  s       r   r   StatusPayload.from_dict  sV     44U;
''..L
&RS
T 	 nr   c                 $    U R                  U5      $ )r;  r   r   s     r   r   StatusPayload._from_dict  r  r   c                 6   0 nSUS'   SUS'   SUS'   UR                  S5      nUc  [        S5      eUR                  X35      n [        [        R                  [
           U5      n[        U[        5      (       a  U$ [        S	U-  5      e! [         a    U n N3f = f)
Nr3  resolver4  	unresolver5  acceptr/  z?Discriminator property 'action' not found in StatusPayload JSONz%s is not a discriminator class)
r=   rY   getattrsysmodulesr   AttributeErrorrs   object	TypeError)r   r   mapping
disc_value
class_namer=  s         r   r<  )StatusPayload._get_class_by_discriminator   s    -	1+YYx(
`aa[[8
	 X!6
CJ j&))9JFGG	  	J	s   !B	 	BBc                   $    \ rS rSrSrSrSrSrSrg)StatusPayload.ActionEnumi   
action to perform on the case.
rB  rC  rD  re   N	r   r   r   r   r   RESOLVE	UNRESOLVEACCEPTr   re   r   r   
ActionEnumrP        	 	r   rV  re   )r   r   r   r   r   r   r!   r   r   r   r   rI  r<  r   rV  r   re   r   r   ro   ro     s    	s 	t 	 	d 	 	 	 $t $ $ H H H H"S$ r   ro   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 S\\5      rSrg)rR   i  z
User info in a case.

:attr str name: (optional) Full name of the user.
:attr str realm: the ID realm.
:attr str user_id: unique user ID in the realm specified by the type.
N)r  realmuser_idr  r   c                (    X0l         Xl        X l        g)z
Initialize a User object.

:param str realm: the ID realm.
:param str user_id: unique user ID in the realm specified by the type.
Nr  rY  rZ  )r#   rY  rZ  r  s       r   r!   User.__init__%  s     	
r   r   c                     0 nSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   O[        S5      eSU;   a  UR                  S5      US'   O[        S5      eU " S0 UD6$ )0Initialize a User object from a json dictionary.r  rY  z2Required property 'realm' not present in User JSONrZ  z4Required property 'user_id' not present in User JSONre   r  r   s      r   r   User.from_dict0  sz     U? 99V,DLe!IIg.DMSTT#ii	2DOUVV{T{r   c                 $    U R                  U5      $ )r_  r   r   s     r   r   User._from_dict@  r  r   c                    0 n[        U S5      (       a  [        U S5      b  [        U S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$ )r  r  rY  rZ  )r  rE  rY  rZ  r  s     r   r  User.to_dictE  s|    4  WT6%:%F#D&1E&M4!!djj&<!ZZE'N4##(@#||E)r   c                 "    U R                  5       $ r
  r  r  s    r   r  User._to_dictP  r  r   c                 H    [         R                  " U R                  5       SS9$ )z+Return a `str` version of this User object.r  r  r  r  s    r   r  User.__str__T  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  User.__eq__X  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  User.__ne__^  r&  r   c                   $    \ rS rSrSrSrSrSrSrg)User.RealmEnumib  z
the ID realm.
IBMidSLBSSre   N)	r   r   r   r   r   IBMIDrp  rq  r   re   r   r   	RealmEnumrn  b  s    	 r   rs  r\  )r   r   r   r   r   r   r!   r   r   r   r   r  r  r  r   r  r$  r   rs  r   re   r   r   rR   rR     s     AE 	c 	C 	# 	 	 d v   $ $	 	4 4/F /t /!F !t !C r   rR   c                       \ rS rSrSr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)	Watchlistil  z{
Payload to add/remove users to/from the case watchlist.

:attr List[User] watchlist: (optional) Array of user ID objects.
Nrz   rI   rR   r   c                    Xl         g)zc
Initialize a Watchlist object.

:param List[User] watchlist: (optional) Array of user ID objects.
Nrz   )r#   rI   s     r   r!   Watchlist.__init__s  s	     #r   r   c                     0 nSU;   a8  UR                  S5       Vs/ s H  n[        R                  U5      PM     snUS'   U " S0 UD6$ s  snf )5Initialize a Watchlist object from a json dictionary.rI   re   r  r.  s       r   r   Watchlist.from_dict{  sP     %<AIIk<R S<Rq!2<R SD{T{ !Tr0  c                 $    U R                  U5      $ )ry  r   r   s     r   r   Watchlist._from_dict  r  r   c                     0 n[        U S5      (       a:  U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS'   U$ s  snf )r  rI   )r  rI   r  r4  s      r   r  Watchlist.to_dict  sI    4%%$..*D7;~~!F~!))+~!FE+ "Gr6  c                 "    U R                  5       $ r
  r  r  s    r   r  Watchlist._to_dict  r  r   c                 H    [         R                  " U R                  5       SS9$ )z0Return a `str` version of this Watchlist object.r  r  r  r  s    r   r  Watchlist.__str__  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  Watchlist.__eq__  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  Watchlist.__ne__  r&  r   r?  re   r   r   ru  ru  l  s     59 #T&\ #T # d {   $ $ 4 4/K /D /!K !D !r   ru  c                       \ rS rSrSr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)WatchlistAddResponsei  z
Response of a request when adding to watchlist.

:attr List[User] added: (optional) List of added user.
:attr List[User] failed: (optional) List of failed to add user.
Naddedfailedr  rR   r  r   c                    Xl         X l        g)z
Initialize a WatchlistAddResponse object.

:param List[User] added: (optional) List of added user.
:param List[User] failed: (optional) List of failed to add user.
Nr  )r#   r  r  s      r   r!   WatchlistAddResponse.__init__  s     
r   r   c                 "   0 nSU;   a8  UR                  S5       Vs/ s H  n[        R                  U5      PM     snUS'   SU;   a8  UR                  S5       Vs/ s H  n[        R                  U5      PM     snUS'   U " S0 UD6$ s  snf s  snf )@Initialize a WatchlistAddResponse object from a json dictionary.r  r  re   r  r.  s       r   r   WatchlistAddResponse.from_dict  s     e8=		'8JK8J1T^^A.8JKDMu9>89LM9LAdnnQ/9LMDN{T{ LMs   BBc                 $    U R                  U5      $ )r  r   r   s     r   r   WatchlistAddResponse._from_dict  r  r   c                 J   0 n[        U S5      (       a:  U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS'   [        U S5      (       a:  U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS'   U$ s  snf s  snf )r  r  r  )r  r  r  r  r4  s      r   r  WatchlistAddResponse.to_dict  s    4!!djj&<37::>:aiik:>E'N4""t{{'>48KK@Kqyy{K@E(O ?@s   B:B c                 "    U R                  5       $ r
  r  r  s    r   r  WatchlistAddResponse._to_dict  r  r   c                 H    [         R                  " U R                  5       SS9$ )z;Return a `str` version of this WatchlistAddResponse object.r  r  r  r  s    r   r  WatchlistAddResponse.__str__  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  WatchlistAddResponse.__eq__  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  WatchlistAddResponse.__ne__  r&  r   r?  re   r   r   r  r    s     15T f d6l VZ  d '=   $ $ 4 4/2 /t /!2 !t !r   r  c                       \ rS rSrSr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)r5  i  z
Payload to accept the proposed resolution of the case.

:attr str action: action to perform on the case.
:attr str comment: (optional) Comment about accepting the proposed resolution.
Nru   r/  ru   r   c                    Xl         X l        g)z
Initialize a AcceptPayload object.

:param str action: action to perform on the case.
:param str comment: (optional) Comment about accepting the proposed
       resolution.
Nr/  ru   r#   r/  ru   s      r   r!   AcceptPayload.__init__  s     r   r   c                     0 nSU;   a  UR                  S5      US'   O[        S5      eSU;   a  UR                  S5      US'   U " S0 UD6$ )9Initialize a AcceptPayload object from a json dictionary.r/  z<Required property 'action' not present in AcceptPayload JSONru   re   r  r   s      r   r   AcceptPayload.from_dict  sU     u"YYx0DN]^^#ii	2DO{T{r   c                 $    U R                  U5      $ )r  r   r   s     r   r   AcceptPayload._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/  ru   r  r/  ru   r  s     r   r  AcceptPayload.to_dict  S    4""t{{'>"kkE(O4##(@#||E)r   c                 "    U R                  5       $ r
  r  r  s    r   r  AcceptPayload._to_dict  r  r   c                 H    [         R                  " U R                  5       SS9$ )z4Return a `str` version of this AcceptPayload object.r  r  r  r  s    r   r  AcceptPayload.__str__  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  AcceptPayload.__eq__  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  AcceptPayload.__ne__  r&  r   c                   $    \ rS rSrSrSrSrSrSrg)AcceptPayload.ActionEnumi  rQ  rB  rC  rD  re   NrR  re   r   r   rV  r    rW  r   rV  r  r   r   r   r   r   r   r!   r   r   r   r   r  r  r  r   r  r$  r   rV  r   re   r   r   r5  r5    s     7; 
s 
 
t 
 	d 	 	 	 $ $ 4 4/O / /!O ! !S$ r   r5  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 S\\5      rSrg)r3  i)  a  
Payload to resolve the case.

:attr str action: action to perform on the case.
:attr str comment: (optional) comment of resolution.
:attr int resolution_code: * 1: Client error
      * 2: Defect found with Component/Service
      * 3: Documentation Error
      * 4: Solution found in forums
      * 5: Solution found in public Documentation
      * 6: Solution no longer required
      * 7: Solution provided by IBM outside of support case
      * 8: Solution provided by IBM support engineer.
Nr  r/  resolution_coderu   r   c                (    Xl         X0l        X l        g)a   
Initialize a ResolvePayload object.

:param str action: action to perform on the case.
:param int resolution_code: * 1: Client error
       * 2: Defect found with Component/Service
       * 3: Documentation Error
       * 4: Solution found in forums
       * 5: Solution found in public Documentation
       * 6: Solution no longer required
       * 7: Solution provided by IBM outside of support case
       * 8: Solution provided by IBM support engineer.
:param str comment: (optional) comment of resolution.
Nr/  ru   r  )r#   r/  r  ru   s       r   r!   ResolvePayload.__init__9  s      .r   r   c                     0 nSU;   a  UR                  S5      US'   O[        S5      eSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   O[        S5      eU " S0 UD6$ ):Initialize a ResolvePayload object from a json dictionary.r/  z=Required property 'action' not present in ResolvePayload JSONru   r  zFRequired property 'resolution_code' not present in ResolvePayload JSONre   r  r   s      r   r   ResolvePayload.from_dictM  s~     u"YYx0DN^__#ii	2DO%&+ii0A&BD"#ghh{T{r   c                 $    U R                  U5      $ )r  r   r   s     r   r   ResolvePayload._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$ )r  r/  ru   r  )r  r/  ru   r  r  s     r   r  ResolvePayload.to_dictb  s}    4""t{{'>"kkE(O4##(@#||E)4*++0D0D0P'+';';E#$r   c                 "    U R                  5       $ r
  r  r  s    r   r  ResolvePayload._to_dictm  r  r   c                 H    [         R                  " U R                  5       SS9$ )z5Return a `str` version of this ResolvePayload object.r  r  r  r  s    r   r  ResolvePayload.__str__q  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  ResolvePayload.__eq__u  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  ResolvePayload.__ne__{  r&  r   c                   $    \ rS rSrSrSrSrSrSrg)ResolvePayload.ActionEnumi  rQ  rB  rC  rD  re   NrR  re   r   r   rV  r    rW  r   rV  r  )r   r   r   r   r   r   r   r!   r   r   r   r   r  r  r  r   r  r$  r   rV  r   re   r   r   r3  r3  )  s     MQ /s /S /c /UY /( d '7   $ $	 	4 4/, / /!, ! !S$ r   r3  c                       \ rS rSrSrS\S\SS4S jr\S\SS 4S	 j5       r	\S
 5       r
S\4S jrS rS\4S jrSS S\4S jrSS S\4S jr " S S\\5      rSrg)r4  i  z
Payload to unresolve the case.

:attr str action: action to perform on the case.
:attr str comment: Comment why the case should be unresolved.
r/  ru   r   Nc                     Xl         X l        g)z
Initialize a UnresolvePayload object.

:param str action: action to perform on the case.
:param str comment: Comment why the case should be unresolved.
Nr  r  s      r   r!   UnresolvePayload.__init__  s     r   r   c                     0 nSU;   a  UR                  S5      US'   O[        S5      eSU;   a  UR                  S5      US'   O[        S5      eU " S0 UD6$ )<Initialize a UnresolvePayload object from a json dictionary.r/  z?Required property 'action' not present in UnresolvePayload JSONru   z@Required property 'comment' not present in UnresolvePayload JSONre   r  r   s      r   r   UnresolvePayload.from_dict  sa     u"YYx0DN`aa#ii	2DOabb{T{r   c                 $    U R                  U5      $ )r  r   r   s     r   r   UnresolvePayload._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  s     r   r  UnresolvePayload.to_dict  r  r   c                 "    U R                  5       $ r
  r  r  s    r   r  UnresolvePayload._to_dict  r  r   c                 H    [         R                  " U R                  5       SS9$ )z7Return a `str` version of this UnresolvePayload object.r  r  r  r  s    r   r  UnresolvePayload.__str__  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  UnresolvePayload.__eq__  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  UnresolvePayload.__ne__  r&  r   c                   $    \ rS rSrSrSrSrSrSrg)UnresolvePayload.ActionEnumi  rQ  rB  rC  rD  re   NrR  re   r   r   rV  r    rW  r   rV  r  r  re   r   r   r4  r4    s    	s 	S 	T 	 d '9   $ $ 4 4/. /4 /!. !4 !S$ r   r4  c            	           \ rS rSrSr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)FileWithMetadatai  z
A file with its associated metadata.

:attr BinaryIO data: The data / content for the file.
:attr str filename: (optional) The filename of the file.
:attr str content_type: (optional) The content type of the file.
N)r   r   rX   r   r   r   c                (    Xl         X l        X0l        g)z
Initialize a FileWithMetadata object.

:param BinaryIO data: The data / content for the file.
:param str filename: (optional) The filename of the file.
:param str content_type: (optional) The content type of the file.
N)rX   r   r   )r#   rX   r   r   s       r   r!   FileWithMetadata.__init__  s     	 (r   r   c                     0 nSU;   a  UR                  S5      US'   O[        S5      eSU;   a  UR                  S5      US'   SU;   a  UR                  S5      US'   U " S0 UD6$ )<Initialize a FileWithMetadata object from a json dictionary.rX   z=Required property 'data' not present in FileWithMetadata JSONr   r   re   r  r   s      r   r   FileWithMetadata.from_dict  sp     U? 99V,DL^__$yy4DU"#(99^#<D {T{r   c                 $    U R                  U5      $ )r  r   r   s     r   r   FileWithMetadata._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$ )r  rX   r   r   )r  rX   r   r   r  s     r   r  FileWithMetadata.to_dict  s{    4  TYY%: IIE&M4$$)B $E*4((T->->-J$($5$5E.!r   c                 "    U R                  5       $ r
  r  r  s    r   r  FileWithMetadata._to_dict	  r  r   c                 H    [         R                  " U R                  5       SS9$ )z7Return a `str` version of this FileWithMetadata object.r  r  r  r  s    r   r  FileWithMetadata.__str__	  r  r   r  c                 j    [        XR                  5      (       d  gU R                  UR                  :H  $ r  r  r  s     r   r  FileWithMetadata.__eq__	  r!  r   c                     X:X  + $ r#  re   r  s     r   r$  FileWithMetadata.__ne__	  r&  r   )r   rX   r   )r   r   r   r   r   r   r   r!   r   r   r   r   r  r  r  r   r  r$  r   re   r   r   r  r    s     ;?TX 
)X 
)C 
)c 
)]a 
) d '9   $ $	 	4 4/. /4 /!. !4 !r   r  c                       \ rS rSrSrSSSSSS.S\S\S\S\S	\\   S
\\   SS4S jjr	S\
4S jrS\\   4S jrS\\   4S jrSrg)GetCasesPageri	  zJ
GetCasesPager can be used to simplify the use of the "get_cases" method.
N)r'   r(   r)   r*   r+   clientr'   r(   r)   r*   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 GetCasesPager object.
:param int limit: (optional) Number of cases that are returned.
:param str search: (optional) String that a case might contain.
:param str sort: (optional) Sort field and direction. If omitted, default
       to descending of updated date. Prefix "~" signifies sort in descending.
:param List[str] status: (optional) Case status filter.
:param List[str] fields: (optional) Selected fields of interest instead of
       all of the case information.
Tr  N)	_has_next_client_page_context_limit_search_sort_status_fields)r#   r  r'   r(   r)   r*   r+   s          r   r!   GetCasesPager.__init__$	  s5    ( $d^
r   c                     U R                   $ )zE
Returns true if there are potentially more results to be retrieved.
)r  r  s    r   has_nextGetCasesPager.has_nextA	  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                  R                  S5      S9R                  5       nSnUR                  S5      nUb  [        UR                  S5      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 Case.
:rtype: List[dict]
zNo more results available)messager  )r'   r(   r)   r*   r+   r&   Nr  r&   Fr  )r  StopIterationr  r.   r  r  r  r  r   r  r=   
get_resultr	   r  )r#   resultr  next_page_links       r   get_nextGetCasesPager.get_nextG	  s     }}(CDD''++<<<<<<%%))&1 ( 
 *, 	 F+%">#5#5f#=xHD%)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 Case.
:rtype: List[dict]
)r  r  extend)r#   results	next_pages      r   get_allGetCasesPager.get_allc	  s?     mmooINN9% mmoo r   )r  r   r  r  r  r  r  r  )r   r   r   r   r   r   r   r   r   r!   r   r  rg   r  r  r   re   r   r   r  r  	  s        ! 	
   S	 S	 
:$ #$t* #8d r   r  ).r   enumr   typingr   r   r   r[   rF  ibm_cloud_sdk_corer   r   r	   /ibm_cloud_sdk_core.authenticators.authenticatorr
   $ibm_cloud_sdk_core.get_authenticatorr   ibm_cloud_sdk_core.utilsr   r   commonr   r   r   r   r   r(  rA  rC  r}  rO   rE  rP   r  r  rD  rQ   ro   rR   ru  r  r5  r3  r4  r  r  re   r   r   <module>r     sZ  &  ' '  
 M M I S @ #q{ qh+ +\ NW! W!t3! 3!lm m`;! ;!|h! h!V@! @!FA! A!H>! >!BY Yx3! 3!lQ! Q!hN! N!b< <~M M`3! 3!l:! :!zGM GT]] ]@H} HVC! C!VO Or   