egain-api-python 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- egain_api_python/__init__.py +17 -0
- egain_api_python/_hooks/__init__.py +5 -0
- egain_api_python/_hooks/registration.py +13 -0
- egain_api_python/_hooks/sdkhooks.py +76 -0
- egain_api_python/_hooks/types.py +112 -0
- egain_api_python/_version.py +15 -0
- egain_api_python/aiservices.py +23 -0
- egain_api_python/answers.py +281 -0
- egain_api_python/articlelists.py +469 -0
- egain_api_python/basesdk.py +368 -0
- egain_api_python/connectorssearchevents.py +537 -0
- egain_api_python/content.py +23 -0
- egain_api_python/errors/__init__.py +78 -0
- egain_api_python/errors/egaindefaulterror.py +40 -0
- egain_api_python/errors/egainerror.py +30 -0
- egain_api_python/errors/gethealthop.py +74 -0
- egain_api_python/errors/no_response_error.py +17 -0
- egain_api_python/errors/responsevalidationerror.py +27 -0
- egain_api_python/errors/schemas_wserrorcommon.py +51 -0
- egain_api_python/errors/wserrorcommon.py +49 -0
- egain_api_python/escalation.py +955 -0
- egain_api_python/export.py +487 -0
- egain_api_python/federatedsearchevent.py +287 -0
- egain_api_python/general.py +925 -0
- egain_api_python/guidedhelp.py +3373 -0
- egain_api_python/health.py +253 -0
- egain_api_python/httpclient.py +125 -0
- egain_api_python/import_.py +1161 -0
- egain_api_python/models/__init__.py +2136 -0
- egain_api_python/models/acceptghsolutionop.py +52 -0
- egain_api_python/models/acceptlanguage.py +23 -0
- egain_api_python/models/accessibleportal.py +37 -0
- egain_api_python/models/action.py +56 -0
- egain_api_python/models/actionsearch.py +92 -0
- egain_api_python/models/addasreferenceop.py +52 -0
- egain_api_python/models/addbookmarkop.py +43 -0
- egain_api_python/models/additionalsnippets.py +57 -0
- egain_api_python/models/addtoreplyop.py +52 -0
- egain_api_python/models/aisearchop.py +131 -0
- egain_api_python/models/aisearchresponse.py +67 -0
- egain_api_python/models/allaccessibleportals.py +28 -0
- egain_api_python/models/answer.py +21 -0
- egain_api_python/models/answeredquestion.py +125 -0
- egain_api_python/models/answerrange.py +41 -0
- egain_api_python/models/answersrequest.py +78 -0
- egain_api_python/models/answersresponse.py +93 -0
- egain_api_python/models/article.py +241 -0
- egain_api_python/models/articleactivitylink.py +62 -0
- egain_api_python/models/articleadditionalattributes.py +23 -0
- egain_api_python/models/articleaisearchresult.py +254 -0
- egain_api_python/models/articleattachment.py +44 -0
- egain_api_python/models/articlelist.py +48 -0
- egain_api_python/models/articlelistresult.py +38 -0
- egain_api_python/models/articlelistsresult.py +22 -0
- egain_api_python/models/articlepermissions.py +25 -0
- egain_api_python/models/articlepermissionsresult.py +27 -0
- egain_api_python/models/articlerating.py +51 -0
- egain_api_python/models/articleratingsresponse.py +28 -0
- egain_api_python/models/articleresult.py +159 -0
- egain_api_python/models/articleresultadditionalattributes.py +22 -0
- egain_api_python/models/articleresults.py +32 -0
- egain_api_python/models/articlesearchresult.py +243 -0
- egain_api_python/models/articlesearchresults.py +32 -0
- egain_api_python/models/articlesort.py +11 -0
- egain_api_python/models/articlesortorder.py +11 -0
- egain_api_python/models/articletype.py +56 -0
- egain_api_python/models/articlewitheditions.py +227 -0
- egain_api_python/models/attachment.py +31 -0
- egain_api_python/models/attachmentadditionalattributes.py +10 -0
- egain_api_python/models/attachmentcontent.py +57 -0
- egain_api_python/models/attachmentcontentresult.py +22 -0
- egain_api_python/models/attachmentforcreatesuggestion.py +25 -0
- egain_api_python/models/attachments.py +35 -0
- egain_api_python/models/attachmentsummary.py +37 -0
- egain_api_python/models/attachmentupload.py +20 -0
- egain_api_python/models/avertcustomerescalationop.py +44 -0
- egain_api_python/models/bookmark.py +57 -0
- egain_api_python/models/bookmarkresult.py +26 -0
- egain_api_python/models/bookmarkstatus.py +34 -0
- egain_api_python/models/case.py +158 -0
- egain_api_python/models/caseadditionalattributes.py +11 -0
- egain_api_python/models/caseanswer.py +21 -0
- egain_api_python/models/casebase.py +67 -0
- egain_api_python/models/casebaseresult.py +28 -0
- egain_api_python/models/casebasesearchsettings.py +26 -0
- egain_api_python/models/caselistresult.py +74 -0
- egain_api_python/models/caselistresults.py +28 -0
- egain_api_python/models/casequestion.py +16 -0
- egain_api_python/models/casequestiondetail.py +29 -0
- egain_api_python/models/casesearch.py +80 -0
- egain_api_python/models/clusterid.py +16 -0
- egain_api_python/models/clusterresult.py +37 -0
- egain_api_python/models/clusterresults.py +28 -0
- egain_api_python/models/comment.py +33 -0
- egain_api_python/models/comments.py +26 -0
- egain_api_python/models/completecustomerescalationop.py +44 -0
- egain_api_python/models/compliancearticleresult.py +166 -0
- egain_api_python/models/compliancearticleresultadditionalattributes.py +22 -0
- egain_api_python/models/compliancearticleresults.py +35 -0
- egain_api_python/models/complianceforarticle.py +59 -0
- egain_api_python/models/complyarticleop.py +40 -0
- egain_api_python/models/components_schemas_tag.py +25 -0
- egain_api_python/models/components_schemas_tagcategory.py +39 -0
- egain_api_python/models/components_schemas_taggroup.py +25 -0
- egain_api_python/models/configurableattribute.py +25 -0
- egain_api_python/models/configurableattributes.py +15 -0
- egain_api_python/models/contactperson.py +43 -0
- egain_api_python/models/contacts.py +21 -0
- egain_api_python/models/createbookmark.py +64 -0
- egain_api_python/models/createdby.py +37 -0
- egain_api_python/models/createfederatedsearchevent.py +85 -0
- egain_api_python/models/createfederatedsearchresulteventop.py +46 -0
- egain_api_python/models/createimportop.py +20 -0
- egain_api_python/models/createimportvalidationop.py +20 -0
- egain_api_python/models/createquickpick.py +34 -0
- egain_api_python/models/createquickpickop.py +55 -0
- egain_api_python/models/createsearchresulteventforconnectors.py +71 -0
- egain_api_python/models/createsearchresulteventforconnectorsop.py +48 -0
- egain_api_python/models/createsignedurlop.py +29 -0
- egain_api_python/models/createsuggestion.py +126 -0
- egain_api_python/models/createviewedsearchresulteventforconnectors.py +76 -0
- egain_api_python/models/createviewedsearchresultseventforconnectorsop.py +48 -0
- egain_api_python/models/customattribute.py +35 -0
- egain_api_python/models/deletebookmarkop.py +40 -0
- egain_api_python/models/deletesuggestionop.py +40 -0
- egain_api_python/models/department.py +21 -0
- egain_api_python/models/detailfield.py +32 -0
- egain_api_python/models/displayfield.py +27 -0
- egain_api_python/models/dynamiccluster.py +21 -0
- egain_api_python/models/dynamicsearch.py +40 -0
- egain_api_python/models/edition.py +79 -0
- egain_api_python/models/editionwithcontent.py +68 -0
- egain_api_python/models/email.py +21 -0
- egain_api_python/models/exportcontentop.py +14 -0
- egain_api_python/models/exportstatus.py +106 -0
- egain_api_python/models/exportstatusop.py +31 -0
- egain_api_python/models/feedbackarticleforsuggestion.py +34 -0
- egain_api_python/models/folderbreadcrumb.py +24 -0
- egain_api_python/models/foldersummary.py +29 -0
- egain_api_python/models/getacknowledgedcompliancearticlesop.py +119 -0
- egain_api_python/models/getallarticlelistsop.py +47 -0
- egain_api_python/models/getallcasebasesreleasesop.py +65 -0
- egain_api_python/models/getallcasesop.py +83 -0
- egain_api_python/models/getallportalsop.py +60 -0
- egain_api_python/models/getallprofilesinportalop.py +64 -0
- egain_api_python/models/getallquickpicksop.py +83 -0
- egain_api_python/models/getalltopicsop.py +132 -0
- egain_api_python/models/getalluserprofilesop.py +47 -0
- egain_api_python/models/getancestortopicsop.py +133 -0
- egain_api_python/models/getannouncementarticlesop.py +134 -0
- egain_api_python/models/getarticleattachmentbyidop.py +31 -0
- egain_api_python/models/getarticlebyidop.py +257 -0
- egain_api_python/models/getarticlebyidwitheditionsop.py +46 -0
- egain_api_python/models/getarticleeditiondetailsop.py +55 -0
- egain_api_python/models/getarticlelistdetailsop.py +115 -0
- egain_api_python/models/getarticlepermissionsbyidop.py +40 -0
- egain_api_python/models/getarticlepersonalizationop.py +73 -0
- egain_api_python/models/getarticleratingsop.py +74 -0
- egain_api_python/models/getarticlesintopicop.py +172 -0
- egain_api_python/models/getattachmentbyidinportalop.py +56 -0
- egain_api_python/models/getbookmarkop.py +31 -0
- egain_api_python/models/getcasebasereleasebyidop.py +64 -0
- egain_api_python/models/getcasebyidop.py +75 -0
- egain_api_python/models/getchildtopicsop.py +150 -0
- egain_api_python/models/getclusterbycasebasereleaseidop.py +74 -0
- egain_api_python/models/gethealthop.py +130 -0
- egain_api_python/models/getimportcontentop.py +46 -0
- egain_api_python/models/getmyportalsop.py +97 -0
- egain_api_python/models/getmysubscriptionop.py +115 -0
- egain_api_python/models/getpendingcompliancearticlesop.py +119 -0
- egain_api_python/models/getpopulararticlesop.py +133 -0
- egain_api_python/models/getportaldetailsbyidop.py +47 -0
- egain_api_python/models/getrelatedarticlesforsuggestionop.py +96 -0
- egain_api_python/models/getrelatedarticlesop.py +143 -0
- egain_api_python/models/getsuggestionattachmentbyidop.py +76 -0
- egain_api_python/models/getsuggestionattachmentsop.py +40 -0
- egain_api_python/models/getsuggestioncommentsop.py +40 -0
- egain_api_python/models/getsuggestionop.py +107 -0
- egain_api_python/models/gettagcategoriesforinterestforportalop.py +46 -0
- egain_api_python/models/gettopicbreadcrumbforarticleop.py +55 -0
- egain_api_python/models/getuserdetailsop.py +22 -0
- egain_api_python/models/getusermilestonesop.py +22 -0
- egain_api_python/models/ghsearchrequest.py +67 -0
- egain_api_python/models/ghsearchresult.py +75 -0
- egain_api_python/models/ghstepsearchrequest.py +64 -0
- egain_api_python/models/image.py +17 -0
- egain_api_python/models/importcontent.py +79 -0
- egain_api_python/models/importstatus.py +29 -0
- egain_api_python/models/kblanguage.py +63 -0
- egain_api_python/models/kblanguagecode.py +48 -0
- egain_api_python/models/kblanguages.py +22 -0
- egain_api_python/models/knowledgeexport.py +237 -0
- egain_api_python/models/l10nstring.py +22 -0
- egain_api_python/models/languagecode.py +39 -0
- egain_api_python/models/languagecode_parameter.py +39 -0
- egain_api_python/models/languagequeryparameter.py +39 -0
- egain_api_python/models/link.py +25 -0
- egain_api_python/models/makesuggestionop.py +44 -0
- egain_api_python/models/mandatorylanguagequeryparameter.py +38 -0
- egain_api_python/models/metadata.py +29 -0
- egain_api_python/models/milestone.py +21 -0
- egain_api_python/models/milestonename.py +26 -0
- egain_api_python/models/milestones.py +21 -0
- egain_api_python/models/modifiedby.py +37 -0
- egain_api_python/models/modifysuggestion.py +78 -0
- egain_api_python/models/modifysuggestionsop.py +44 -0
- egain_api_python/models/optionalarticleattributes.py +20 -0
- egain_api_python/models/order.py +10 -0
- egain_api_python/models/ownedby.py +37 -0
- egain_api_python/models/paginationinfo.py +32 -0
- egain_api_python/models/patchimportcontentvalidationop.py +46 -0
- egain_api_python/models/personalization.py +67 -0
- egain_api_python/models/phone.py +21 -0
- egain_api_python/models/portal.py +102 -0
- egain_api_python/models/portalresult.py +28 -0
- egain_api_python/models/portalsettings.py +398 -0
- egain_api_python/models/post_portalid_answersop.py +88 -0
- egain_api_python/models/post_portalid_retrieveop.py +88 -0
- egain_api_python/models/profile.py +26 -0
- egain_api_python/models/profileresult.py +24 -0
- egain_api_python/models/publishprofile.py +30 -0
- egain_api_python/models/publishview.py +38 -0
- egain_api_python/models/question.py +101 -0
- egain_api_python/models/questionandanswer.py +26 -0
- egain_api_python/models/quickpickrating.py +32 -0
- egain_api_python/models/quickpickresult.py +38 -0
- egain_api_python/models/quickpickresults.py +28 -0
- egain_api_python/models/ratearticleop.py +71 -0
- egain_api_python/models/referenceresponse.py +80 -0
- egain_api_python/models/rejectghsolutionop.py +52 -0
- egain_api_python/models/relatedquestions.py +28 -0
- egain_api_python/models/resourcetype_parameter.py +10 -0
- egain_api_python/models/restorequickpickop.py +63 -0
- egain_api_python/models/retrieverequest.py +47 -0
- egain_api_python/models/retrieveresponse.py +96 -0
- egain_api_python/models/role.py +26 -0
- egain_api_python/models/roletemplate.py +25 -0
- egain_api_python/models/schemas_answer.py +94 -0
- egain_api_python/models/schemas_customattribute.py +35 -0
- egain_api_python/models/schemas_link.py +27 -0
- egain_api_python/models/schemas_tag.py +21 -0
- egain_api_python/models/schemas_tagcategory.py +75 -0
- egain_api_python/models/schemas_taggroup.py +31 -0
- egain_api_python/models/schemas_tags.py +19 -0
- egain_api_python/models/schemas_wserrorcommon.py +17 -0
- egain_api_python/models/searchfilterattribute.py +61 -0
- egain_api_python/models/searchpriortoescalationop.py +108 -0
- egain_api_python/models/searchresult.py +101 -0
- egain_api_python/models/searchsuggestionop.py +93 -0
- egain_api_python/models/security.py +25 -0
- egain_api_python/models/selectuserprofileop.py +44 -0
- egain_api_python/models/sessioncontextvariable.py +17 -0
- egain_api_python/models/shorturl.py +32 -0
- egain_api_python/models/sortidname.py +10 -0
- egain_api_python/models/sortidnamedepartment.py +11 -0
- egain_api_python/models/stage.py +26 -0
- egain_api_python/models/startcustomerescalationop.py +66 -0
- egain_api_python/models/startescalationrequest.py +94 -0
- egain_api_python/models/startghsearchop.py +74 -0
- egain_api_python/models/startquestionandanswer.py +26 -0
- egain_api_python/models/stepghsearchop.py +62 -0
- egain_api_python/models/stringattributevalue.py +30 -0
- egain_api_python/models/structuredauthoringfields.py +33 -0
- egain_api_python/models/subscribearticleop.py +40 -0
- egain_api_python/models/suggestion.py +190 -0
- egain_api_python/models/suggestionadditionalattributes.py +11 -0
- egain_api_python/models/suggestionattachment.py +46 -0
- egain_api_python/models/suggestions.py +28 -0
- egain_api_python/models/tag.py +17 -0
- egain_api_python/models/tagcategoriesforinterest.py +22 -0
- egain_api_python/models/tagcategory.py +34 -0
- egain_api_python/models/taggroup.py +17 -0
- egain_api_python/models/taggroups.py +20 -0
- egain_api_python/models/tags.py +17 -0
- egain_api_python/models/topic.py +113 -0
- egain_api_python/models/topicadditionalattributes.py +20 -0
- egain_api_python/models/topicaisearchresult.py +67 -0
- egain_api_python/models/topicbreadcrumb.py +24 -0
- egain_api_python/models/topicresult.py +26 -0
- egain_api_python/models/topicsummary.py +31 -0
- egain_api_python/models/topictreenode.py +27 -0
- egain_api_python/models/topictreeresult.py +28 -0
- egain_api_python/models/unsubscribearticleop.py +55 -0
- egain_api_python/models/uploadattachmentop.py +36 -0
- egain_api_python/models/userdetails.py +44 -0
- egain_api_python/models/userprofile.py +33 -0
- egain_api_python/models/userprofiles.py +21 -0
- egain_api_python/models/userview.py +33 -0
- egain_api_python/models/validateimportcontent.py +58 -0
- egain_api_python/models/virtualcase.py +52 -0
- egain_api_python/models/workflow.py +21 -0
- egain_api_python/models/workflowmilestone.py +11 -0
- egain_api_python/models/wserrorcommon.py +17 -0
- egain_api_python/populararticles.py +287 -0
- egain_api_python/portal_article.py +4935 -0
- egain_api_python/portal_attachment.py +494 -0
- egain_api_python/portal_bookmark.py +707 -0
- egain_api_python/portal_sdk.py +88 -0
- egain_api_python/portal_suggestion.py +2283 -0
- egain_api_python/portal_topic.py +975 -0
- egain_api_python/portal_userdetails.py +211 -0
- egain_api_python/portal_userprofile.py +431 -0
- egain_api_python/py.typed +1 -0
- egain_api_python/retrieve.py +265 -0
- egain_api_python/sdk.py +216 -0
- egain_api_python/sdkconfiguration.py +50 -0
- egain_api_python/search.py +251 -0
- egain_api_python/types/__init__.py +21 -0
- egain_api_python/types/basemodel.py +39 -0
- egain_api_python/usermilestones.py +219 -0
- egain_api_python/utils/__init__.py +200 -0
- egain_api_python/utils/annotations.py +79 -0
- egain_api_python/utils/datetimes.py +23 -0
- egain_api_python/utils/enums.py +74 -0
- egain_api_python/utils/eventstreaming.py +248 -0
- egain_api_python/utils/forms.py +223 -0
- egain_api_python/utils/headers.py +136 -0
- egain_api_python/utils/logger.py +27 -0
- egain_api_python/utils/metadata.py +118 -0
- egain_api_python/utils/queryparams.py +205 -0
- egain_api_python/utils/requestbodies.py +66 -0
- egain_api_python/utils/retries.py +217 -0
- egain_api_python/utils/security.py +192 -0
- egain_api_python/utils/serializers.py +249 -0
- egain_api_python/utils/unmarshal_json_response.py +24 -0
- egain_api_python/utils/url.py +155 -0
- egain_api_python/utils/values.py +137 -0
- egain_api_python-0.1.1.dist-info/METADATA +827 -0
- egain_api_python-0.1.1.dist-info/RECORD +332 -0
- egain_api_python-0.1.1.dist-info/WHEEL +5 -0
- egain_api_python-0.1.1.dist-info/licenses/LICENSE +21 -0
- egain_api_python-0.1.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,3373 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from .basesdk import BaseSDK
|
4
|
+
from egain_api_python import errors, models, utils
|
5
|
+
from egain_api_python._hooks import HookContext
|
6
|
+
from egain_api_python.types import OptionalNullable, UNSET
|
7
|
+
from egain_api_python.utils import get_security_from_env
|
8
|
+
from egain_api_python.utils.unmarshal_json_response import unmarshal_json_response
|
9
|
+
from typing import Any, List, Mapping, Optional, Union
|
10
|
+
|
11
|
+
|
12
|
+
class Guidedhelp(BaseSDK):
|
13
|
+
def get_all_casebases_releases(
|
14
|
+
self,
|
15
|
+
*,
|
16
|
+
accept_language: models.AcceptLanguage,
|
17
|
+
portal_id: str,
|
18
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
19
|
+
pagenum: Optional[int] = 1,
|
20
|
+
pagesize: Optional[int] = 10,
|
21
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
22
|
+
server_url: Optional[str] = None,
|
23
|
+
timeout_ms: Optional[int] = None,
|
24
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
25
|
+
) -> Optional[models.CasebaseResult]:
|
26
|
+
r"""Get Available Casebases Releases
|
27
|
+
|
28
|
+
## Overview
|
29
|
+
The Get Available Casebases Releases API retrieves all Casebase Releases associated with a portal.
|
30
|
+
|
31
|
+
|
32
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
33
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
34
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
35
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
36
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
37
|
+
:param retries: Override the default retry configuration for this method
|
38
|
+
:param server_url: Override the default server URL for this method
|
39
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
40
|
+
:param http_headers: Additional headers to set or replace on requests.
|
41
|
+
"""
|
42
|
+
base_url = None
|
43
|
+
url_variables = None
|
44
|
+
if timeout_ms is None:
|
45
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
46
|
+
|
47
|
+
if server_url is not None:
|
48
|
+
base_url = server_url
|
49
|
+
else:
|
50
|
+
base_url = self._get_url(base_url, url_variables)
|
51
|
+
|
52
|
+
request = models.GetAllCasebasesReleasesRequest(
|
53
|
+
accept_language=accept_language,
|
54
|
+
portal_id=portal_id,
|
55
|
+
language=language,
|
56
|
+
pagenum=pagenum,
|
57
|
+
pagesize=pagesize,
|
58
|
+
)
|
59
|
+
|
60
|
+
req = self._build_request(
|
61
|
+
method="GET",
|
62
|
+
path="/portals/{portalID}/gh/casebasereleases",
|
63
|
+
base_url=base_url,
|
64
|
+
url_variables=url_variables,
|
65
|
+
request=request,
|
66
|
+
request_body_required=False,
|
67
|
+
request_has_path_params=True,
|
68
|
+
request_has_query_params=True,
|
69
|
+
user_agent_header="user-agent",
|
70
|
+
accept_header_value="application/json",
|
71
|
+
http_headers=http_headers,
|
72
|
+
security=self.sdk_configuration.security,
|
73
|
+
timeout_ms=timeout_ms,
|
74
|
+
)
|
75
|
+
|
76
|
+
if retries == UNSET:
|
77
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
78
|
+
retries = self.sdk_configuration.retry_config
|
79
|
+
|
80
|
+
retry_config = None
|
81
|
+
if isinstance(retries, utils.RetryConfig):
|
82
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
83
|
+
|
84
|
+
http_res = self.do_request(
|
85
|
+
hook_ctx=HookContext(
|
86
|
+
config=self.sdk_configuration,
|
87
|
+
base_url=base_url or "",
|
88
|
+
operation_id="getAllCasebasesReleases",
|
89
|
+
oauth2_scopes=[],
|
90
|
+
security_source=get_security_from_env(
|
91
|
+
self.sdk_configuration.security, models.Security
|
92
|
+
),
|
93
|
+
),
|
94
|
+
request=req,
|
95
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
96
|
+
retry_config=retry_config,
|
97
|
+
)
|
98
|
+
|
99
|
+
response_data: Any = None
|
100
|
+
if utils.match_response(http_res, "200", "application/json"):
|
101
|
+
return unmarshal_json_response(models.CasebaseResult, http_res)
|
102
|
+
if utils.match_response(http_res, "204", "*"):
|
103
|
+
return None
|
104
|
+
if utils.match_response(
|
105
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
106
|
+
):
|
107
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
108
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
109
|
+
if utils.match_response(http_res, "500", "application/json"):
|
110
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
111
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
112
|
+
if utils.match_response(http_res, "4XX", "*"):
|
113
|
+
http_res_text = utils.stream_to_text(http_res)
|
114
|
+
raise errors.EgainDefaultError(
|
115
|
+
"API error occurred", http_res, http_res_text
|
116
|
+
)
|
117
|
+
if utils.match_response(http_res, "5XX", "*"):
|
118
|
+
http_res_text = utils.stream_to_text(http_res)
|
119
|
+
raise errors.EgainDefaultError(
|
120
|
+
"API error occurred", http_res, http_res_text
|
121
|
+
)
|
122
|
+
|
123
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
124
|
+
|
125
|
+
async def get_all_casebases_releases_async(
|
126
|
+
self,
|
127
|
+
*,
|
128
|
+
accept_language: models.AcceptLanguage,
|
129
|
+
portal_id: str,
|
130
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
131
|
+
pagenum: Optional[int] = 1,
|
132
|
+
pagesize: Optional[int] = 10,
|
133
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
134
|
+
server_url: Optional[str] = None,
|
135
|
+
timeout_ms: Optional[int] = None,
|
136
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
137
|
+
) -> Optional[models.CasebaseResult]:
|
138
|
+
r"""Get Available Casebases Releases
|
139
|
+
|
140
|
+
## Overview
|
141
|
+
The Get Available Casebases Releases API retrieves all Casebase Releases associated with a portal.
|
142
|
+
|
143
|
+
|
144
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
145
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
146
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
147
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
148
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
149
|
+
:param retries: Override the default retry configuration for this method
|
150
|
+
:param server_url: Override the default server URL for this method
|
151
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
152
|
+
:param http_headers: Additional headers to set or replace on requests.
|
153
|
+
"""
|
154
|
+
base_url = None
|
155
|
+
url_variables = None
|
156
|
+
if timeout_ms is None:
|
157
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
158
|
+
|
159
|
+
if server_url is not None:
|
160
|
+
base_url = server_url
|
161
|
+
else:
|
162
|
+
base_url = self._get_url(base_url, url_variables)
|
163
|
+
|
164
|
+
request = models.GetAllCasebasesReleasesRequest(
|
165
|
+
accept_language=accept_language,
|
166
|
+
portal_id=portal_id,
|
167
|
+
language=language,
|
168
|
+
pagenum=pagenum,
|
169
|
+
pagesize=pagesize,
|
170
|
+
)
|
171
|
+
|
172
|
+
req = self._build_request_async(
|
173
|
+
method="GET",
|
174
|
+
path="/portals/{portalID}/gh/casebasereleases",
|
175
|
+
base_url=base_url,
|
176
|
+
url_variables=url_variables,
|
177
|
+
request=request,
|
178
|
+
request_body_required=False,
|
179
|
+
request_has_path_params=True,
|
180
|
+
request_has_query_params=True,
|
181
|
+
user_agent_header="user-agent",
|
182
|
+
accept_header_value="application/json",
|
183
|
+
http_headers=http_headers,
|
184
|
+
security=self.sdk_configuration.security,
|
185
|
+
timeout_ms=timeout_ms,
|
186
|
+
)
|
187
|
+
|
188
|
+
if retries == UNSET:
|
189
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
190
|
+
retries = self.sdk_configuration.retry_config
|
191
|
+
|
192
|
+
retry_config = None
|
193
|
+
if isinstance(retries, utils.RetryConfig):
|
194
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
195
|
+
|
196
|
+
http_res = await self.do_request_async(
|
197
|
+
hook_ctx=HookContext(
|
198
|
+
config=self.sdk_configuration,
|
199
|
+
base_url=base_url or "",
|
200
|
+
operation_id="getAllCasebasesReleases",
|
201
|
+
oauth2_scopes=[],
|
202
|
+
security_source=get_security_from_env(
|
203
|
+
self.sdk_configuration.security, models.Security
|
204
|
+
),
|
205
|
+
),
|
206
|
+
request=req,
|
207
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
208
|
+
retry_config=retry_config,
|
209
|
+
)
|
210
|
+
|
211
|
+
response_data: Any = None
|
212
|
+
if utils.match_response(http_res, "200", "application/json"):
|
213
|
+
return unmarshal_json_response(models.CasebaseResult, http_res)
|
214
|
+
if utils.match_response(http_res, "204", "*"):
|
215
|
+
return None
|
216
|
+
if utils.match_response(
|
217
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
218
|
+
):
|
219
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
220
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
221
|
+
if utils.match_response(http_res, "500", "application/json"):
|
222
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
223
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
224
|
+
if utils.match_response(http_res, "4XX", "*"):
|
225
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
226
|
+
raise errors.EgainDefaultError(
|
227
|
+
"API error occurred", http_res, http_res_text
|
228
|
+
)
|
229
|
+
if utils.match_response(http_res, "5XX", "*"):
|
230
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
231
|
+
raise errors.EgainDefaultError(
|
232
|
+
"API error occurred", http_res, http_res_text
|
233
|
+
)
|
234
|
+
|
235
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
236
|
+
|
237
|
+
def get_casebase_release_by_id(
|
238
|
+
self,
|
239
|
+
*,
|
240
|
+
accept_language: models.AcceptLanguage,
|
241
|
+
portal_id: str,
|
242
|
+
casebase_release_id: str,
|
243
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
244
|
+
languages: Optional[bool] = True,
|
245
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
246
|
+
server_url: Optional[str] = None,
|
247
|
+
timeout_ms: Optional[int] = None,
|
248
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
249
|
+
) -> Optional[models.CasebaseResult]:
|
250
|
+
r"""Get Details of a Casebase Release
|
251
|
+
|
252
|
+
## Overview
|
253
|
+
The Get Details of a Casebase Release API retrieves details of Casebase Release.
|
254
|
+
|
255
|
+
|
256
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
257
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
258
|
+
:param casebase_release_id: The numerical ID of the Casebase Release for which details is to be fetched.
|
259
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
260
|
+
:param languages: Display langages of Casebase Releases.
|
261
|
+
:param retries: Override the default retry configuration for this method
|
262
|
+
:param server_url: Override the default server URL for this method
|
263
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
264
|
+
:param http_headers: Additional headers to set or replace on requests.
|
265
|
+
"""
|
266
|
+
base_url = None
|
267
|
+
url_variables = None
|
268
|
+
if timeout_ms is None:
|
269
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
270
|
+
|
271
|
+
if server_url is not None:
|
272
|
+
base_url = server_url
|
273
|
+
else:
|
274
|
+
base_url = self._get_url(base_url, url_variables)
|
275
|
+
|
276
|
+
request = models.GetCasebaseReleaseByIDRequest(
|
277
|
+
accept_language=accept_language,
|
278
|
+
portal_id=portal_id,
|
279
|
+
casebase_release_id=casebase_release_id,
|
280
|
+
language=language,
|
281
|
+
languages=languages,
|
282
|
+
)
|
283
|
+
|
284
|
+
req = self._build_request(
|
285
|
+
method="GET",
|
286
|
+
path="/portals/{portalID}/gh/casebasereleases/{casebaseReleaseID}",
|
287
|
+
base_url=base_url,
|
288
|
+
url_variables=url_variables,
|
289
|
+
request=request,
|
290
|
+
request_body_required=False,
|
291
|
+
request_has_path_params=True,
|
292
|
+
request_has_query_params=True,
|
293
|
+
user_agent_header="user-agent",
|
294
|
+
accept_header_value="application/json",
|
295
|
+
http_headers=http_headers,
|
296
|
+
security=self.sdk_configuration.security,
|
297
|
+
timeout_ms=timeout_ms,
|
298
|
+
)
|
299
|
+
|
300
|
+
if retries == UNSET:
|
301
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
302
|
+
retries = self.sdk_configuration.retry_config
|
303
|
+
|
304
|
+
retry_config = None
|
305
|
+
if isinstance(retries, utils.RetryConfig):
|
306
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
307
|
+
|
308
|
+
http_res = self.do_request(
|
309
|
+
hook_ctx=HookContext(
|
310
|
+
config=self.sdk_configuration,
|
311
|
+
base_url=base_url or "",
|
312
|
+
operation_id="getCasebaseReleaseById",
|
313
|
+
oauth2_scopes=[],
|
314
|
+
security_source=get_security_from_env(
|
315
|
+
self.sdk_configuration.security, models.Security
|
316
|
+
),
|
317
|
+
),
|
318
|
+
request=req,
|
319
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
320
|
+
retry_config=retry_config,
|
321
|
+
)
|
322
|
+
|
323
|
+
response_data: Any = None
|
324
|
+
if utils.match_response(http_res, "200", "application/json"):
|
325
|
+
return unmarshal_json_response(models.CasebaseResult, http_res)
|
326
|
+
if utils.match_response(http_res, "204", "*"):
|
327
|
+
return None
|
328
|
+
if utils.match_response(
|
329
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
330
|
+
):
|
331
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
332
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
333
|
+
if utils.match_response(http_res, "500", "application/json"):
|
334
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
335
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
336
|
+
if utils.match_response(http_res, "4XX", "*"):
|
337
|
+
http_res_text = utils.stream_to_text(http_res)
|
338
|
+
raise errors.EgainDefaultError(
|
339
|
+
"API error occurred", http_res, http_res_text
|
340
|
+
)
|
341
|
+
if utils.match_response(http_res, "5XX", "*"):
|
342
|
+
http_res_text = utils.stream_to_text(http_res)
|
343
|
+
raise errors.EgainDefaultError(
|
344
|
+
"API error occurred", http_res, http_res_text
|
345
|
+
)
|
346
|
+
|
347
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
348
|
+
|
349
|
+
async def get_casebase_release_by_id_async(
|
350
|
+
self,
|
351
|
+
*,
|
352
|
+
accept_language: models.AcceptLanguage,
|
353
|
+
portal_id: str,
|
354
|
+
casebase_release_id: str,
|
355
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
356
|
+
languages: Optional[bool] = True,
|
357
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
358
|
+
server_url: Optional[str] = None,
|
359
|
+
timeout_ms: Optional[int] = None,
|
360
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
361
|
+
) -> Optional[models.CasebaseResult]:
|
362
|
+
r"""Get Details of a Casebase Release
|
363
|
+
|
364
|
+
## Overview
|
365
|
+
The Get Details of a Casebase Release API retrieves details of Casebase Release.
|
366
|
+
|
367
|
+
|
368
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
369
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
370
|
+
:param casebase_release_id: The numerical ID of the Casebase Release for which details is to be fetched.
|
371
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
372
|
+
:param languages: Display langages of Casebase Releases.
|
373
|
+
:param retries: Override the default retry configuration for this method
|
374
|
+
:param server_url: Override the default server URL for this method
|
375
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
376
|
+
:param http_headers: Additional headers to set or replace on requests.
|
377
|
+
"""
|
378
|
+
base_url = None
|
379
|
+
url_variables = None
|
380
|
+
if timeout_ms is None:
|
381
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
382
|
+
|
383
|
+
if server_url is not None:
|
384
|
+
base_url = server_url
|
385
|
+
else:
|
386
|
+
base_url = self._get_url(base_url, url_variables)
|
387
|
+
|
388
|
+
request = models.GetCasebaseReleaseByIDRequest(
|
389
|
+
accept_language=accept_language,
|
390
|
+
portal_id=portal_id,
|
391
|
+
casebase_release_id=casebase_release_id,
|
392
|
+
language=language,
|
393
|
+
languages=languages,
|
394
|
+
)
|
395
|
+
|
396
|
+
req = self._build_request_async(
|
397
|
+
method="GET",
|
398
|
+
path="/portals/{portalID}/gh/casebasereleases/{casebaseReleaseID}",
|
399
|
+
base_url=base_url,
|
400
|
+
url_variables=url_variables,
|
401
|
+
request=request,
|
402
|
+
request_body_required=False,
|
403
|
+
request_has_path_params=True,
|
404
|
+
request_has_query_params=True,
|
405
|
+
user_agent_header="user-agent",
|
406
|
+
accept_header_value="application/json",
|
407
|
+
http_headers=http_headers,
|
408
|
+
security=self.sdk_configuration.security,
|
409
|
+
timeout_ms=timeout_ms,
|
410
|
+
)
|
411
|
+
|
412
|
+
if retries == UNSET:
|
413
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
414
|
+
retries = self.sdk_configuration.retry_config
|
415
|
+
|
416
|
+
retry_config = None
|
417
|
+
if isinstance(retries, utils.RetryConfig):
|
418
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
419
|
+
|
420
|
+
http_res = await self.do_request_async(
|
421
|
+
hook_ctx=HookContext(
|
422
|
+
config=self.sdk_configuration,
|
423
|
+
base_url=base_url or "",
|
424
|
+
operation_id="getCasebaseReleaseById",
|
425
|
+
oauth2_scopes=[],
|
426
|
+
security_source=get_security_from_env(
|
427
|
+
self.sdk_configuration.security, models.Security
|
428
|
+
),
|
429
|
+
),
|
430
|
+
request=req,
|
431
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
432
|
+
retry_config=retry_config,
|
433
|
+
)
|
434
|
+
|
435
|
+
response_data: Any = None
|
436
|
+
if utils.match_response(http_res, "200", "application/json"):
|
437
|
+
return unmarshal_json_response(models.CasebaseResult, http_res)
|
438
|
+
if utils.match_response(http_res, "204", "*"):
|
439
|
+
return None
|
440
|
+
if utils.match_response(
|
441
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
442
|
+
):
|
443
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
444
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
445
|
+
if utils.match_response(http_res, "500", "application/json"):
|
446
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
447
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
448
|
+
if utils.match_response(http_res, "4XX", "*"):
|
449
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
450
|
+
raise errors.EgainDefaultError(
|
451
|
+
"API error occurred", http_res, http_res_text
|
452
|
+
)
|
453
|
+
if utils.match_response(http_res, "5XX", "*"):
|
454
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
455
|
+
raise errors.EgainDefaultError(
|
456
|
+
"API error occurred", http_res, http_res_text
|
457
|
+
)
|
458
|
+
|
459
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
460
|
+
|
461
|
+
def get_cluster_by_casebase_release_id(
|
462
|
+
self,
|
463
|
+
*,
|
464
|
+
accept_language: models.AcceptLanguage,
|
465
|
+
portal_id: str,
|
466
|
+
casebase_release_id: str,
|
467
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
468
|
+
pagenum: Optional[int] = 1,
|
469
|
+
pagesize: Optional[int] = 10,
|
470
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
471
|
+
server_url: Optional[str] = None,
|
472
|
+
timeout_ms: Optional[int] = None,
|
473
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
474
|
+
) -> Optional[models.ClusterResults]:
|
475
|
+
r"""Get Cluster Details of a Casebase Release
|
476
|
+
|
477
|
+
## Overview
|
478
|
+
The Get Cluster Details of a Casebase Release API retrieves cluster details of Casebase Release.
|
479
|
+
|
480
|
+
|
481
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
482
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
483
|
+
:param casebase_release_id: The numerical ID of the Casebase Release for which details is to be fetched.
|
484
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
485
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
486
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
487
|
+
:param retries: Override the default retry configuration for this method
|
488
|
+
:param server_url: Override the default server URL for this method
|
489
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
490
|
+
:param http_headers: Additional headers to set or replace on requests.
|
491
|
+
"""
|
492
|
+
base_url = None
|
493
|
+
url_variables = None
|
494
|
+
if timeout_ms is None:
|
495
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
496
|
+
|
497
|
+
if server_url is not None:
|
498
|
+
base_url = server_url
|
499
|
+
else:
|
500
|
+
base_url = self._get_url(base_url, url_variables)
|
501
|
+
|
502
|
+
request = models.GetClusterByCasebaseReleaseIDRequest(
|
503
|
+
accept_language=accept_language,
|
504
|
+
portal_id=portal_id,
|
505
|
+
casebase_release_id=casebase_release_id,
|
506
|
+
language=language,
|
507
|
+
pagenum=pagenum,
|
508
|
+
pagesize=pagesize,
|
509
|
+
)
|
510
|
+
|
511
|
+
req = self._build_request(
|
512
|
+
method="GET",
|
513
|
+
path="/portals/{portalID}/gh/casebasereleases/{casebaseReleaseID}/clusters",
|
514
|
+
base_url=base_url,
|
515
|
+
url_variables=url_variables,
|
516
|
+
request=request,
|
517
|
+
request_body_required=False,
|
518
|
+
request_has_path_params=True,
|
519
|
+
request_has_query_params=True,
|
520
|
+
user_agent_header="user-agent",
|
521
|
+
accept_header_value="application/json",
|
522
|
+
http_headers=http_headers,
|
523
|
+
security=self.sdk_configuration.security,
|
524
|
+
timeout_ms=timeout_ms,
|
525
|
+
)
|
526
|
+
|
527
|
+
if retries == UNSET:
|
528
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
529
|
+
retries = self.sdk_configuration.retry_config
|
530
|
+
|
531
|
+
retry_config = None
|
532
|
+
if isinstance(retries, utils.RetryConfig):
|
533
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
534
|
+
|
535
|
+
http_res = self.do_request(
|
536
|
+
hook_ctx=HookContext(
|
537
|
+
config=self.sdk_configuration,
|
538
|
+
base_url=base_url or "",
|
539
|
+
operation_id="getClusterByCasebaseReleaseId",
|
540
|
+
oauth2_scopes=[],
|
541
|
+
security_source=get_security_from_env(
|
542
|
+
self.sdk_configuration.security, models.Security
|
543
|
+
),
|
544
|
+
),
|
545
|
+
request=req,
|
546
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
547
|
+
retry_config=retry_config,
|
548
|
+
)
|
549
|
+
|
550
|
+
response_data: Any = None
|
551
|
+
if utils.match_response(http_res, "200", "application/json"):
|
552
|
+
return unmarshal_json_response(models.ClusterResults, http_res)
|
553
|
+
if utils.match_response(http_res, "204", "*"):
|
554
|
+
return None
|
555
|
+
if utils.match_response(
|
556
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
557
|
+
):
|
558
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
559
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
560
|
+
if utils.match_response(http_res, "500", "application/json"):
|
561
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
562
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
563
|
+
if utils.match_response(http_res, "4XX", "*"):
|
564
|
+
http_res_text = utils.stream_to_text(http_res)
|
565
|
+
raise errors.EgainDefaultError(
|
566
|
+
"API error occurred", http_res, http_res_text
|
567
|
+
)
|
568
|
+
if utils.match_response(http_res, "5XX", "*"):
|
569
|
+
http_res_text = utils.stream_to_text(http_res)
|
570
|
+
raise errors.EgainDefaultError(
|
571
|
+
"API error occurred", http_res, http_res_text
|
572
|
+
)
|
573
|
+
|
574
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
575
|
+
|
576
|
+
async def get_cluster_by_casebase_release_id_async(
|
577
|
+
self,
|
578
|
+
*,
|
579
|
+
accept_language: models.AcceptLanguage,
|
580
|
+
portal_id: str,
|
581
|
+
casebase_release_id: str,
|
582
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
583
|
+
pagenum: Optional[int] = 1,
|
584
|
+
pagesize: Optional[int] = 10,
|
585
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
586
|
+
server_url: Optional[str] = None,
|
587
|
+
timeout_ms: Optional[int] = None,
|
588
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
589
|
+
) -> Optional[models.ClusterResults]:
|
590
|
+
r"""Get Cluster Details of a Casebase Release
|
591
|
+
|
592
|
+
## Overview
|
593
|
+
The Get Cluster Details of a Casebase Release API retrieves cluster details of Casebase Release.
|
594
|
+
|
595
|
+
|
596
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
597
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
598
|
+
:param casebase_release_id: The numerical ID of the Casebase Release for which details is to be fetched.
|
599
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
600
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
601
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
602
|
+
:param retries: Override the default retry configuration for this method
|
603
|
+
:param server_url: Override the default server URL for this method
|
604
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
605
|
+
:param http_headers: Additional headers to set or replace on requests.
|
606
|
+
"""
|
607
|
+
base_url = None
|
608
|
+
url_variables = None
|
609
|
+
if timeout_ms is None:
|
610
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
611
|
+
|
612
|
+
if server_url is not None:
|
613
|
+
base_url = server_url
|
614
|
+
else:
|
615
|
+
base_url = self._get_url(base_url, url_variables)
|
616
|
+
|
617
|
+
request = models.GetClusterByCasebaseReleaseIDRequest(
|
618
|
+
accept_language=accept_language,
|
619
|
+
portal_id=portal_id,
|
620
|
+
casebase_release_id=casebase_release_id,
|
621
|
+
language=language,
|
622
|
+
pagenum=pagenum,
|
623
|
+
pagesize=pagesize,
|
624
|
+
)
|
625
|
+
|
626
|
+
req = self._build_request_async(
|
627
|
+
method="GET",
|
628
|
+
path="/portals/{portalID}/gh/casebasereleases/{casebaseReleaseID}/clusters",
|
629
|
+
base_url=base_url,
|
630
|
+
url_variables=url_variables,
|
631
|
+
request=request,
|
632
|
+
request_body_required=False,
|
633
|
+
request_has_path_params=True,
|
634
|
+
request_has_query_params=True,
|
635
|
+
user_agent_header="user-agent",
|
636
|
+
accept_header_value="application/json",
|
637
|
+
http_headers=http_headers,
|
638
|
+
security=self.sdk_configuration.security,
|
639
|
+
timeout_ms=timeout_ms,
|
640
|
+
)
|
641
|
+
|
642
|
+
if retries == UNSET:
|
643
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
644
|
+
retries = self.sdk_configuration.retry_config
|
645
|
+
|
646
|
+
retry_config = None
|
647
|
+
if isinstance(retries, utils.RetryConfig):
|
648
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
649
|
+
|
650
|
+
http_res = await self.do_request_async(
|
651
|
+
hook_ctx=HookContext(
|
652
|
+
config=self.sdk_configuration,
|
653
|
+
base_url=base_url or "",
|
654
|
+
operation_id="getClusterByCasebaseReleaseId",
|
655
|
+
oauth2_scopes=[],
|
656
|
+
security_source=get_security_from_env(
|
657
|
+
self.sdk_configuration.security, models.Security
|
658
|
+
),
|
659
|
+
),
|
660
|
+
request=req,
|
661
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
662
|
+
retry_config=retry_config,
|
663
|
+
)
|
664
|
+
|
665
|
+
response_data: Any = None
|
666
|
+
if utils.match_response(http_res, "200", "application/json"):
|
667
|
+
return unmarshal_json_response(models.ClusterResults, http_res)
|
668
|
+
if utils.match_response(http_res, "204", "*"):
|
669
|
+
return None
|
670
|
+
if utils.match_response(
|
671
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
672
|
+
):
|
673
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
674
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
675
|
+
if utils.match_response(http_res, "500", "application/json"):
|
676
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
677
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
678
|
+
if utils.match_response(http_res, "4XX", "*"):
|
679
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
680
|
+
raise errors.EgainDefaultError(
|
681
|
+
"API error occurred", http_res, http_res_text
|
682
|
+
)
|
683
|
+
if utils.match_response(http_res, "5XX", "*"):
|
684
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
685
|
+
raise errors.EgainDefaultError(
|
686
|
+
"API error occurred", http_res, http_res_text
|
687
|
+
)
|
688
|
+
|
689
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
690
|
+
|
691
|
+
def get_all_profiles_in_portal(
|
692
|
+
self,
|
693
|
+
*,
|
694
|
+
accept_language: models.AcceptLanguage,
|
695
|
+
portal_id: str,
|
696
|
+
filter_casebase_release: Optional[str] = None,
|
697
|
+
pagenum: Optional[int] = 1,
|
698
|
+
pagesize: Optional[int] = 10,
|
699
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
700
|
+
server_url: Optional[str] = None,
|
701
|
+
timeout_ms: Optional[int] = None,
|
702
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
703
|
+
) -> Optional[models.ProfileResult]:
|
704
|
+
r"""Get All Profiles Available in Portal
|
705
|
+
|
706
|
+
## Overview
|
707
|
+
The Get All Profiles Available in Portal API retrieves all Guided Help profiles associated with a portal.
|
708
|
+
|
709
|
+
|
710
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
711
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
712
|
+
:param filter_casebase_release: Filter by Casebase Release
|
713
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
714
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
715
|
+
:param retries: Override the default retry configuration for this method
|
716
|
+
:param server_url: Override the default server URL for this method
|
717
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
718
|
+
:param http_headers: Additional headers to set or replace on requests.
|
719
|
+
"""
|
720
|
+
base_url = None
|
721
|
+
url_variables = None
|
722
|
+
if timeout_ms is None:
|
723
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
724
|
+
|
725
|
+
if server_url is not None:
|
726
|
+
base_url = server_url
|
727
|
+
else:
|
728
|
+
base_url = self._get_url(base_url, url_variables)
|
729
|
+
|
730
|
+
request = models.GetAllProfilesInPortalRequest(
|
731
|
+
accept_language=accept_language,
|
732
|
+
portal_id=portal_id,
|
733
|
+
filter_casebase_release=filter_casebase_release,
|
734
|
+
pagenum=pagenum,
|
735
|
+
pagesize=pagesize,
|
736
|
+
)
|
737
|
+
|
738
|
+
req = self._build_request(
|
739
|
+
method="GET",
|
740
|
+
path="/portals/{portalID}/gh/profiles",
|
741
|
+
base_url=base_url,
|
742
|
+
url_variables=url_variables,
|
743
|
+
request=request,
|
744
|
+
request_body_required=False,
|
745
|
+
request_has_path_params=True,
|
746
|
+
request_has_query_params=True,
|
747
|
+
user_agent_header="user-agent",
|
748
|
+
accept_header_value="application/json",
|
749
|
+
http_headers=http_headers,
|
750
|
+
security=self.sdk_configuration.security,
|
751
|
+
timeout_ms=timeout_ms,
|
752
|
+
)
|
753
|
+
|
754
|
+
if retries == UNSET:
|
755
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
756
|
+
retries = self.sdk_configuration.retry_config
|
757
|
+
|
758
|
+
retry_config = None
|
759
|
+
if isinstance(retries, utils.RetryConfig):
|
760
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
761
|
+
|
762
|
+
http_res = self.do_request(
|
763
|
+
hook_ctx=HookContext(
|
764
|
+
config=self.sdk_configuration,
|
765
|
+
base_url=base_url or "",
|
766
|
+
operation_id="getAllProfilesInPortal",
|
767
|
+
oauth2_scopes=[],
|
768
|
+
security_source=get_security_from_env(
|
769
|
+
self.sdk_configuration.security, models.Security
|
770
|
+
),
|
771
|
+
),
|
772
|
+
request=req,
|
773
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
774
|
+
retry_config=retry_config,
|
775
|
+
)
|
776
|
+
|
777
|
+
response_data: Any = None
|
778
|
+
if utils.match_response(http_res, "200", "application/json"):
|
779
|
+
return unmarshal_json_response(models.ProfileResult, http_res)
|
780
|
+
if utils.match_response(http_res, "204", "*"):
|
781
|
+
return None
|
782
|
+
if utils.match_response(
|
783
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
784
|
+
):
|
785
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
786
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
787
|
+
if utils.match_response(http_res, "500", "application/json"):
|
788
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
789
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
790
|
+
if utils.match_response(http_res, "4XX", "*"):
|
791
|
+
http_res_text = utils.stream_to_text(http_res)
|
792
|
+
raise errors.EgainDefaultError(
|
793
|
+
"API error occurred", http_res, http_res_text
|
794
|
+
)
|
795
|
+
if utils.match_response(http_res, "5XX", "*"):
|
796
|
+
http_res_text = utils.stream_to_text(http_res)
|
797
|
+
raise errors.EgainDefaultError(
|
798
|
+
"API error occurred", http_res, http_res_text
|
799
|
+
)
|
800
|
+
|
801
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
802
|
+
|
803
|
+
async def get_all_profiles_in_portal_async(
|
804
|
+
self,
|
805
|
+
*,
|
806
|
+
accept_language: models.AcceptLanguage,
|
807
|
+
portal_id: str,
|
808
|
+
filter_casebase_release: Optional[str] = None,
|
809
|
+
pagenum: Optional[int] = 1,
|
810
|
+
pagesize: Optional[int] = 10,
|
811
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
812
|
+
server_url: Optional[str] = None,
|
813
|
+
timeout_ms: Optional[int] = None,
|
814
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
815
|
+
) -> Optional[models.ProfileResult]:
|
816
|
+
r"""Get All Profiles Available in Portal
|
817
|
+
|
818
|
+
## Overview
|
819
|
+
The Get All Profiles Available in Portal API retrieves all Guided Help profiles associated with a portal.
|
820
|
+
|
821
|
+
|
822
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
823
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
824
|
+
:param filter_casebase_release: Filter by Casebase Release
|
825
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
826
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
827
|
+
:param retries: Override the default retry configuration for this method
|
828
|
+
:param server_url: Override the default server URL for this method
|
829
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
830
|
+
:param http_headers: Additional headers to set or replace on requests.
|
831
|
+
"""
|
832
|
+
base_url = None
|
833
|
+
url_variables = None
|
834
|
+
if timeout_ms is None:
|
835
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
836
|
+
|
837
|
+
if server_url is not None:
|
838
|
+
base_url = server_url
|
839
|
+
else:
|
840
|
+
base_url = self._get_url(base_url, url_variables)
|
841
|
+
|
842
|
+
request = models.GetAllProfilesInPortalRequest(
|
843
|
+
accept_language=accept_language,
|
844
|
+
portal_id=portal_id,
|
845
|
+
filter_casebase_release=filter_casebase_release,
|
846
|
+
pagenum=pagenum,
|
847
|
+
pagesize=pagesize,
|
848
|
+
)
|
849
|
+
|
850
|
+
req = self._build_request_async(
|
851
|
+
method="GET",
|
852
|
+
path="/portals/{portalID}/gh/profiles",
|
853
|
+
base_url=base_url,
|
854
|
+
url_variables=url_variables,
|
855
|
+
request=request,
|
856
|
+
request_body_required=False,
|
857
|
+
request_has_path_params=True,
|
858
|
+
request_has_query_params=True,
|
859
|
+
user_agent_header="user-agent",
|
860
|
+
accept_header_value="application/json",
|
861
|
+
http_headers=http_headers,
|
862
|
+
security=self.sdk_configuration.security,
|
863
|
+
timeout_ms=timeout_ms,
|
864
|
+
)
|
865
|
+
|
866
|
+
if retries == UNSET:
|
867
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
868
|
+
retries = self.sdk_configuration.retry_config
|
869
|
+
|
870
|
+
retry_config = None
|
871
|
+
if isinstance(retries, utils.RetryConfig):
|
872
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
873
|
+
|
874
|
+
http_res = await self.do_request_async(
|
875
|
+
hook_ctx=HookContext(
|
876
|
+
config=self.sdk_configuration,
|
877
|
+
base_url=base_url or "",
|
878
|
+
operation_id="getAllProfilesInPortal",
|
879
|
+
oauth2_scopes=[],
|
880
|
+
security_source=get_security_from_env(
|
881
|
+
self.sdk_configuration.security, models.Security
|
882
|
+
),
|
883
|
+
),
|
884
|
+
request=req,
|
885
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
886
|
+
retry_config=retry_config,
|
887
|
+
)
|
888
|
+
|
889
|
+
response_data: Any = None
|
890
|
+
if utils.match_response(http_res, "200", "application/json"):
|
891
|
+
return unmarshal_json_response(models.ProfileResult, http_res)
|
892
|
+
if utils.match_response(http_res, "204", "*"):
|
893
|
+
return None
|
894
|
+
if utils.match_response(
|
895
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
896
|
+
):
|
897
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
898
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
899
|
+
if utils.match_response(http_res, "500", "application/json"):
|
900
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
901
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
902
|
+
if utils.match_response(http_res, "4XX", "*"):
|
903
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
904
|
+
raise errors.EgainDefaultError(
|
905
|
+
"API error occurred", http_res, http_res_text
|
906
|
+
)
|
907
|
+
if utils.match_response(http_res, "5XX", "*"):
|
908
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
909
|
+
raise errors.EgainDefaultError(
|
910
|
+
"API error occurred", http_res, http_res_text
|
911
|
+
)
|
912
|
+
|
913
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
914
|
+
|
915
|
+
def start_gh_search(
|
916
|
+
self,
|
917
|
+
*,
|
918
|
+
accept_language: models.AcceptLanguage,
|
919
|
+
portal_id: str,
|
920
|
+
casebase_id: str,
|
921
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
922
|
+
gh_custom_additional_attributes: Optional[str] = None,
|
923
|
+
questions: Optional[
|
924
|
+
Union[
|
925
|
+
List[models.StartQuestionAndAnswer],
|
926
|
+
List[models.StartQuestionAndAnswerTypedDict],
|
927
|
+
]
|
928
|
+
] = None,
|
929
|
+
profile_id: Optional[str] = None,
|
930
|
+
session_variable: Optional[
|
931
|
+
Union[
|
932
|
+
List[models.SessionContextVariable],
|
933
|
+
List[models.SessionContextVariableTypedDict],
|
934
|
+
]
|
935
|
+
] = None,
|
936
|
+
start_over: Optional[bool] = None,
|
937
|
+
use_live_release: Optional[bool] = None,
|
938
|
+
ghs_article_id: Optional[str] = None,
|
939
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
940
|
+
server_url: Optional[str] = None,
|
941
|
+
timeout_ms: Optional[int] = None,
|
942
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
943
|
+
) -> models.StartGHSearchResponse:
|
944
|
+
r"""Start a Guided Help Search
|
945
|
+
|
946
|
+
## Overview
|
947
|
+
The Start a Guided Help search can be used to start a search session in the Guided Help.
|
948
|
+
|
949
|
+
A Guided Help profile can also be specified while starting the session and it is used to filter the results of search.
|
950
|
+
If this is not passed in the request, the default profile of the portal is used. Questions can also be answered at time of starting the search session.
|
951
|
+
|
952
|
+
A Guided Help search session can be started in following ways:
|
953
|
+
* Launch session for a specific Casebase Release.
|
954
|
+
* Launch session for a Casebase and specify the release type.
|
955
|
+
* Use a Guided Help session Article and pass the required session parameters.
|
956
|
+
|
957
|
+
## Prerequisites
|
958
|
+
* A Guided Help profile must be assigned to the user.
|
959
|
+
* Casebase Release passed in the request must be associated with the portal passed in URI.
|
960
|
+
|
961
|
+
|
962
|
+
|
963
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
964
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
965
|
+
:param casebase_id: The numerical ID of the Casebase.
|
966
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
967
|
+
:param gh_custom_additional_attributes:
|
968
|
+
:param questions: Pre-answered Questions in Guided Help search
|
969
|
+
:param profile_id: The ID of the guided help profile.<br> 1 will always be the **system profile**.
|
970
|
+
:param session_variable: Session variables used to give Guided Help additional context.
|
971
|
+
:param start_over: Restart the current Guided Help search with the existing context along with session variable context.
|
972
|
+
:param use_live_release: Use current live release snapshot of the Casebase otherwise use the authoring release.
|
973
|
+
:param ghs_article_id: Numeric ID of the guided help session article used for starting search.
|
974
|
+
:param retries: Override the default retry configuration for this method
|
975
|
+
:param server_url: Override the default server URL for this method
|
976
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
977
|
+
:param http_headers: Additional headers to set or replace on requests.
|
978
|
+
"""
|
979
|
+
base_url = None
|
980
|
+
url_variables = None
|
981
|
+
if timeout_ms is None:
|
982
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
983
|
+
|
984
|
+
if server_url is not None:
|
985
|
+
base_url = server_url
|
986
|
+
else:
|
987
|
+
base_url = self._get_url(base_url, url_variables)
|
988
|
+
|
989
|
+
request = models.StartGHSearchRequest(
|
990
|
+
accept_language=accept_language,
|
991
|
+
portal_id=portal_id,
|
992
|
+
language=language,
|
993
|
+
gh_custom_additional_attributes=gh_custom_additional_attributes,
|
994
|
+
gh_search_request=models.GHSearchRequest(
|
995
|
+
casebase_id=casebase_id,
|
996
|
+
questions=utils.get_pydantic_model(
|
997
|
+
questions, Optional[List[models.StartQuestionAndAnswer]]
|
998
|
+
),
|
999
|
+
profile_id=profile_id,
|
1000
|
+
session_variable=utils.get_pydantic_model(
|
1001
|
+
session_variable, Optional[List[models.SessionContextVariable]]
|
1002
|
+
),
|
1003
|
+
start_over=start_over,
|
1004
|
+
use_live_release=use_live_release,
|
1005
|
+
ghs_article_id=ghs_article_id,
|
1006
|
+
),
|
1007
|
+
)
|
1008
|
+
|
1009
|
+
req = self._build_request(
|
1010
|
+
method="POST",
|
1011
|
+
path="/portals/{portalID}/gh/search",
|
1012
|
+
base_url=base_url,
|
1013
|
+
url_variables=url_variables,
|
1014
|
+
request=request,
|
1015
|
+
request_body_required=True,
|
1016
|
+
request_has_path_params=True,
|
1017
|
+
request_has_query_params=True,
|
1018
|
+
user_agent_header="user-agent",
|
1019
|
+
accept_header_value="application/json",
|
1020
|
+
http_headers=http_headers,
|
1021
|
+
security=self.sdk_configuration.security,
|
1022
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
1023
|
+
request.gh_search_request, False, False, "json", models.GHSearchRequest
|
1024
|
+
),
|
1025
|
+
timeout_ms=timeout_ms,
|
1026
|
+
)
|
1027
|
+
|
1028
|
+
if retries == UNSET:
|
1029
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
1030
|
+
retries = self.sdk_configuration.retry_config
|
1031
|
+
|
1032
|
+
retry_config = None
|
1033
|
+
if isinstance(retries, utils.RetryConfig):
|
1034
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
1035
|
+
|
1036
|
+
http_res = self.do_request(
|
1037
|
+
hook_ctx=HookContext(
|
1038
|
+
config=self.sdk_configuration,
|
1039
|
+
base_url=base_url or "",
|
1040
|
+
operation_id="startGHSearch",
|
1041
|
+
oauth2_scopes=[],
|
1042
|
+
security_source=get_security_from_env(
|
1043
|
+
self.sdk_configuration.security, models.Security
|
1044
|
+
),
|
1045
|
+
),
|
1046
|
+
request=req,
|
1047
|
+
error_status_codes=[
|
1048
|
+
"400",
|
1049
|
+
"401",
|
1050
|
+
"403",
|
1051
|
+
"404",
|
1052
|
+
"406",
|
1053
|
+
"415",
|
1054
|
+
"429",
|
1055
|
+
"4XX",
|
1056
|
+
"500",
|
1057
|
+
"5XX",
|
1058
|
+
],
|
1059
|
+
retry_config=retry_config,
|
1060
|
+
)
|
1061
|
+
|
1062
|
+
response_data: Any = None
|
1063
|
+
if utils.match_response(http_res, "200", "application/json"):
|
1064
|
+
return models.StartGHSearchResponse(
|
1065
|
+
result=unmarshal_json_response(models.GHSearchResult, http_res),
|
1066
|
+
headers={},
|
1067
|
+
)
|
1068
|
+
if utils.match_response(
|
1069
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
1070
|
+
):
|
1071
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1072
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1073
|
+
if utils.match_response(http_res, "429", "application/json"):
|
1074
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1075
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1076
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1077
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1078
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1079
|
+
if utils.match_response(http_res, ["415", "4XX"], "*"):
|
1080
|
+
http_res_text = utils.stream_to_text(http_res)
|
1081
|
+
raise errors.EgainDefaultError(
|
1082
|
+
"API error occurred", http_res, http_res_text
|
1083
|
+
)
|
1084
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1085
|
+
http_res_text = utils.stream_to_text(http_res)
|
1086
|
+
raise errors.EgainDefaultError(
|
1087
|
+
"API error occurred", http_res, http_res_text
|
1088
|
+
)
|
1089
|
+
|
1090
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
1091
|
+
|
1092
|
+
async def start_gh_search_async(
|
1093
|
+
self,
|
1094
|
+
*,
|
1095
|
+
accept_language: models.AcceptLanguage,
|
1096
|
+
portal_id: str,
|
1097
|
+
casebase_id: str,
|
1098
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
1099
|
+
gh_custom_additional_attributes: Optional[str] = None,
|
1100
|
+
questions: Optional[
|
1101
|
+
Union[
|
1102
|
+
List[models.StartQuestionAndAnswer],
|
1103
|
+
List[models.StartQuestionAndAnswerTypedDict],
|
1104
|
+
]
|
1105
|
+
] = None,
|
1106
|
+
profile_id: Optional[str] = None,
|
1107
|
+
session_variable: Optional[
|
1108
|
+
Union[
|
1109
|
+
List[models.SessionContextVariable],
|
1110
|
+
List[models.SessionContextVariableTypedDict],
|
1111
|
+
]
|
1112
|
+
] = None,
|
1113
|
+
start_over: Optional[bool] = None,
|
1114
|
+
use_live_release: Optional[bool] = None,
|
1115
|
+
ghs_article_id: Optional[str] = None,
|
1116
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
1117
|
+
server_url: Optional[str] = None,
|
1118
|
+
timeout_ms: Optional[int] = None,
|
1119
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
1120
|
+
) -> models.StartGHSearchResponse:
|
1121
|
+
r"""Start a Guided Help Search
|
1122
|
+
|
1123
|
+
## Overview
|
1124
|
+
The Start a Guided Help search can be used to start a search session in the Guided Help.
|
1125
|
+
|
1126
|
+
A Guided Help profile can also be specified while starting the session and it is used to filter the results of search.
|
1127
|
+
If this is not passed in the request, the default profile of the portal is used. Questions can also be answered at time of starting the search session.
|
1128
|
+
|
1129
|
+
A Guided Help search session can be started in following ways:
|
1130
|
+
* Launch session for a specific Casebase Release.
|
1131
|
+
* Launch session for a Casebase and specify the release type.
|
1132
|
+
* Use a Guided Help session Article and pass the required session parameters.
|
1133
|
+
|
1134
|
+
## Prerequisites
|
1135
|
+
* A Guided Help profile must be assigned to the user.
|
1136
|
+
* Casebase Release passed in the request must be associated with the portal passed in URI.
|
1137
|
+
|
1138
|
+
|
1139
|
+
|
1140
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
1141
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
1142
|
+
:param casebase_id: The numerical ID of the Casebase.
|
1143
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
1144
|
+
:param gh_custom_additional_attributes:
|
1145
|
+
:param questions: Pre-answered Questions in Guided Help search
|
1146
|
+
:param profile_id: The ID of the guided help profile.<br> 1 will always be the **system profile**.
|
1147
|
+
:param session_variable: Session variables used to give Guided Help additional context.
|
1148
|
+
:param start_over: Restart the current Guided Help search with the existing context along with session variable context.
|
1149
|
+
:param use_live_release: Use current live release snapshot of the Casebase otherwise use the authoring release.
|
1150
|
+
:param ghs_article_id: Numeric ID of the guided help session article used for starting search.
|
1151
|
+
:param retries: Override the default retry configuration for this method
|
1152
|
+
:param server_url: Override the default server URL for this method
|
1153
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
1154
|
+
:param http_headers: Additional headers to set or replace on requests.
|
1155
|
+
"""
|
1156
|
+
base_url = None
|
1157
|
+
url_variables = None
|
1158
|
+
if timeout_ms is None:
|
1159
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
1160
|
+
|
1161
|
+
if server_url is not None:
|
1162
|
+
base_url = server_url
|
1163
|
+
else:
|
1164
|
+
base_url = self._get_url(base_url, url_variables)
|
1165
|
+
|
1166
|
+
request = models.StartGHSearchRequest(
|
1167
|
+
accept_language=accept_language,
|
1168
|
+
portal_id=portal_id,
|
1169
|
+
language=language,
|
1170
|
+
gh_custom_additional_attributes=gh_custom_additional_attributes,
|
1171
|
+
gh_search_request=models.GHSearchRequest(
|
1172
|
+
casebase_id=casebase_id,
|
1173
|
+
questions=utils.get_pydantic_model(
|
1174
|
+
questions, Optional[List[models.StartQuestionAndAnswer]]
|
1175
|
+
),
|
1176
|
+
profile_id=profile_id,
|
1177
|
+
session_variable=utils.get_pydantic_model(
|
1178
|
+
session_variable, Optional[List[models.SessionContextVariable]]
|
1179
|
+
),
|
1180
|
+
start_over=start_over,
|
1181
|
+
use_live_release=use_live_release,
|
1182
|
+
ghs_article_id=ghs_article_id,
|
1183
|
+
),
|
1184
|
+
)
|
1185
|
+
|
1186
|
+
req = self._build_request_async(
|
1187
|
+
method="POST",
|
1188
|
+
path="/portals/{portalID}/gh/search",
|
1189
|
+
base_url=base_url,
|
1190
|
+
url_variables=url_variables,
|
1191
|
+
request=request,
|
1192
|
+
request_body_required=True,
|
1193
|
+
request_has_path_params=True,
|
1194
|
+
request_has_query_params=True,
|
1195
|
+
user_agent_header="user-agent",
|
1196
|
+
accept_header_value="application/json",
|
1197
|
+
http_headers=http_headers,
|
1198
|
+
security=self.sdk_configuration.security,
|
1199
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
1200
|
+
request.gh_search_request, False, False, "json", models.GHSearchRequest
|
1201
|
+
),
|
1202
|
+
timeout_ms=timeout_ms,
|
1203
|
+
)
|
1204
|
+
|
1205
|
+
if retries == UNSET:
|
1206
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
1207
|
+
retries = self.sdk_configuration.retry_config
|
1208
|
+
|
1209
|
+
retry_config = None
|
1210
|
+
if isinstance(retries, utils.RetryConfig):
|
1211
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
1212
|
+
|
1213
|
+
http_res = await self.do_request_async(
|
1214
|
+
hook_ctx=HookContext(
|
1215
|
+
config=self.sdk_configuration,
|
1216
|
+
base_url=base_url or "",
|
1217
|
+
operation_id="startGHSearch",
|
1218
|
+
oauth2_scopes=[],
|
1219
|
+
security_source=get_security_from_env(
|
1220
|
+
self.sdk_configuration.security, models.Security
|
1221
|
+
),
|
1222
|
+
),
|
1223
|
+
request=req,
|
1224
|
+
error_status_codes=[
|
1225
|
+
"400",
|
1226
|
+
"401",
|
1227
|
+
"403",
|
1228
|
+
"404",
|
1229
|
+
"406",
|
1230
|
+
"415",
|
1231
|
+
"429",
|
1232
|
+
"4XX",
|
1233
|
+
"500",
|
1234
|
+
"5XX",
|
1235
|
+
],
|
1236
|
+
retry_config=retry_config,
|
1237
|
+
)
|
1238
|
+
|
1239
|
+
response_data: Any = None
|
1240
|
+
if utils.match_response(http_res, "200", "application/json"):
|
1241
|
+
return models.StartGHSearchResponse(
|
1242
|
+
result=unmarshal_json_response(models.GHSearchResult, http_res),
|
1243
|
+
headers={},
|
1244
|
+
)
|
1245
|
+
if utils.match_response(
|
1246
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
1247
|
+
):
|
1248
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1249
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1250
|
+
if utils.match_response(http_res, "429", "application/json"):
|
1251
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1252
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1253
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1254
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1255
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1256
|
+
if utils.match_response(http_res, ["415", "4XX"], "*"):
|
1257
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1258
|
+
raise errors.EgainDefaultError(
|
1259
|
+
"API error occurred", http_res, http_res_text
|
1260
|
+
)
|
1261
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1262
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1263
|
+
raise errors.EgainDefaultError(
|
1264
|
+
"API error occurred", http_res, http_res_text
|
1265
|
+
)
|
1266
|
+
|
1267
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
1268
|
+
|
1269
|
+
def step_gh_search(
|
1270
|
+
self,
|
1271
|
+
*,
|
1272
|
+
accept_language: models.AcceptLanguage,
|
1273
|
+
portal_id: str,
|
1274
|
+
casebase_id: str,
|
1275
|
+
questions: Union[
|
1276
|
+
List[models.QuestionAndAnswer], List[models.QuestionAndAnswerTypedDict]
|
1277
|
+
],
|
1278
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
1279
|
+
gh_custom_additional_attributes: Optional[str] = None,
|
1280
|
+
profile_id: Optional[str] = None,
|
1281
|
+
session_variable: Optional[
|
1282
|
+
Union[
|
1283
|
+
List[models.SessionContextVariable],
|
1284
|
+
List[models.SessionContextVariableTypedDict],
|
1285
|
+
]
|
1286
|
+
] = None,
|
1287
|
+
start_over: Optional[bool] = None,
|
1288
|
+
use_live_release: Optional[bool] = None,
|
1289
|
+
ghs_article_id: Optional[str] = None,
|
1290
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
1291
|
+
server_url: Optional[str] = None,
|
1292
|
+
timeout_ms: Optional[int] = None,
|
1293
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
1294
|
+
) -> models.GHSearchResult:
|
1295
|
+
r"""Perform a Step in a Guided Help Search
|
1296
|
+
|
1297
|
+
## Overview
|
1298
|
+
The Perform a Step in a Guided Help Search API can be used to answer one or more questions (perform a step) in Guided Help search.
|
1299
|
+
|
1300
|
+
## Prerequisites
|
1301
|
+
* A Guided Help session must be in progress before this API is invoked.
|
1302
|
+
|
1303
|
+
|
1304
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
1305
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
1306
|
+
:param casebase_id: The numerical ID of the Casebase.
|
1307
|
+
:param questions: Pre-answered Questions in Guided Help search
|
1308
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
1309
|
+
:param gh_custom_additional_attributes:
|
1310
|
+
:param profile_id: The ID of the guided help profile.<br> 1 will always be the **system profile**.
|
1311
|
+
:param session_variable: Session variables used to give Guided Help additional context.
|
1312
|
+
:param start_over: Restart the current Guided Help search with the existing context along with session variable context.
|
1313
|
+
:param use_live_release: Use current live release snapshot of the Casebase otherwise use the authoring release.
|
1314
|
+
:param ghs_article_id: Numeric ID of the guided help session article used for starting search.
|
1315
|
+
:param retries: Override the default retry configuration for this method
|
1316
|
+
:param server_url: Override the default server URL for this method
|
1317
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
1318
|
+
:param http_headers: Additional headers to set or replace on requests.
|
1319
|
+
"""
|
1320
|
+
base_url = None
|
1321
|
+
url_variables = None
|
1322
|
+
if timeout_ms is None:
|
1323
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
1324
|
+
|
1325
|
+
if server_url is not None:
|
1326
|
+
base_url = server_url
|
1327
|
+
else:
|
1328
|
+
base_url = self._get_url(base_url, url_variables)
|
1329
|
+
|
1330
|
+
request = models.StepGHSearchRequest(
|
1331
|
+
accept_language=accept_language,
|
1332
|
+
portal_id=portal_id,
|
1333
|
+
language=language,
|
1334
|
+
gh_custom_additional_attributes=gh_custom_additional_attributes,
|
1335
|
+
gh_step_search_request=models.GHStepSearchRequest(
|
1336
|
+
casebase_id=casebase_id,
|
1337
|
+
questions=utils.get_pydantic_model(
|
1338
|
+
questions, List[models.QuestionAndAnswer]
|
1339
|
+
),
|
1340
|
+
profile_id=profile_id,
|
1341
|
+
session_variable=utils.get_pydantic_model(
|
1342
|
+
session_variable, Optional[List[models.SessionContextVariable]]
|
1343
|
+
),
|
1344
|
+
start_over=start_over,
|
1345
|
+
use_live_release=use_live_release,
|
1346
|
+
ghs_article_id=ghs_article_id,
|
1347
|
+
),
|
1348
|
+
)
|
1349
|
+
|
1350
|
+
req = self._build_request(
|
1351
|
+
method="PUT",
|
1352
|
+
path="/portals/{portalID}/gh/search",
|
1353
|
+
base_url=base_url,
|
1354
|
+
url_variables=url_variables,
|
1355
|
+
request=request,
|
1356
|
+
request_body_required=True,
|
1357
|
+
request_has_path_params=True,
|
1358
|
+
request_has_query_params=True,
|
1359
|
+
user_agent_header="user-agent",
|
1360
|
+
accept_header_value="application/json",
|
1361
|
+
http_headers=http_headers,
|
1362
|
+
security=self.sdk_configuration.security,
|
1363
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
1364
|
+
request.gh_step_search_request,
|
1365
|
+
False,
|
1366
|
+
False,
|
1367
|
+
"json",
|
1368
|
+
models.GHStepSearchRequest,
|
1369
|
+
),
|
1370
|
+
timeout_ms=timeout_ms,
|
1371
|
+
)
|
1372
|
+
|
1373
|
+
if retries == UNSET:
|
1374
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
1375
|
+
retries = self.sdk_configuration.retry_config
|
1376
|
+
|
1377
|
+
retry_config = None
|
1378
|
+
if isinstance(retries, utils.RetryConfig):
|
1379
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
1380
|
+
|
1381
|
+
http_res = self.do_request(
|
1382
|
+
hook_ctx=HookContext(
|
1383
|
+
config=self.sdk_configuration,
|
1384
|
+
base_url=base_url or "",
|
1385
|
+
operation_id="stepGHSearch",
|
1386
|
+
oauth2_scopes=[],
|
1387
|
+
security_source=get_security_from_env(
|
1388
|
+
self.sdk_configuration.security, models.Security
|
1389
|
+
),
|
1390
|
+
),
|
1391
|
+
request=req,
|
1392
|
+
error_status_codes=[
|
1393
|
+
"400",
|
1394
|
+
"401",
|
1395
|
+
"403",
|
1396
|
+
"404",
|
1397
|
+
"406",
|
1398
|
+
"415",
|
1399
|
+
"4XX",
|
1400
|
+
"500",
|
1401
|
+
"5XX",
|
1402
|
+
],
|
1403
|
+
retry_config=retry_config,
|
1404
|
+
)
|
1405
|
+
|
1406
|
+
response_data: Any = None
|
1407
|
+
if utils.match_response(http_res, "200", "application/json"):
|
1408
|
+
return unmarshal_json_response(models.GHSearchResult, http_res)
|
1409
|
+
if utils.match_response(
|
1410
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
1411
|
+
):
|
1412
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1413
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1414
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1415
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1416
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1417
|
+
if utils.match_response(http_res, ["415", "4XX"], "*"):
|
1418
|
+
http_res_text = utils.stream_to_text(http_res)
|
1419
|
+
raise errors.EgainDefaultError(
|
1420
|
+
"API error occurred", http_res, http_res_text
|
1421
|
+
)
|
1422
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1423
|
+
http_res_text = utils.stream_to_text(http_res)
|
1424
|
+
raise errors.EgainDefaultError(
|
1425
|
+
"API error occurred", http_res, http_res_text
|
1426
|
+
)
|
1427
|
+
|
1428
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
1429
|
+
|
1430
|
+
async def step_gh_search_async(
|
1431
|
+
self,
|
1432
|
+
*,
|
1433
|
+
accept_language: models.AcceptLanguage,
|
1434
|
+
portal_id: str,
|
1435
|
+
casebase_id: str,
|
1436
|
+
questions: Union[
|
1437
|
+
List[models.QuestionAndAnswer], List[models.QuestionAndAnswerTypedDict]
|
1438
|
+
],
|
1439
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
1440
|
+
gh_custom_additional_attributes: Optional[str] = None,
|
1441
|
+
profile_id: Optional[str] = None,
|
1442
|
+
session_variable: Optional[
|
1443
|
+
Union[
|
1444
|
+
List[models.SessionContextVariable],
|
1445
|
+
List[models.SessionContextVariableTypedDict],
|
1446
|
+
]
|
1447
|
+
] = None,
|
1448
|
+
start_over: Optional[bool] = None,
|
1449
|
+
use_live_release: Optional[bool] = None,
|
1450
|
+
ghs_article_id: Optional[str] = None,
|
1451
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
1452
|
+
server_url: Optional[str] = None,
|
1453
|
+
timeout_ms: Optional[int] = None,
|
1454
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
1455
|
+
) -> models.GHSearchResult:
|
1456
|
+
r"""Perform a Step in a Guided Help Search
|
1457
|
+
|
1458
|
+
## Overview
|
1459
|
+
The Perform a Step in a Guided Help Search API can be used to answer one or more questions (perform a step) in Guided Help search.
|
1460
|
+
|
1461
|
+
## Prerequisites
|
1462
|
+
* A Guided Help session must be in progress before this API is invoked.
|
1463
|
+
|
1464
|
+
|
1465
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
1466
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
1467
|
+
:param casebase_id: The numerical ID of the Casebase.
|
1468
|
+
:param questions: Pre-answered Questions in Guided Help search
|
1469
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
1470
|
+
:param gh_custom_additional_attributes:
|
1471
|
+
:param profile_id: The ID of the guided help profile.<br> 1 will always be the **system profile**.
|
1472
|
+
:param session_variable: Session variables used to give Guided Help additional context.
|
1473
|
+
:param start_over: Restart the current Guided Help search with the existing context along with session variable context.
|
1474
|
+
:param use_live_release: Use current live release snapshot of the Casebase otherwise use the authoring release.
|
1475
|
+
:param ghs_article_id: Numeric ID of the guided help session article used for starting search.
|
1476
|
+
:param retries: Override the default retry configuration for this method
|
1477
|
+
:param server_url: Override the default server URL for this method
|
1478
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
1479
|
+
:param http_headers: Additional headers to set or replace on requests.
|
1480
|
+
"""
|
1481
|
+
base_url = None
|
1482
|
+
url_variables = None
|
1483
|
+
if timeout_ms is None:
|
1484
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
1485
|
+
|
1486
|
+
if server_url is not None:
|
1487
|
+
base_url = server_url
|
1488
|
+
else:
|
1489
|
+
base_url = self._get_url(base_url, url_variables)
|
1490
|
+
|
1491
|
+
request = models.StepGHSearchRequest(
|
1492
|
+
accept_language=accept_language,
|
1493
|
+
portal_id=portal_id,
|
1494
|
+
language=language,
|
1495
|
+
gh_custom_additional_attributes=gh_custom_additional_attributes,
|
1496
|
+
gh_step_search_request=models.GHStepSearchRequest(
|
1497
|
+
casebase_id=casebase_id,
|
1498
|
+
questions=utils.get_pydantic_model(
|
1499
|
+
questions, List[models.QuestionAndAnswer]
|
1500
|
+
),
|
1501
|
+
profile_id=profile_id,
|
1502
|
+
session_variable=utils.get_pydantic_model(
|
1503
|
+
session_variable, Optional[List[models.SessionContextVariable]]
|
1504
|
+
),
|
1505
|
+
start_over=start_over,
|
1506
|
+
use_live_release=use_live_release,
|
1507
|
+
ghs_article_id=ghs_article_id,
|
1508
|
+
),
|
1509
|
+
)
|
1510
|
+
|
1511
|
+
req = self._build_request_async(
|
1512
|
+
method="PUT",
|
1513
|
+
path="/portals/{portalID}/gh/search",
|
1514
|
+
base_url=base_url,
|
1515
|
+
url_variables=url_variables,
|
1516
|
+
request=request,
|
1517
|
+
request_body_required=True,
|
1518
|
+
request_has_path_params=True,
|
1519
|
+
request_has_query_params=True,
|
1520
|
+
user_agent_header="user-agent",
|
1521
|
+
accept_header_value="application/json",
|
1522
|
+
http_headers=http_headers,
|
1523
|
+
security=self.sdk_configuration.security,
|
1524
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
1525
|
+
request.gh_step_search_request,
|
1526
|
+
False,
|
1527
|
+
False,
|
1528
|
+
"json",
|
1529
|
+
models.GHStepSearchRequest,
|
1530
|
+
),
|
1531
|
+
timeout_ms=timeout_ms,
|
1532
|
+
)
|
1533
|
+
|
1534
|
+
if retries == UNSET:
|
1535
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
1536
|
+
retries = self.sdk_configuration.retry_config
|
1537
|
+
|
1538
|
+
retry_config = None
|
1539
|
+
if isinstance(retries, utils.RetryConfig):
|
1540
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
1541
|
+
|
1542
|
+
http_res = await self.do_request_async(
|
1543
|
+
hook_ctx=HookContext(
|
1544
|
+
config=self.sdk_configuration,
|
1545
|
+
base_url=base_url or "",
|
1546
|
+
operation_id="stepGHSearch",
|
1547
|
+
oauth2_scopes=[],
|
1548
|
+
security_source=get_security_from_env(
|
1549
|
+
self.sdk_configuration.security, models.Security
|
1550
|
+
),
|
1551
|
+
),
|
1552
|
+
request=req,
|
1553
|
+
error_status_codes=[
|
1554
|
+
"400",
|
1555
|
+
"401",
|
1556
|
+
"403",
|
1557
|
+
"404",
|
1558
|
+
"406",
|
1559
|
+
"415",
|
1560
|
+
"4XX",
|
1561
|
+
"500",
|
1562
|
+
"5XX",
|
1563
|
+
],
|
1564
|
+
retry_config=retry_config,
|
1565
|
+
)
|
1566
|
+
|
1567
|
+
response_data: Any = None
|
1568
|
+
if utils.match_response(http_res, "200", "application/json"):
|
1569
|
+
return unmarshal_json_response(models.GHSearchResult, http_res)
|
1570
|
+
if utils.match_response(
|
1571
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
1572
|
+
):
|
1573
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1574
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1575
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1576
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1577
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1578
|
+
if utils.match_response(http_res, ["415", "4XX"], "*"):
|
1579
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1580
|
+
raise errors.EgainDefaultError(
|
1581
|
+
"API error occurred", http_res, http_res_text
|
1582
|
+
)
|
1583
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1584
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1585
|
+
raise errors.EgainDefaultError(
|
1586
|
+
"API error occurred", http_res, http_res_text
|
1587
|
+
)
|
1588
|
+
|
1589
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
1590
|
+
|
1591
|
+
def get_all_cases(
|
1592
|
+
self,
|
1593
|
+
*,
|
1594
|
+
accept_language: models.AcceptLanguage,
|
1595
|
+
portal_id: str,
|
1596
|
+
casebase_release_id: str,
|
1597
|
+
cluster_id: str,
|
1598
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
1599
|
+
pagenum: Optional[int] = 1,
|
1600
|
+
pagesize: Optional[int] = 10,
|
1601
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
1602
|
+
server_url: Optional[str] = None,
|
1603
|
+
timeout_ms: Optional[int] = None,
|
1604
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
1605
|
+
) -> Optional[models.CaseListResults]:
|
1606
|
+
r"""Get All Cases of a Cluster in Release
|
1607
|
+
|
1608
|
+
## Overview
|
1609
|
+
The Get All Cases of a Cluster in Release API retrieves all cases in cluster of a Casebase Release. A Case is a group of Questions, Articles, and control actions that work together to guide users through a series of questions and scenarios in a Guided Help session.
|
1610
|
+
|
1611
|
+
## Prerequisites
|
1612
|
+
A Guided Help search session for the provided Casebase Release must be in progress before this API is invoked.
|
1613
|
+
|
1614
|
+
|
1615
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
1616
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
1617
|
+
:param casebase_release_id: The numerical ID of the Casebase Release for which details is to be fetched.
|
1618
|
+
:param cluster_id: ID of Cluster.
|
1619
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
1620
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
1621
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
1622
|
+
:param retries: Override the default retry configuration for this method
|
1623
|
+
:param server_url: Override the default server URL for this method
|
1624
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
1625
|
+
:param http_headers: Additional headers to set or replace on requests.
|
1626
|
+
"""
|
1627
|
+
base_url = None
|
1628
|
+
url_variables = None
|
1629
|
+
if timeout_ms is None:
|
1630
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
1631
|
+
|
1632
|
+
if server_url is not None:
|
1633
|
+
base_url = server_url
|
1634
|
+
else:
|
1635
|
+
base_url = self._get_url(base_url, url_variables)
|
1636
|
+
|
1637
|
+
request = models.GetAllCasesRequest(
|
1638
|
+
accept_language=accept_language,
|
1639
|
+
portal_id=portal_id,
|
1640
|
+
casebase_release_id=casebase_release_id,
|
1641
|
+
cluster_id=cluster_id,
|
1642
|
+
language=language,
|
1643
|
+
pagenum=pagenum,
|
1644
|
+
pagesize=pagesize,
|
1645
|
+
)
|
1646
|
+
|
1647
|
+
req = self._build_request(
|
1648
|
+
method="GET",
|
1649
|
+
path="/portals/{portalID}/gh/casebasereleases/{casebaseReleaseID}/clusters/{clusterID}/cases",
|
1650
|
+
base_url=base_url,
|
1651
|
+
url_variables=url_variables,
|
1652
|
+
request=request,
|
1653
|
+
request_body_required=False,
|
1654
|
+
request_has_path_params=True,
|
1655
|
+
request_has_query_params=True,
|
1656
|
+
user_agent_header="user-agent",
|
1657
|
+
accept_header_value="application/json",
|
1658
|
+
http_headers=http_headers,
|
1659
|
+
security=self.sdk_configuration.security,
|
1660
|
+
timeout_ms=timeout_ms,
|
1661
|
+
)
|
1662
|
+
|
1663
|
+
if retries == UNSET:
|
1664
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
1665
|
+
retries = self.sdk_configuration.retry_config
|
1666
|
+
|
1667
|
+
retry_config = None
|
1668
|
+
if isinstance(retries, utils.RetryConfig):
|
1669
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
1670
|
+
|
1671
|
+
http_res = self.do_request(
|
1672
|
+
hook_ctx=HookContext(
|
1673
|
+
config=self.sdk_configuration,
|
1674
|
+
base_url=base_url or "",
|
1675
|
+
operation_id="getAllCases",
|
1676
|
+
oauth2_scopes=[],
|
1677
|
+
security_source=get_security_from_env(
|
1678
|
+
self.sdk_configuration.security, models.Security
|
1679
|
+
),
|
1680
|
+
),
|
1681
|
+
request=req,
|
1682
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
1683
|
+
retry_config=retry_config,
|
1684
|
+
)
|
1685
|
+
|
1686
|
+
response_data: Any = None
|
1687
|
+
if utils.match_response(http_res, "200", "application/json"):
|
1688
|
+
return unmarshal_json_response(models.CaseListResults, http_res)
|
1689
|
+
if utils.match_response(http_res, "204", "*"):
|
1690
|
+
return None
|
1691
|
+
if utils.match_response(
|
1692
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
1693
|
+
):
|
1694
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1695
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1696
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1697
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1698
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1699
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1700
|
+
http_res_text = utils.stream_to_text(http_res)
|
1701
|
+
raise errors.EgainDefaultError(
|
1702
|
+
"API error occurred", http_res, http_res_text
|
1703
|
+
)
|
1704
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1705
|
+
http_res_text = utils.stream_to_text(http_res)
|
1706
|
+
raise errors.EgainDefaultError(
|
1707
|
+
"API error occurred", http_res, http_res_text
|
1708
|
+
)
|
1709
|
+
|
1710
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
1711
|
+
|
1712
|
+
async def get_all_cases_async(
|
1713
|
+
self,
|
1714
|
+
*,
|
1715
|
+
accept_language: models.AcceptLanguage,
|
1716
|
+
portal_id: str,
|
1717
|
+
casebase_release_id: str,
|
1718
|
+
cluster_id: str,
|
1719
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
1720
|
+
pagenum: Optional[int] = 1,
|
1721
|
+
pagesize: Optional[int] = 10,
|
1722
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
1723
|
+
server_url: Optional[str] = None,
|
1724
|
+
timeout_ms: Optional[int] = None,
|
1725
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
1726
|
+
) -> Optional[models.CaseListResults]:
|
1727
|
+
r"""Get All Cases of a Cluster in Release
|
1728
|
+
|
1729
|
+
## Overview
|
1730
|
+
The Get All Cases of a Cluster in Release API retrieves all cases in cluster of a Casebase Release. A Case is a group of Questions, Articles, and control actions that work together to guide users through a series of questions and scenarios in a Guided Help session.
|
1731
|
+
|
1732
|
+
## Prerequisites
|
1733
|
+
A Guided Help search session for the provided Casebase Release must be in progress before this API is invoked.
|
1734
|
+
|
1735
|
+
|
1736
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
1737
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
1738
|
+
:param casebase_release_id: The numerical ID of the Casebase Release for which details is to be fetched.
|
1739
|
+
:param cluster_id: ID of Cluster.
|
1740
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
1741
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
1742
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
1743
|
+
:param retries: Override the default retry configuration for this method
|
1744
|
+
:param server_url: Override the default server URL for this method
|
1745
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
1746
|
+
:param http_headers: Additional headers to set or replace on requests.
|
1747
|
+
"""
|
1748
|
+
base_url = None
|
1749
|
+
url_variables = None
|
1750
|
+
if timeout_ms is None:
|
1751
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
1752
|
+
|
1753
|
+
if server_url is not None:
|
1754
|
+
base_url = server_url
|
1755
|
+
else:
|
1756
|
+
base_url = self._get_url(base_url, url_variables)
|
1757
|
+
|
1758
|
+
request = models.GetAllCasesRequest(
|
1759
|
+
accept_language=accept_language,
|
1760
|
+
portal_id=portal_id,
|
1761
|
+
casebase_release_id=casebase_release_id,
|
1762
|
+
cluster_id=cluster_id,
|
1763
|
+
language=language,
|
1764
|
+
pagenum=pagenum,
|
1765
|
+
pagesize=pagesize,
|
1766
|
+
)
|
1767
|
+
|
1768
|
+
req = self._build_request_async(
|
1769
|
+
method="GET",
|
1770
|
+
path="/portals/{portalID}/gh/casebasereleases/{casebaseReleaseID}/clusters/{clusterID}/cases",
|
1771
|
+
base_url=base_url,
|
1772
|
+
url_variables=url_variables,
|
1773
|
+
request=request,
|
1774
|
+
request_body_required=False,
|
1775
|
+
request_has_path_params=True,
|
1776
|
+
request_has_query_params=True,
|
1777
|
+
user_agent_header="user-agent",
|
1778
|
+
accept_header_value="application/json",
|
1779
|
+
http_headers=http_headers,
|
1780
|
+
security=self.sdk_configuration.security,
|
1781
|
+
timeout_ms=timeout_ms,
|
1782
|
+
)
|
1783
|
+
|
1784
|
+
if retries == UNSET:
|
1785
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
1786
|
+
retries = self.sdk_configuration.retry_config
|
1787
|
+
|
1788
|
+
retry_config = None
|
1789
|
+
if isinstance(retries, utils.RetryConfig):
|
1790
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
1791
|
+
|
1792
|
+
http_res = await self.do_request_async(
|
1793
|
+
hook_ctx=HookContext(
|
1794
|
+
config=self.sdk_configuration,
|
1795
|
+
base_url=base_url or "",
|
1796
|
+
operation_id="getAllCases",
|
1797
|
+
oauth2_scopes=[],
|
1798
|
+
security_source=get_security_from_env(
|
1799
|
+
self.sdk_configuration.security, models.Security
|
1800
|
+
),
|
1801
|
+
),
|
1802
|
+
request=req,
|
1803
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
1804
|
+
retry_config=retry_config,
|
1805
|
+
)
|
1806
|
+
|
1807
|
+
response_data: Any = None
|
1808
|
+
if utils.match_response(http_res, "200", "application/json"):
|
1809
|
+
return unmarshal_json_response(models.CaseListResults, http_res)
|
1810
|
+
if utils.match_response(http_res, "204", "*"):
|
1811
|
+
return None
|
1812
|
+
if utils.match_response(
|
1813
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
1814
|
+
):
|
1815
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1816
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1817
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1818
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1819
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1820
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1821
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1822
|
+
raise errors.EgainDefaultError(
|
1823
|
+
"API error occurred", http_res, http_res_text
|
1824
|
+
)
|
1825
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1826
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
1827
|
+
raise errors.EgainDefaultError(
|
1828
|
+
"API error occurred", http_res, http_res_text
|
1829
|
+
)
|
1830
|
+
|
1831
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
1832
|
+
|
1833
|
+
def get_case_by_id(
|
1834
|
+
self,
|
1835
|
+
*,
|
1836
|
+
accept_language: models.AcceptLanguage,
|
1837
|
+
portal_id: str,
|
1838
|
+
casebase_release_id: str,
|
1839
|
+
case_id: str,
|
1840
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
1841
|
+
case_additional_attributes: Optional[
|
1842
|
+
List[models.CaseAdditionalAttributes]
|
1843
|
+
] = None,
|
1844
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
1845
|
+
server_url: Optional[str] = None,
|
1846
|
+
timeout_ms: Optional[int] = None,
|
1847
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
1848
|
+
) -> Optional[models.Case]:
|
1849
|
+
r"""Get Details of a Case
|
1850
|
+
|
1851
|
+
## Overview
|
1852
|
+
The Get Details of a Case API retrieves details of a case in a release.
|
1853
|
+
|
1854
|
+
## Prerequisites
|
1855
|
+
* A Guided Help search session for the provided Casebase Release must be in progress before this API is invoked.
|
1856
|
+
|
1857
|
+
|
1858
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
1859
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
1860
|
+
:param casebase_release_id: The numerical ID of the Casebase Release for which details is to be fetched.
|
1861
|
+
:param case_id: The numerical ID of the Case for which details is to be fetched.
|
1862
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
1863
|
+
:param case_additional_attributes: Additional case attributes to be fetched.
|
1864
|
+
:param retries: Override the default retry configuration for this method
|
1865
|
+
:param server_url: Override the default server URL for this method
|
1866
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
1867
|
+
:param http_headers: Additional headers to set or replace on requests.
|
1868
|
+
"""
|
1869
|
+
base_url = None
|
1870
|
+
url_variables = None
|
1871
|
+
if timeout_ms is None:
|
1872
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
1873
|
+
|
1874
|
+
if server_url is not None:
|
1875
|
+
base_url = server_url
|
1876
|
+
else:
|
1877
|
+
base_url = self._get_url(base_url, url_variables)
|
1878
|
+
|
1879
|
+
request = models.GetCaseByIDRequest(
|
1880
|
+
accept_language=accept_language,
|
1881
|
+
portal_id=portal_id,
|
1882
|
+
casebase_release_id=casebase_release_id,
|
1883
|
+
case_id=case_id,
|
1884
|
+
language=language,
|
1885
|
+
case_additional_attributes=case_additional_attributes,
|
1886
|
+
)
|
1887
|
+
|
1888
|
+
req = self._build_request(
|
1889
|
+
method="GET",
|
1890
|
+
path="/portals/{portalID}/gh/casebasereleases/{casebaseReleaseID}/cases/{caseID}",
|
1891
|
+
base_url=base_url,
|
1892
|
+
url_variables=url_variables,
|
1893
|
+
request=request,
|
1894
|
+
request_body_required=False,
|
1895
|
+
request_has_path_params=True,
|
1896
|
+
request_has_query_params=True,
|
1897
|
+
user_agent_header="user-agent",
|
1898
|
+
accept_header_value="application/json",
|
1899
|
+
http_headers=http_headers,
|
1900
|
+
security=self.sdk_configuration.security,
|
1901
|
+
timeout_ms=timeout_ms,
|
1902
|
+
)
|
1903
|
+
|
1904
|
+
if retries == UNSET:
|
1905
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
1906
|
+
retries = self.sdk_configuration.retry_config
|
1907
|
+
|
1908
|
+
retry_config = None
|
1909
|
+
if isinstance(retries, utils.RetryConfig):
|
1910
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
1911
|
+
|
1912
|
+
http_res = self.do_request(
|
1913
|
+
hook_ctx=HookContext(
|
1914
|
+
config=self.sdk_configuration,
|
1915
|
+
base_url=base_url or "",
|
1916
|
+
operation_id="getCaseById",
|
1917
|
+
oauth2_scopes=[],
|
1918
|
+
security_source=get_security_from_env(
|
1919
|
+
self.sdk_configuration.security, models.Security
|
1920
|
+
),
|
1921
|
+
),
|
1922
|
+
request=req,
|
1923
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
1924
|
+
retry_config=retry_config,
|
1925
|
+
)
|
1926
|
+
|
1927
|
+
response_data: Any = None
|
1928
|
+
if utils.match_response(http_res, "200", "application/json"):
|
1929
|
+
return unmarshal_json_response(models.Case, http_res)
|
1930
|
+
if utils.match_response(http_res, "204", "*"):
|
1931
|
+
return None
|
1932
|
+
if utils.match_response(
|
1933
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
1934
|
+
):
|
1935
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1936
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1937
|
+
if utils.match_response(http_res, "500", "application/json"):
|
1938
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
1939
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
1940
|
+
if utils.match_response(http_res, "4XX", "*"):
|
1941
|
+
http_res_text = utils.stream_to_text(http_res)
|
1942
|
+
raise errors.EgainDefaultError(
|
1943
|
+
"API error occurred", http_res, http_res_text
|
1944
|
+
)
|
1945
|
+
if utils.match_response(http_res, "5XX", "*"):
|
1946
|
+
http_res_text = utils.stream_to_text(http_res)
|
1947
|
+
raise errors.EgainDefaultError(
|
1948
|
+
"API error occurred", http_res, http_res_text
|
1949
|
+
)
|
1950
|
+
|
1951
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
1952
|
+
|
1953
|
+
async def get_case_by_id_async(
|
1954
|
+
self,
|
1955
|
+
*,
|
1956
|
+
accept_language: models.AcceptLanguage,
|
1957
|
+
portal_id: str,
|
1958
|
+
casebase_release_id: str,
|
1959
|
+
case_id: str,
|
1960
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
1961
|
+
case_additional_attributes: Optional[
|
1962
|
+
List[models.CaseAdditionalAttributes]
|
1963
|
+
] = None,
|
1964
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
1965
|
+
server_url: Optional[str] = None,
|
1966
|
+
timeout_ms: Optional[int] = None,
|
1967
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
1968
|
+
) -> Optional[models.Case]:
|
1969
|
+
r"""Get Details of a Case
|
1970
|
+
|
1971
|
+
## Overview
|
1972
|
+
The Get Details of a Case API retrieves details of a case in a release.
|
1973
|
+
|
1974
|
+
## Prerequisites
|
1975
|
+
* A Guided Help search session for the provided Casebase Release must be in progress before this API is invoked.
|
1976
|
+
|
1977
|
+
|
1978
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
1979
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
1980
|
+
:param casebase_release_id: The numerical ID of the Casebase Release for which details is to be fetched.
|
1981
|
+
:param case_id: The numerical ID of the Case for which details is to be fetched.
|
1982
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
1983
|
+
:param case_additional_attributes: Additional case attributes to be fetched.
|
1984
|
+
:param retries: Override the default retry configuration for this method
|
1985
|
+
:param server_url: Override the default server URL for this method
|
1986
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
1987
|
+
:param http_headers: Additional headers to set or replace on requests.
|
1988
|
+
"""
|
1989
|
+
base_url = None
|
1990
|
+
url_variables = None
|
1991
|
+
if timeout_ms is None:
|
1992
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
1993
|
+
|
1994
|
+
if server_url is not None:
|
1995
|
+
base_url = server_url
|
1996
|
+
else:
|
1997
|
+
base_url = self._get_url(base_url, url_variables)
|
1998
|
+
|
1999
|
+
request = models.GetCaseByIDRequest(
|
2000
|
+
accept_language=accept_language,
|
2001
|
+
portal_id=portal_id,
|
2002
|
+
casebase_release_id=casebase_release_id,
|
2003
|
+
case_id=case_id,
|
2004
|
+
language=language,
|
2005
|
+
case_additional_attributes=case_additional_attributes,
|
2006
|
+
)
|
2007
|
+
|
2008
|
+
req = self._build_request_async(
|
2009
|
+
method="GET",
|
2010
|
+
path="/portals/{portalID}/gh/casebasereleases/{casebaseReleaseID}/cases/{caseID}",
|
2011
|
+
base_url=base_url,
|
2012
|
+
url_variables=url_variables,
|
2013
|
+
request=request,
|
2014
|
+
request_body_required=False,
|
2015
|
+
request_has_path_params=True,
|
2016
|
+
request_has_query_params=True,
|
2017
|
+
user_agent_header="user-agent",
|
2018
|
+
accept_header_value="application/json",
|
2019
|
+
http_headers=http_headers,
|
2020
|
+
security=self.sdk_configuration.security,
|
2021
|
+
timeout_ms=timeout_ms,
|
2022
|
+
)
|
2023
|
+
|
2024
|
+
if retries == UNSET:
|
2025
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
2026
|
+
retries = self.sdk_configuration.retry_config
|
2027
|
+
|
2028
|
+
retry_config = None
|
2029
|
+
if isinstance(retries, utils.RetryConfig):
|
2030
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
2031
|
+
|
2032
|
+
http_res = await self.do_request_async(
|
2033
|
+
hook_ctx=HookContext(
|
2034
|
+
config=self.sdk_configuration,
|
2035
|
+
base_url=base_url or "",
|
2036
|
+
operation_id="getCaseById",
|
2037
|
+
oauth2_scopes=[],
|
2038
|
+
security_source=get_security_from_env(
|
2039
|
+
self.sdk_configuration.security, models.Security
|
2040
|
+
),
|
2041
|
+
),
|
2042
|
+
request=req,
|
2043
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
2044
|
+
retry_config=retry_config,
|
2045
|
+
)
|
2046
|
+
|
2047
|
+
response_data: Any = None
|
2048
|
+
if utils.match_response(http_res, "200", "application/json"):
|
2049
|
+
return unmarshal_json_response(models.Case, http_res)
|
2050
|
+
if utils.match_response(http_res, "204", "*"):
|
2051
|
+
return None
|
2052
|
+
if utils.match_response(
|
2053
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
2054
|
+
):
|
2055
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2056
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2057
|
+
if utils.match_response(http_res, "500", "application/json"):
|
2058
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2059
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2060
|
+
if utils.match_response(http_res, "4XX", "*"):
|
2061
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
2062
|
+
raise errors.EgainDefaultError(
|
2063
|
+
"API error occurred", http_res, http_res_text
|
2064
|
+
)
|
2065
|
+
if utils.match_response(http_res, "5XX", "*"):
|
2066
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
2067
|
+
raise errors.EgainDefaultError(
|
2068
|
+
"API error occurred", http_res, http_res_text
|
2069
|
+
)
|
2070
|
+
|
2071
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
2072
|
+
|
2073
|
+
def accept_gh_solution(
|
2074
|
+
self,
|
2075
|
+
*,
|
2076
|
+
accept_language: models.AcceptLanguage,
|
2077
|
+
portal_id: str,
|
2078
|
+
case_id: str,
|
2079
|
+
id: str,
|
2080
|
+
name: str,
|
2081
|
+
profile_id: str,
|
2082
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
2083
|
+
server_url: Optional[str] = None,
|
2084
|
+
timeout_ms: Optional[int] = None,
|
2085
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
2086
|
+
):
|
2087
|
+
r"""Accept Solution
|
2088
|
+
|
2089
|
+
## Overview
|
2090
|
+
The Accept Solution API can be used to accept and add positive score to a solution of a Guided Help case.
|
2091
|
+
|
2092
|
+
## Prerequisites
|
2093
|
+
* A Guided Help search session must be started before invoking this API.
|
2094
|
+
|
2095
|
+
|
2096
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
2097
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
2098
|
+
:param case_id: The numerical ID of the Case for which details is to be fetched.
|
2099
|
+
:param id: The numerical ID of the Casebase Release.
|
2100
|
+
:param name: name of the case or article
|
2101
|
+
:param profile_id: The ID of the guided help profile.<br> 1 will always be the **system profile**.
|
2102
|
+
:param retries: Override the default retry configuration for this method
|
2103
|
+
:param server_url: Override the default server URL for this method
|
2104
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
2105
|
+
:param http_headers: Additional headers to set or replace on requests.
|
2106
|
+
"""
|
2107
|
+
base_url = None
|
2108
|
+
url_variables = None
|
2109
|
+
if timeout_ms is None:
|
2110
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
2111
|
+
|
2112
|
+
if server_url is not None:
|
2113
|
+
base_url = server_url
|
2114
|
+
else:
|
2115
|
+
base_url = self._get_url(base_url, url_variables)
|
2116
|
+
|
2117
|
+
request = models.AcceptGHSolutionRequest(
|
2118
|
+
accept_language=accept_language,
|
2119
|
+
portal_id=portal_id,
|
2120
|
+
case_id=case_id,
|
2121
|
+
quickpick_rating=models.QuickpickRating(
|
2122
|
+
id=id,
|
2123
|
+
name=name,
|
2124
|
+
profile_id=profile_id,
|
2125
|
+
),
|
2126
|
+
)
|
2127
|
+
|
2128
|
+
req = self._build_request(
|
2129
|
+
method="POST",
|
2130
|
+
path="/portals/{portalID}/gh/cases/{caseID}/accept",
|
2131
|
+
base_url=base_url,
|
2132
|
+
url_variables=url_variables,
|
2133
|
+
request=request,
|
2134
|
+
request_body_required=True,
|
2135
|
+
request_has_path_params=True,
|
2136
|
+
request_has_query_params=True,
|
2137
|
+
user_agent_header="user-agent",
|
2138
|
+
accept_header_value="application/json",
|
2139
|
+
http_headers=http_headers,
|
2140
|
+
security=self.sdk_configuration.security,
|
2141
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
2142
|
+
request.quickpick_rating, False, False, "json", models.QuickpickRating
|
2143
|
+
),
|
2144
|
+
timeout_ms=timeout_ms,
|
2145
|
+
)
|
2146
|
+
|
2147
|
+
if retries == UNSET:
|
2148
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
2149
|
+
retries = self.sdk_configuration.retry_config
|
2150
|
+
|
2151
|
+
retry_config = None
|
2152
|
+
if isinstance(retries, utils.RetryConfig):
|
2153
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
2154
|
+
|
2155
|
+
http_res = self.do_request(
|
2156
|
+
hook_ctx=HookContext(
|
2157
|
+
config=self.sdk_configuration,
|
2158
|
+
base_url=base_url or "",
|
2159
|
+
operation_id="acceptGHSolution",
|
2160
|
+
oauth2_scopes=[],
|
2161
|
+
security_source=get_security_from_env(
|
2162
|
+
self.sdk_configuration.security, models.Security
|
2163
|
+
),
|
2164
|
+
),
|
2165
|
+
request=req,
|
2166
|
+
error_status_codes=[
|
2167
|
+
"400",
|
2168
|
+
"401",
|
2169
|
+
"403",
|
2170
|
+
"404",
|
2171
|
+
"406",
|
2172
|
+
"415",
|
2173
|
+
"4XX",
|
2174
|
+
"500",
|
2175
|
+
"5XX",
|
2176
|
+
],
|
2177
|
+
retry_config=retry_config,
|
2178
|
+
)
|
2179
|
+
|
2180
|
+
response_data: Any = None
|
2181
|
+
if utils.match_response(http_res, "201", "*"):
|
2182
|
+
return
|
2183
|
+
if utils.match_response(
|
2184
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
2185
|
+
):
|
2186
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2187
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2188
|
+
if utils.match_response(http_res, "500", "application/json"):
|
2189
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2190
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2191
|
+
if utils.match_response(http_res, ["415", "4XX"], "*"):
|
2192
|
+
http_res_text = utils.stream_to_text(http_res)
|
2193
|
+
raise errors.EgainDefaultError(
|
2194
|
+
"API error occurred", http_res, http_res_text
|
2195
|
+
)
|
2196
|
+
if utils.match_response(http_res, "5XX", "*"):
|
2197
|
+
http_res_text = utils.stream_to_text(http_res)
|
2198
|
+
raise errors.EgainDefaultError(
|
2199
|
+
"API error occurred", http_res, http_res_text
|
2200
|
+
)
|
2201
|
+
|
2202
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
2203
|
+
|
2204
|
+
async def accept_gh_solution_async(
|
2205
|
+
self,
|
2206
|
+
*,
|
2207
|
+
accept_language: models.AcceptLanguage,
|
2208
|
+
portal_id: str,
|
2209
|
+
case_id: str,
|
2210
|
+
id: str,
|
2211
|
+
name: str,
|
2212
|
+
profile_id: str,
|
2213
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
2214
|
+
server_url: Optional[str] = None,
|
2215
|
+
timeout_ms: Optional[int] = None,
|
2216
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
2217
|
+
):
|
2218
|
+
r"""Accept Solution
|
2219
|
+
|
2220
|
+
## Overview
|
2221
|
+
The Accept Solution API can be used to accept and add positive score to a solution of a Guided Help case.
|
2222
|
+
|
2223
|
+
## Prerequisites
|
2224
|
+
* A Guided Help search session must be started before invoking this API.
|
2225
|
+
|
2226
|
+
|
2227
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
2228
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
2229
|
+
:param case_id: The numerical ID of the Case for which details is to be fetched.
|
2230
|
+
:param id: The numerical ID of the Casebase Release.
|
2231
|
+
:param name: name of the case or article
|
2232
|
+
:param profile_id: The ID of the guided help profile.<br> 1 will always be the **system profile**.
|
2233
|
+
:param retries: Override the default retry configuration for this method
|
2234
|
+
:param server_url: Override the default server URL for this method
|
2235
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
2236
|
+
:param http_headers: Additional headers to set or replace on requests.
|
2237
|
+
"""
|
2238
|
+
base_url = None
|
2239
|
+
url_variables = None
|
2240
|
+
if timeout_ms is None:
|
2241
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
2242
|
+
|
2243
|
+
if server_url is not None:
|
2244
|
+
base_url = server_url
|
2245
|
+
else:
|
2246
|
+
base_url = self._get_url(base_url, url_variables)
|
2247
|
+
|
2248
|
+
request = models.AcceptGHSolutionRequest(
|
2249
|
+
accept_language=accept_language,
|
2250
|
+
portal_id=portal_id,
|
2251
|
+
case_id=case_id,
|
2252
|
+
quickpick_rating=models.QuickpickRating(
|
2253
|
+
id=id,
|
2254
|
+
name=name,
|
2255
|
+
profile_id=profile_id,
|
2256
|
+
),
|
2257
|
+
)
|
2258
|
+
|
2259
|
+
req = self._build_request_async(
|
2260
|
+
method="POST",
|
2261
|
+
path="/portals/{portalID}/gh/cases/{caseID}/accept",
|
2262
|
+
base_url=base_url,
|
2263
|
+
url_variables=url_variables,
|
2264
|
+
request=request,
|
2265
|
+
request_body_required=True,
|
2266
|
+
request_has_path_params=True,
|
2267
|
+
request_has_query_params=True,
|
2268
|
+
user_agent_header="user-agent",
|
2269
|
+
accept_header_value="application/json",
|
2270
|
+
http_headers=http_headers,
|
2271
|
+
security=self.sdk_configuration.security,
|
2272
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
2273
|
+
request.quickpick_rating, False, False, "json", models.QuickpickRating
|
2274
|
+
),
|
2275
|
+
timeout_ms=timeout_ms,
|
2276
|
+
)
|
2277
|
+
|
2278
|
+
if retries == UNSET:
|
2279
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
2280
|
+
retries = self.sdk_configuration.retry_config
|
2281
|
+
|
2282
|
+
retry_config = None
|
2283
|
+
if isinstance(retries, utils.RetryConfig):
|
2284
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
2285
|
+
|
2286
|
+
http_res = await self.do_request_async(
|
2287
|
+
hook_ctx=HookContext(
|
2288
|
+
config=self.sdk_configuration,
|
2289
|
+
base_url=base_url or "",
|
2290
|
+
operation_id="acceptGHSolution",
|
2291
|
+
oauth2_scopes=[],
|
2292
|
+
security_source=get_security_from_env(
|
2293
|
+
self.sdk_configuration.security, models.Security
|
2294
|
+
),
|
2295
|
+
),
|
2296
|
+
request=req,
|
2297
|
+
error_status_codes=[
|
2298
|
+
"400",
|
2299
|
+
"401",
|
2300
|
+
"403",
|
2301
|
+
"404",
|
2302
|
+
"406",
|
2303
|
+
"415",
|
2304
|
+
"4XX",
|
2305
|
+
"500",
|
2306
|
+
"5XX",
|
2307
|
+
],
|
2308
|
+
retry_config=retry_config,
|
2309
|
+
)
|
2310
|
+
|
2311
|
+
response_data: Any = None
|
2312
|
+
if utils.match_response(http_res, "201", "*"):
|
2313
|
+
return
|
2314
|
+
if utils.match_response(
|
2315
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
2316
|
+
):
|
2317
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2318
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2319
|
+
if utils.match_response(http_res, "500", "application/json"):
|
2320
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2321
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2322
|
+
if utils.match_response(http_res, ["415", "4XX"], "*"):
|
2323
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
2324
|
+
raise errors.EgainDefaultError(
|
2325
|
+
"API error occurred", http_res, http_res_text
|
2326
|
+
)
|
2327
|
+
if utils.match_response(http_res, "5XX", "*"):
|
2328
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
2329
|
+
raise errors.EgainDefaultError(
|
2330
|
+
"API error occurred", http_res, http_res_text
|
2331
|
+
)
|
2332
|
+
|
2333
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
2334
|
+
|
2335
|
+
def reject_gh_solution(
|
2336
|
+
self,
|
2337
|
+
*,
|
2338
|
+
accept_language: models.AcceptLanguage,
|
2339
|
+
portal_id: str,
|
2340
|
+
case_id: str,
|
2341
|
+
id: str,
|
2342
|
+
name: str,
|
2343
|
+
profile_id: str,
|
2344
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
2345
|
+
server_url: Optional[str] = None,
|
2346
|
+
timeout_ms: Optional[int] = None,
|
2347
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
2348
|
+
):
|
2349
|
+
r"""Reject Solution
|
2350
|
+
|
2351
|
+
## Overview
|
2352
|
+
The Reject Solution API can be used to reject and add negative score to a solution of a Guided Help case.
|
2353
|
+
|
2354
|
+
## Prerequisites
|
2355
|
+
* A Guided Help search session must be started before invoking this API.
|
2356
|
+
|
2357
|
+
|
2358
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
2359
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
2360
|
+
:param case_id: The numerical ID of the Case for which details is to be fetched.
|
2361
|
+
:param id: The numerical ID of the Casebase Release.
|
2362
|
+
:param name: name of the case or article
|
2363
|
+
:param profile_id: The ID of the guided help profile.<br> 1 will always be the **system profile**.
|
2364
|
+
:param retries: Override the default retry configuration for this method
|
2365
|
+
:param server_url: Override the default server URL for this method
|
2366
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
2367
|
+
:param http_headers: Additional headers to set or replace on requests.
|
2368
|
+
"""
|
2369
|
+
base_url = None
|
2370
|
+
url_variables = None
|
2371
|
+
if timeout_ms is None:
|
2372
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
2373
|
+
|
2374
|
+
if server_url is not None:
|
2375
|
+
base_url = server_url
|
2376
|
+
else:
|
2377
|
+
base_url = self._get_url(base_url, url_variables)
|
2378
|
+
|
2379
|
+
request = models.RejectGHSolutionRequest(
|
2380
|
+
accept_language=accept_language,
|
2381
|
+
portal_id=portal_id,
|
2382
|
+
case_id=case_id,
|
2383
|
+
quickpick_rating=models.QuickpickRating(
|
2384
|
+
id=id,
|
2385
|
+
name=name,
|
2386
|
+
profile_id=profile_id,
|
2387
|
+
),
|
2388
|
+
)
|
2389
|
+
|
2390
|
+
req = self._build_request(
|
2391
|
+
method="POST",
|
2392
|
+
path="/portals/{portalID}/gh/cases/{caseID}/reject",
|
2393
|
+
base_url=base_url,
|
2394
|
+
url_variables=url_variables,
|
2395
|
+
request=request,
|
2396
|
+
request_body_required=True,
|
2397
|
+
request_has_path_params=True,
|
2398
|
+
request_has_query_params=True,
|
2399
|
+
user_agent_header="user-agent",
|
2400
|
+
accept_header_value="application/json",
|
2401
|
+
http_headers=http_headers,
|
2402
|
+
security=self.sdk_configuration.security,
|
2403
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
2404
|
+
request.quickpick_rating, False, False, "json", models.QuickpickRating
|
2405
|
+
),
|
2406
|
+
timeout_ms=timeout_ms,
|
2407
|
+
)
|
2408
|
+
|
2409
|
+
if retries == UNSET:
|
2410
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
2411
|
+
retries = self.sdk_configuration.retry_config
|
2412
|
+
|
2413
|
+
retry_config = None
|
2414
|
+
if isinstance(retries, utils.RetryConfig):
|
2415
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
2416
|
+
|
2417
|
+
http_res = self.do_request(
|
2418
|
+
hook_ctx=HookContext(
|
2419
|
+
config=self.sdk_configuration,
|
2420
|
+
base_url=base_url or "",
|
2421
|
+
operation_id="rejectGHSolution",
|
2422
|
+
oauth2_scopes=[],
|
2423
|
+
security_source=get_security_from_env(
|
2424
|
+
self.sdk_configuration.security, models.Security
|
2425
|
+
),
|
2426
|
+
),
|
2427
|
+
request=req,
|
2428
|
+
error_status_codes=[
|
2429
|
+
"400",
|
2430
|
+
"401",
|
2431
|
+
"403",
|
2432
|
+
"404",
|
2433
|
+
"406",
|
2434
|
+
"415",
|
2435
|
+
"4XX",
|
2436
|
+
"500",
|
2437
|
+
"5XX",
|
2438
|
+
],
|
2439
|
+
retry_config=retry_config,
|
2440
|
+
)
|
2441
|
+
|
2442
|
+
response_data: Any = None
|
2443
|
+
if utils.match_response(http_res, "201", "*"):
|
2444
|
+
return
|
2445
|
+
if utils.match_response(
|
2446
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
2447
|
+
):
|
2448
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2449
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2450
|
+
if utils.match_response(http_res, "500", "application/json"):
|
2451
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2452
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2453
|
+
if utils.match_response(http_res, ["415", "4XX"], "*"):
|
2454
|
+
http_res_text = utils.stream_to_text(http_res)
|
2455
|
+
raise errors.EgainDefaultError(
|
2456
|
+
"API error occurred", http_res, http_res_text
|
2457
|
+
)
|
2458
|
+
if utils.match_response(http_res, "5XX", "*"):
|
2459
|
+
http_res_text = utils.stream_to_text(http_res)
|
2460
|
+
raise errors.EgainDefaultError(
|
2461
|
+
"API error occurred", http_res, http_res_text
|
2462
|
+
)
|
2463
|
+
|
2464
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
2465
|
+
|
2466
|
+
async def reject_gh_solution_async(
|
2467
|
+
self,
|
2468
|
+
*,
|
2469
|
+
accept_language: models.AcceptLanguage,
|
2470
|
+
portal_id: str,
|
2471
|
+
case_id: str,
|
2472
|
+
id: str,
|
2473
|
+
name: str,
|
2474
|
+
profile_id: str,
|
2475
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
2476
|
+
server_url: Optional[str] = None,
|
2477
|
+
timeout_ms: Optional[int] = None,
|
2478
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
2479
|
+
):
|
2480
|
+
r"""Reject Solution
|
2481
|
+
|
2482
|
+
## Overview
|
2483
|
+
The Reject Solution API can be used to reject and add negative score to a solution of a Guided Help case.
|
2484
|
+
|
2485
|
+
## Prerequisites
|
2486
|
+
* A Guided Help search session must be started before invoking this API.
|
2487
|
+
|
2488
|
+
|
2489
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
2490
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
2491
|
+
:param case_id: The numerical ID of the Case for which details is to be fetched.
|
2492
|
+
:param id: The numerical ID of the Casebase Release.
|
2493
|
+
:param name: name of the case or article
|
2494
|
+
:param profile_id: The ID of the guided help profile.<br> 1 will always be the **system profile**.
|
2495
|
+
:param retries: Override the default retry configuration for this method
|
2496
|
+
:param server_url: Override the default server URL for this method
|
2497
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
2498
|
+
:param http_headers: Additional headers to set or replace on requests.
|
2499
|
+
"""
|
2500
|
+
base_url = None
|
2501
|
+
url_variables = None
|
2502
|
+
if timeout_ms is None:
|
2503
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
2504
|
+
|
2505
|
+
if server_url is not None:
|
2506
|
+
base_url = server_url
|
2507
|
+
else:
|
2508
|
+
base_url = self._get_url(base_url, url_variables)
|
2509
|
+
|
2510
|
+
request = models.RejectGHSolutionRequest(
|
2511
|
+
accept_language=accept_language,
|
2512
|
+
portal_id=portal_id,
|
2513
|
+
case_id=case_id,
|
2514
|
+
quickpick_rating=models.QuickpickRating(
|
2515
|
+
id=id,
|
2516
|
+
name=name,
|
2517
|
+
profile_id=profile_id,
|
2518
|
+
),
|
2519
|
+
)
|
2520
|
+
|
2521
|
+
req = self._build_request_async(
|
2522
|
+
method="POST",
|
2523
|
+
path="/portals/{portalID}/gh/cases/{caseID}/reject",
|
2524
|
+
base_url=base_url,
|
2525
|
+
url_variables=url_variables,
|
2526
|
+
request=request,
|
2527
|
+
request_body_required=True,
|
2528
|
+
request_has_path_params=True,
|
2529
|
+
request_has_query_params=True,
|
2530
|
+
user_agent_header="user-agent",
|
2531
|
+
accept_header_value="application/json",
|
2532
|
+
http_headers=http_headers,
|
2533
|
+
security=self.sdk_configuration.security,
|
2534
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
2535
|
+
request.quickpick_rating, False, False, "json", models.QuickpickRating
|
2536
|
+
),
|
2537
|
+
timeout_ms=timeout_ms,
|
2538
|
+
)
|
2539
|
+
|
2540
|
+
if retries == UNSET:
|
2541
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
2542
|
+
retries = self.sdk_configuration.retry_config
|
2543
|
+
|
2544
|
+
retry_config = None
|
2545
|
+
if isinstance(retries, utils.RetryConfig):
|
2546
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
2547
|
+
|
2548
|
+
http_res = await self.do_request_async(
|
2549
|
+
hook_ctx=HookContext(
|
2550
|
+
config=self.sdk_configuration,
|
2551
|
+
base_url=base_url or "",
|
2552
|
+
operation_id="rejectGHSolution",
|
2553
|
+
oauth2_scopes=[],
|
2554
|
+
security_source=get_security_from_env(
|
2555
|
+
self.sdk_configuration.security, models.Security
|
2556
|
+
),
|
2557
|
+
),
|
2558
|
+
request=req,
|
2559
|
+
error_status_codes=[
|
2560
|
+
"400",
|
2561
|
+
"401",
|
2562
|
+
"403",
|
2563
|
+
"404",
|
2564
|
+
"406",
|
2565
|
+
"415",
|
2566
|
+
"4XX",
|
2567
|
+
"500",
|
2568
|
+
"5XX",
|
2569
|
+
],
|
2570
|
+
retry_config=retry_config,
|
2571
|
+
)
|
2572
|
+
|
2573
|
+
response_data: Any = None
|
2574
|
+
if utils.match_response(http_res, "201", "*"):
|
2575
|
+
return
|
2576
|
+
if utils.match_response(
|
2577
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
2578
|
+
):
|
2579
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2580
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2581
|
+
if utils.match_response(http_res, "500", "application/json"):
|
2582
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2583
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2584
|
+
if utils.match_response(http_res, ["415", "4XX"], "*"):
|
2585
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
2586
|
+
raise errors.EgainDefaultError(
|
2587
|
+
"API error occurred", http_res, http_res_text
|
2588
|
+
)
|
2589
|
+
if utils.match_response(http_res, "5XX", "*"):
|
2590
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
2591
|
+
raise errors.EgainDefaultError(
|
2592
|
+
"API error occurred", http_res, http_res_text
|
2593
|
+
)
|
2594
|
+
|
2595
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
2596
|
+
|
2597
|
+
def create_quickpick(
|
2598
|
+
self,
|
2599
|
+
*,
|
2600
|
+
accept_language: models.AcceptLanguage,
|
2601
|
+
portal_id: str,
|
2602
|
+
casebase_release_id: str,
|
2603
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
2604
|
+
name: Optional[str] = None,
|
2605
|
+
comment: Optional[str] = None,
|
2606
|
+
link_to_activity: Optional[bool] = None,
|
2607
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
2608
|
+
server_url: Optional[str] = None,
|
2609
|
+
timeout_ms: Optional[int] = None,
|
2610
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
2611
|
+
):
|
2612
|
+
r"""Create Quickpick
|
2613
|
+
|
2614
|
+
## Overview
|
2615
|
+
The Create Quickpick API can be used to create a new quickpick(bookmark) for current Guided Help search session.
|
2616
|
+
|
2617
|
+
Note: If \"linkToActivity\" attribute is passed as true in request body then one of below must be passed in header
|
2618
|
+
* <code>XEgainTenantId</code>
|
2619
|
+
* <code>xEgainActivityId</code>
|
2620
|
+
* <code>XInteractionId</code>
|
2621
|
+
|
2622
|
+
## Prerequisites
|
2623
|
+
* A Guided Help search session must be in progress before this API is invoked.
|
2624
|
+
* QuickPick can only be created for a live release of a Casebase.
|
2625
|
+
|
2626
|
+
|
2627
|
+
|
2628
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
2629
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
2630
|
+
:param casebase_release_id: The numerical ID of Live release of the Casebase.
|
2631
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
2632
|
+
:param name: name of the quick pick
|
2633
|
+
:param comment: comment about quick pick
|
2634
|
+
:param link_to_activity: indicates if quickpick is to be linked with activity
|
2635
|
+
:param retries: Override the default retry configuration for this method
|
2636
|
+
:param server_url: Override the default server URL for this method
|
2637
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
2638
|
+
:param http_headers: Additional headers to set or replace on requests.
|
2639
|
+
"""
|
2640
|
+
base_url = None
|
2641
|
+
url_variables = None
|
2642
|
+
if timeout_ms is None:
|
2643
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
2644
|
+
|
2645
|
+
if server_url is not None:
|
2646
|
+
base_url = server_url
|
2647
|
+
else:
|
2648
|
+
base_url = self._get_url(base_url, url_variables)
|
2649
|
+
|
2650
|
+
request = models.CreateQuickpickRequest(
|
2651
|
+
accept_language=accept_language,
|
2652
|
+
portal_id=portal_id,
|
2653
|
+
language=language,
|
2654
|
+
create_quickpick=models.CreateQuickpick(
|
2655
|
+
name=name,
|
2656
|
+
comment=comment,
|
2657
|
+
casebase_release_id=casebase_release_id,
|
2658
|
+
link_to_activity=link_to_activity,
|
2659
|
+
),
|
2660
|
+
)
|
2661
|
+
|
2662
|
+
req = self._build_request(
|
2663
|
+
method="POST",
|
2664
|
+
path="/portals/{portalID}/gh/quickpicks",
|
2665
|
+
base_url=base_url,
|
2666
|
+
url_variables=url_variables,
|
2667
|
+
request=request,
|
2668
|
+
request_body_required=True,
|
2669
|
+
request_has_path_params=True,
|
2670
|
+
request_has_query_params=True,
|
2671
|
+
user_agent_header="user-agent",
|
2672
|
+
accept_header_value="application/json",
|
2673
|
+
http_headers=http_headers,
|
2674
|
+
security=self.sdk_configuration.security,
|
2675
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
2676
|
+
request.create_quickpick, False, False, "json", models.CreateQuickpick
|
2677
|
+
),
|
2678
|
+
timeout_ms=timeout_ms,
|
2679
|
+
)
|
2680
|
+
|
2681
|
+
if retries == UNSET:
|
2682
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
2683
|
+
retries = self.sdk_configuration.retry_config
|
2684
|
+
|
2685
|
+
retry_config = None
|
2686
|
+
if isinstance(retries, utils.RetryConfig):
|
2687
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
2688
|
+
|
2689
|
+
http_res = self.do_request(
|
2690
|
+
hook_ctx=HookContext(
|
2691
|
+
config=self.sdk_configuration,
|
2692
|
+
base_url=base_url or "",
|
2693
|
+
operation_id="createQuickpick",
|
2694
|
+
oauth2_scopes=[],
|
2695
|
+
security_source=get_security_from_env(
|
2696
|
+
self.sdk_configuration.security, models.Security
|
2697
|
+
),
|
2698
|
+
),
|
2699
|
+
request=req,
|
2700
|
+
error_status_codes=[
|
2701
|
+
"400",
|
2702
|
+
"401",
|
2703
|
+
"403",
|
2704
|
+
"404",
|
2705
|
+
"406",
|
2706
|
+
"415",
|
2707
|
+
"4XX",
|
2708
|
+
"500",
|
2709
|
+
"5XX",
|
2710
|
+
],
|
2711
|
+
retry_config=retry_config,
|
2712
|
+
)
|
2713
|
+
|
2714
|
+
response_data: Any = None
|
2715
|
+
if utils.match_response(http_res, "201", "*"):
|
2716
|
+
return
|
2717
|
+
if utils.match_response(
|
2718
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
2719
|
+
):
|
2720
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2721
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2722
|
+
if utils.match_response(http_res, "500", "application/json"):
|
2723
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2724
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2725
|
+
if utils.match_response(http_res, ["415", "4XX"], "*"):
|
2726
|
+
http_res_text = utils.stream_to_text(http_res)
|
2727
|
+
raise errors.EgainDefaultError(
|
2728
|
+
"API error occurred", http_res, http_res_text
|
2729
|
+
)
|
2730
|
+
if utils.match_response(http_res, "5XX", "*"):
|
2731
|
+
http_res_text = utils.stream_to_text(http_res)
|
2732
|
+
raise errors.EgainDefaultError(
|
2733
|
+
"API error occurred", http_res, http_res_text
|
2734
|
+
)
|
2735
|
+
|
2736
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
2737
|
+
|
2738
|
+
async def create_quickpick_async(
|
2739
|
+
self,
|
2740
|
+
*,
|
2741
|
+
accept_language: models.AcceptLanguage,
|
2742
|
+
portal_id: str,
|
2743
|
+
casebase_release_id: str,
|
2744
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
2745
|
+
name: Optional[str] = None,
|
2746
|
+
comment: Optional[str] = None,
|
2747
|
+
link_to_activity: Optional[bool] = None,
|
2748
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
2749
|
+
server_url: Optional[str] = None,
|
2750
|
+
timeout_ms: Optional[int] = None,
|
2751
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
2752
|
+
):
|
2753
|
+
r"""Create Quickpick
|
2754
|
+
|
2755
|
+
## Overview
|
2756
|
+
The Create Quickpick API can be used to create a new quickpick(bookmark) for current Guided Help search session.
|
2757
|
+
|
2758
|
+
Note: If \"linkToActivity\" attribute is passed as true in request body then one of below must be passed in header
|
2759
|
+
* <code>XEgainTenantId</code>
|
2760
|
+
* <code>xEgainActivityId</code>
|
2761
|
+
* <code>XInteractionId</code>
|
2762
|
+
|
2763
|
+
## Prerequisites
|
2764
|
+
* A Guided Help search session must be in progress before this API is invoked.
|
2765
|
+
* QuickPick can only be created for a live release of a Casebase.
|
2766
|
+
|
2767
|
+
|
2768
|
+
|
2769
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
2770
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
2771
|
+
:param casebase_release_id: The numerical ID of Live release of the Casebase.
|
2772
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
2773
|
+
:param name: name of the quick pick
|
2774
|
+
:param comment: comment about quick pick
|
2775
|
+
:param link_to_activity: indicates if quickpick is to be linked with activity
|
2776
|
+
:param retries: Override the default retry configuration for this method
|
2777
|
+
:param server_url: Override the default server URL for this method
|
2778
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
2779
|
+
:param http_headers: Additional headers to set or replace on requests.
|
2780
|
+
"""
|
2781
|
+
base_url = None
|
2782
|
+
url_variables = None
|
2783
|
+
if timeout_ms is None:
|
2784
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
2785
|
+
|
2786
|
+
if server_url is not None:
|
2787
|
+
base_url = server_url
|
2788
|
+
else:
|
2789
|
+
base_url = self._get_url(base_url, url_variables)
|
2790
|
+
|
2791
|
+
request = models.CreateQuickpickRequest(
|
2792
|
+
accept_language=accept_language,
|
2793
|
+
portal_id=portal_id,
|
2794
|
+
language=language,
|
2795
|
+
create_quickpick=models.CreateQuickpick(
|
2796
|
+
name=name,
|
2797
|
+
comment=comment,
|
2798
|
+
casebase_release_id=casebase_release_id,
|
2799
|
+
link_to_activity=link_to_activity,
|
2800
|
+
),
|
2801
|
+
)
|
2802
|
+
|
2803
|
+
req = self._build_request_async(
|
2804
|
+
method="POST",
|
2805
|
+
path="/portals/{portalID}/gh/quickpicks",
|
2806
|
+
base_url=base_url,
|
2807
|
+
url_variables=url_variables,
|
2808
|
+
request=request,
|
2809
|
+
request_body_required=True,
|
2810
|
+
request_has_path_params=True,
|
2811
|
+
request_has_query_params=True,
|
2812
|
+
user_agent_header="user-agent",
|
2813
|
+
accept_header_value="application/json",
|
2814
|
+
http_headers=http_headers,
|
2815
|
+
security=self.sdk_configuration.security,
|
2816
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
2817
|
+
request.create_quickpick, False, False, "json", models.CreateQuickpick
|
2818
|
+
),
|
2819
|
+
timeout_ms=timeout_ms,
|
2820
|
+
)
|
2821
|
+
|
2822
|
+
if retries == UNSET:
|
2823
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
2824
|
+
retries = self.sdk_configuration.retry_config
|
2825
|
+
|
2826
|
+
retry_config = None
|
2827
|
+
if isinstance(retries, utils.RetryConfig):
|
2828
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
2829
|
+
|
2830
|
+
http_res = await self.do_request_async(
|
2831
|
+
hook_ctx=HookContext(
|
2832
|
+
config=self.sdk_configuration,
|
2833
|
+
base_url=base_url or "",
|
2834
|
+
operation_id="createQuickpick",
|
2835
|
+
oauth2_scopes=[],
|
2836
|
+
security_source=get_security_from_env(
|
2837
|
+
self.sdk_configuration.security, models.Security
|
2838
|
+
),
|
2839
|
+
),
|
2840
|
+
request=req,
|
2841
|
+
error_status_codes=[
|
2842
|
+
"400",
|
2843
|
+
"401",
|
2844
|
+
"403",
|
2845
|
+
"404",
|
2846
|
+
"406",
|
2847
|
+
"415",
|
2848
|
+
"4XX",
|
2849
|
+
"500",
|
2850
|
+
"5XX",
|
2851
|
+
],
|
2852
|
+
retry_config=retry_config,
|
2853
|
+
)
|
2854
|
+
|
2855
|
+
response_data: Any = None
|
2856
|
+
if utils.match_response(http_res, "201", "*"):
|
2857
|
+
return
|
2858
|
+
if utils.match_response(
|
2859
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
2860
|
+
):
|
2861
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2862
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2863
|
+
if utils.match_response(http_res, "500", "application/json"):
|
2864
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2865
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2866
|
+
if utils.match_response(http_res, ["415", "4XX"], "*"):
|
2867
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
2868
|
+
raise errors.EgainDefaultError(
|
2869
|
+
"API error occurred", http_res, http_res_text
|
2870
|
+
)
|
2871
|
+
if utils.match_response(http_res, "5XX", "*"):
|
2872
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
2873
|
+
raise errors.EgainDefaultError(
|
2874
|
+
"API error occurred", http_res, http_res_text
|
2875
|
+
)
|
2876
|
+
|
2877
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
2878
|
+
|
2879
|
+
def get_all_quick_picks(
|
2880
|
+
self,
|
2881
|
+
*,
|
2882
|
+
accept_language: models.AcceptLanguage,
|
2883
|
+
casebase_release_id: str,
|
2884
|
+
portal_id: str,
|
2885
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
2886
|
+
pagenum: Optional[int] = 1,
|
2887
|
+
pagesize: Optional[int] = 10,
|
2888
|
+
get_last_saved_quick_pick_for_interaction: Optional[bool] = None,
|
2889
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
2890
|
+
server_url: Optional[str] = None,
|
2891
|
+
timeout_ms: Optional[int] = None,
|
2892
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
2893
|
+
) -> Optional[models.QuickpickResults]:
|
2894
|
+
r"""Get All Quickpicks for a Portal
|
2895
|
+
|
2896
|
+
## Overview
|
2897
|
+
The Get All Quickpicks for a Portal API retrieves details of quickpicks created for the Casebase.
|
2898
|
+
|
2899
|
+
## Conditions
|
2900
|
+
If \"getLastSavedQuickPickForInteraction\" query parameter is passed as \"Yes\" then one of below must be passed in request header.
|
2901
|
+
* X-ext-integration-id
|
2902
|
+
* X-egain-activity-id
|
2903
|
+
* X-ext-interaction-id
|
2904
|
+
Either casebaseID or getLastSavedQuickPickForInteraction must be passed in request.
|
2905
|
+
|
2906
|
+
|
2907
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
2908
|
+
:param casebase_release_id: The numerical ID of the Casebase Release for which details is to be fetched.
|
2909
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
2910
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
2911
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
2912
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
2913
|
+
:param get_last_saved_quick_pick_for_interaction: To be passed retrieve quickpick associated with interaction.
|
2914
|
+
:param retries: Override the default retry configuration for this method
|
2915
|
+
:param server_url: Override the default server URL for this method
|
2916
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
2917
|
+
:param http_headers: Additional headers to set or replace on requests.
|
2918
|
+
"""
|
2919
|
+
base_url = None
|
2920
|
+
url_variables = None
|
2921
|
+
if timeout_ms is None:
|
2922
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
2923
|
+
|
2924
|
+
if server_url is not None:
|
2925
|
+
base_url = server_url
|
2926
|
+
else:
|
2927
|
+
base_url = self._get_url(base_url, url_variables)
|
2928
|
+
|
2929
|
+
request = models.GetAllQuickPicksRequest(
|
2930
|
+
accept_language=accept_language,
|
2931
|
+
casebase_release_id=casebase_release_id,
|
2932
|
+
portal_id=portal_id,
|
2933
|
+
language=language,
|
2934
|
+
pagenum=pagenum,
|
2935
|
+
pagesize=pagesize,
|
2936
|
+
get_last_saved_quick_pick_for_interaction=get_last_saved_quick_pick_for_interaction,
|
2937
|
+
)
|
2938
|
+
|
2939
|
+
req = self._build_request(
|
2940
|
+
method="GET",
|
2941
|
+
path="/portals/{portalID}/gh/quickpicks",
|
2942
|
+
base_url=base_url,
|
2943
|
+
url_variables=url_variables,
|
2944
|
+
request=request,
|
2945
|
+
request_body_required=False,
|
2946
|
+
request_has_path_params=True,
|
2947
|
+
request_has_query_params=True,
|
2948
|
+
user_agent_header="user-agent",
|
2949
|
+
accept_header_value="application/json",
|
2950
|
+
http_headers=http_headers,
|
2951
|
+
security=self.sdk_configuration.security,
|
2952
|
+
timeout_ms=timeout_ms,
|
2953
|
+
)
|
2954
|
+
|
2955
|
+
if retries == UNSET:
|
2956
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
2957
|
+
retries = self.sdk_configuration.retry_config
|
2958
|
+
|
2959
|
+
retry_config = None
|
2960
|
+
if isinstance(retries, utils.RetryConfig):
|
2961
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
2962
|
+
|
2963
|
+
http_res = self.do_request(
|
2964
|
+
hook_ctx=HookContext(
|
2965
|
+
config=self.sdk_configuration,
|
2966
|
+
base_url=base_url or "",
|
2967
|
+
operation_id="getAllQuickPicks",
|
2968
|
+
oauth2_scopes=[],
|
2969
|
+
security_source=get_security_from_env(
|
2970
|
+
self.sdk_configuration.security, models.Security
|
2971
|
+
),
|
2972
|
+
),
|
2973
|
+
request=req,
|
2974
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
2975
|
+
retry_config=retry_config,
|
2976
|
+
)
|
2977
|
+
|
2978
|
+
response_data: Any = None
|
2979
|
+
if utils.match_response(http_res, "200", "application/json"):
|
2980
|
+
return unmarshal_json_response(models.QuickpickResults, http_res)
|
2981
|
+
if utils.match_response(http_res, "204", "*"):
|
2982
|
+
return None
|
2983
|
+
if utils.match_response(
|
2984
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
2985
|
+
):
|
2986
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2987
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2988
|
+
if utils.match_response(http_res, "500", "application/json"):
|
2989
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
2990
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
2991
|
+
if utils.match_response(http_res, "4XX", "*"):
|
2992
|
+
http_res_text = utils.stream_to_text(http_res)
|
2993
|
+
raise errors.EgainDefaultError(
|
2994
|
+
"API error occurred", http_res, http_res_text
|
2995
|
+
)
|
2996
|
+
if utils.match_response(http_res, "5XX", "*"):
|
2997
|
+
http_res_text = utils.stream_to_text(http_res)
|
2998
|
+
raise errors.EgainDefaultError(
|
2999
|
+
"API error occurred", http_res, http_res_text
|
3000
|
+
)
|
3001
|
+
|
3002
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
3003
|
+
|
3004
|
+
async def get_all_quick_picks_async(
|
3005
|
+
self,
|
3006
|
+
*,
|
3007
|
+
accept_language: models.AcceptLanguage,
|
3008
|
+
casebase_release_id: str,
|
3009
|
+
portal_id: str,
|
3010
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
3011
|
+
pagenum: Optional[int] = 1,
|
3012
|
+
pagesize: Optional[int] = 10,
|
3013
|
+
get_last_saved_quick_pick_for_interaction: Optional[bool] = None,
|
3014
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
3015
|
+
server_url: Optional[str] = None,
|
3016
|
+
timeout_ms: Optional[int] = None,
|
3017
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
3018
|
+
) -> Optional[models.QuickpickResults]:
|
3019
|
+
r"""Get All Quickpicks for a Portal
|
3020
|
+
|
3021
|
+
## Overview
|
3022
|
+
The Get All Quickpicks for a Portal API retrieves details of quickpicks created for the Casebase.
|
3023
|
+
|
3024
|
+
## Conditions
|
3025
|
+
If \"getLastSavedQuickPickForInteraction\" query parameter is passed as \"Yes\" then one of below must be passed in request header.
|
3026
|
+
* X-ext-integration-id
|
3027
|
+
* X-egain-activity-id
|
3028
|
+
* X-ext-interaction-id
|
3029
|
+
Either casebaseID or getLastSavedQuickPickForInteraction must be passed in request.
|
3030
|
+
|
3031
|
+
|
3032
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
3033
|
+
:param casebase_release_id: The numerical ID of the Casebase Release for which details is to be fetched.
|
3034
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
3035
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
3036
|
+
:param pagenum: Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.
|
3037
|
+
:param pagesize: Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
|
3038
|
+
:param get_last_saved_quick_pick_for_interaction: To be passed retrieve quickpick associated with interaction.
|
3039
|
+
:param retries: Override the default retry configuration for this method
|
3040
|
+
:param server_url: Override the default server URL for this method
|
3041
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
3042
|
+
:param http_headers: Additional headers to set or replace on requests.
|
3043
|
+
"""
|
3044
|
+
base_url = None
|
3045
|
+
url_variables = None
|
3046
|
+
if timeout_ms is None:
|
3047
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
3048
|
+
|
3049
|
+
if server_url is not None:
|
3050
|
+
base_url = server_url
|
3051
|
+
else:
|
3052
|
+
base_url = self._get_url(base_url, url_variables)
|
3053
|
+
|
3054
|
+
request = models.GetAllQuickPicksRequest(
|
3055
|
+
accept_language=accept_language,
|
3056
|
+
casebase_release_id=casebase_release_id,
|
3057
|
+
portal_id=portal_id,
|
3058
|
+
language=language,
|
3059
|
+
pagenum=pagenum,
|
3060
|
+
pagesize=pagesize,
|
3061
|
+
get_last_saved_quick_pick_for_interaction=get_last_saved_quick_pick_for_interaction,
|
3062
|
+
)
|
3063
|
+
|
3064
|
+
req = self._build_request_async(
|
3065
|
+
method="GET",
|
3066
|
+
path="/portals/{portalID}/gh/quickpicks",
|
3067
|
+
base_url=base_url,
|
3068
|
+
url_variables=url_variables,
|
3069
|
+
request=request,
|
3070
|
+
request_body_required=False,
|
3071
|
+
request_has_path_params=True,
|
3072
|
+
request_has_query_params=True,
|
3073
|
+
user_agent_header="user-agent",
|
3074
|
+
accept_header_value="application/json",
|
3075
|
+
http_headers=http_headers,
|
3076
|
+
security=self.sdk_configuration.security,
|
3077
|
+
timeout_ms=timeout_ms,
|
3078
|
+
)
|
3079
|
+
|
3080
|
+
if retries == UNSET:
|
3081
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
3082
|
+
retries = self.sdk_configuration.retry_config
|
3083
|
+
|
3084
|
+
retry_config = None
|
3085
|
+
if isinstance(retries, utils.RetryConfig):
|
3086
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
3087
|
+
|
3088
|
+
http_res = await self.do_request_async(
|
3089
|
+
hook_ctx=HookContext(
|
3090
|
+
config=self.sdk_configuration,
|
3091
|
+
base_url=base_url or "",
|
3092
|
+
operation_id="getAllQuickPicks",
|
3093
|
+
oauth2_scopes=[],
|
3094
|
+
security_source=get_security_from_env(
|
3095
|
+
self.sdk_configuration.security, models.Security
|
3096
|
+
),
|
3097
|
+
),
|
3098
|
+
request=req,
|
3099
|
+
error_status_codes=["400", "401", "403", "404", "406", "4XX", "500", "5XX"],
|
3100
|
+
retry_config=retry_config,
|
3101
|
+
)
|
3102
|
+
|
3103
|
+
response_data: Any = None
|
3104
|
+
if utils.match_response(http_res, "200", "application/json"):
|
3105
|
+
return unmarshal_json_response(models.QuickpickResults, http_res)
|
3106
|
+
if utils.match_response(http_res, "204", "*"):
|
3107
|
+
return None
|
3108
|
+
if utils.match_response(
|
3109
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
3110
|
+
):
|
3111
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
3112
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
3113
|
+
if utils.match_response(http_res, "500", "application/json"):
|
3114
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
3115
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
3116
|
+
if utils.match_response(http_res, "4XX", "*"):
|
3117
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
3118
|
+
raise errors.EgainDefaultError(
|
3119
|
+
"API error occurred", http_res, http_res_text
|
3120
|
+
)
|
3121
|
+
if utils.match_response(http_res, "5XX", "*"):
|
3122
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
3123
|
+
raise errors.EgainDefaultError(
|
3124
|
+
"API error occurred", http_res, http_res_text
|
3125
|
+
)
|
3126
|
+
|
3127
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
3128
|
+
|
3129
|
+
def restore_quickpick(
|
3130
|
+
self,
|
3131
|
+
*,
|
3132
|
+
accept_language: models.AcceptLanguage,
|
3133
|
+
portal_id: str,
|
3134
|
+
quickpick_id: str,
|
3135
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
3136
|
+
gh_custom_additional_attributes: Optional[str] = None,
|
3137
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
3138
|
+
server_url: Optional[str] = None,
|
3139
|
+
timeout_ms: Optional[int] = None,
|
3140
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
3141
|
+
) -> models.GHSearchResult:
|
3142
|
+
r"""Resume a Quickpick
|
3143
|
+
|
3144
|
+
## Overview
|
3145
|
+
The Resume a Quickpick API can be used to restore (resume) a specific quickpick.
|
3146
|
+
|
3147
|
+
## Prerequisites
|
3148
|
+
* A Guided Help session for the Casebase must be started before invoking this API.
|
3149
|
+
|
3150
|
+
|
3151
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
3152
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
3153
|
+
:param quickpick_id: The ID of the quickpick.
|
3154
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
3155
|
+
:param gh_custom_additional_attributes:
|
3156
|
+
:param retries: Override the default retry configuration for this method
|
3157
|
+
:param server_url: Override the default server URL for this method
|
3158
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
3159
|
+
:param http_headers: Additional headers to set or replace on requests.
|
3160
|
+
"""
|
3161
|
+
base_url = None
|
3162
|
+
url_variables = None
|
3163
|
+
if timeout_ms is None:
|
3164
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
3165
|
+
|
3166
|
+
if server_url is not None:
|
3167
|
+
base_url = server_url
|
3168
|
+
else:
|
3169
|
+
base_url = self._get_url(base_url, url_variables)
|
3170
|
+
|
3171
|
+
request = models.RestoreQuickpickRequest(
|
3172
|
+
accept_language=accept_language,
|
3173
|
+
portal_id=portal_id,
|
3174
|
+
quickpick_id=quickpick_id,
|
3175
|
+
language=language,
|
3176
|
+
gh_custom_additional_attributes=gh_custom_additional_attributes,
|
3177
|
+
)
|
3178
|
+
|
3179
|
+
req = self._build_request(
|
3180
|
+
method="POST",
|
3181
|
+
path="/portals/{portalID}/gh/quickpicks/{quickpickID}",
|
3182
|
+
base_url=base_url,
|
3183
|
+
url_variables=url_variables,
|
3184
|
+
request=request,
|
3185
|
+
request_body_required=False,
|
3186
|
+
request_has_path_params=True,
|
3187
|
+
request_has_query_params=True,
|
3188
|
+
user_agent_header="user-agent",
|
3189
|
+
accept_header_value="application/json",
|
3190
|
+
http_headers=http_headers,
|
3191
|
+
security=self.sdk_configuration.security,
|
3192
|
+
timeout_ms=timeout_ms,
|
3193
|
+
)
|
3194
|
+
|
3195
|
+
if retries == UNSET:
|
3196
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
3197
|
+
retries = self.sdk_configuration.retry_config
|
3198
|
+
|
3199
|
+
retry_config = None
|
3200
|
+
if isinstance(retries, utils.RetryConfig):
|
3201
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
3202
|
+
|
3203
|
+
http_res = self.do_request(
|
3204
|
+
hook_ctx=HookContext(
|
3205
|
+
config=self.sdk_configuration,
|
3206
|
+
base_url=base_url or "",
|
3207
|
+
operation_id="restoreQuickpick",
|
3208
|
+
oauth2_scopes=[],
|
3209
|
+
security_source=get_security_from_env(
|
3210
|
+
self.sdk_configuration.security, models.Security
|
3211
|
+
),
|
3212
|
+
),
|
3213
|
+
request=req,
|
3214
|
+
error_status_codes=[
|
3215
|
+
"400",
|
3216
|
+
"401",
|
3217
|
+
"403",
|
3218
|
+
"404",
|
3219
|
+
"406",
|
3220
|
+
"415",
|
3221
|
+
"4XX",
|
3222
|
+
"500",
|
3223
|
+
"5XX",
|
3224
|
+
],
|
3225
|
+
retry_config=retry_config,
|
3226
|
+
)
|
3227
|
+
|
3228
|
+
response_data: Any = None
|
3229
|
+
if utils.match_response(http_res, "200", "application/json"):
|
3230
|
+
return unmarshal_json_response(models.GHSearchResult, http_res)
|
3231
|
+
if utils.match_response(
|
3232
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
3233
|
+
):
|
3234
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
3235
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
3236
|
+
if utils.match_response(http_res, "500", "application/json"):
|
3237
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
3238
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
3239
|
+
if utils.match_response(http_res, ["415", "4XX"], "*"):
|
3240
|
+
http_res_text = utils.stream_to_text(http_res)
|
3241
|
+
raise errors.EgainDefaultError(
|
3242
|
+
"API error occurred", http_res, http_res_text
|
3243
|
+
)
|
3244
|
+
if utils.match_response(http_res, "5XX", "*"):
|
3245
|
+
http_res_text = utils.stream_to_text(http_res)
|
3246
|
+
raise errors.EgainDefaultError(
|
3247
|
+
"API error occurred", http_res, http_res_text
|
3248
|
+
)
|
3249
|
+
|
3250
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|
3251
|
+
|
3252
|
+
async def restore_quickpick_async(
|
3253
|
+
self,
|
3254
|
+
*,
|
3255
|
+
accept_language: models.AcceptLanguage,
|
3256
|
+
portal_id: str,
|
3257
|
+
quickpick_id: str,
|
3258
|
+
language: Optional[models.LanguageQueryParameter] = None,
|
3259
|
+
gh_custom_additional_attributes: Optional[str] = None,
|
3260
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
3261
|
+
server_url: Optional[str] = None,
|
3262
|
+
timeout_ms: Optional[int] = None,
|
3263
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
3264
|
+
) -> models.GHSearchResult:
|
3265
|
+
r"""Resume a Quickpick
|
3266
|
+
|
3267
|
+
## Overview
|
3268
|
+
The Resume a Quickpick API can be used to restore (resume) a specific quickpick.
|
3269
|
+
|
3270
|
+
## Prerequisites
|
3271
|
+
* A Guided Help session for the Casebase must be started before invoking this API.
|
3272
|
+
|
3273
|
+
|
3274
|
+
:param accept_language: The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).
|
3275
|
+
:param portal_id: The ID of the portal being accessed.<br><br>A portal ID is composed of a 2-4 letter prefix, followed by a dash and 4-15 digits.
|
3276
|
+
:param quickpick_id: The ID of the quickpick.
|
3277
|
+
:param language: The language that describes the details of a resource. Resources available in different languages may differ from each other.<li>If <code>lang</code> is not passed, then the portal's default language is used.</li>
|
3278
|
+
:param gh_custom_additional_attributes:
|
3279
|
+
:param retries: Override the default retry configuration for this method
|
3280
|
+
:param server_url: Override the default server URL for this method
|
3281
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
3282
|
+
:param http_headers: Additional headers to set or replace on requests.
|
3283
|
+
"""
|
3284
|
+
base_url = None
|
3285
|
+
url_variables = None
|
3286
|
+
if timeout_ms is None:
|
3287
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
3288
|
+
|
3289
|
+
if server_url is not None:
|
3290
|
+
base_url = server_url
|
3291
|
+
else:
|
3292
|
+
base_url = self._get_url(base_url, url_variables)
|
3293
|
+
|
3294
|
+
request = models.RestoreQuickpickRequest(
|
3295
|
+
accept_language=accept_language,
|
3296
|
+
portal_id=portal_id,
|
3297
|
+
quickpick_id=quickpick_id,
|
3298
|
+
language=language,
|
3299
|
+
gh_custom_additional_attributes=gh_custom_additional_attributes,
|
3300
|
+
)
|
3301
|
+
|
3302
|
+
req = self._build_request_async(
|
3303
|
+
method="POST",
|
3304
|
+
path="/portals/{portalID}/gh/quickpicks/{quickpickID}",
|
3305
|
+
base_url=base_url,
|
3306
|
+
url_variables=url_variables,
|
3307
|
+
request=request,
|
3308
|
+
request_body_required=False,
|
3309
|
+
request_has_path_params=True,
|
3310
|
+
request_has_query_params=True,
|
3311
|
+
user_agent_header="user-agent",
|
3312
|
+
accept_header_value="application/json",
|
3313
|
+
http_headers=http_headers,
|
3314
|
+
security=self.sdk_configuration.security,
|
3315
|
+
timeout_ms=timeout_ms,
|
3316
|
+
)
|
3317
|
+
|
3318
|
+
if retries == UNSET:
|
3319
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
3320
|
+
retries = self.sdk_configuration.retry_config
|
3321
|
+
|
3322
|
+
retry_config = None
|
3323
|
+
if isinstance(retries, utils.RetryConfig):
|
3324
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
3325
|
+
|
3326
|
+
http_res = await self.do_request_async(
|
3327
|
+
hook_ctx=HookContext(
|
3328
|
+
config=self.sdk_configuration,
|
3329
|
+
base_url=base_url or "",
|
3330
|
+
operation_id="restoreQuickpick",
|
3331
|
+
oauth2_scopes=[],
|
3332
|
+
security_source=get_security_from_env(
|
3333
|
+
self.sdk_configuration.security, models.Security
|
3334
|
+
),
|
3335
|
+
),
|
3336
|
+
request=req,
|
3337
|
+
error_status_codes=[
|
3338
|
+
"400",
|
3339
|
+
"401",
|
3340
|
+
"403",
|
3341
|
+
"404",
|
3342
|
+
"406",
|
3343
|
+
"415",
|
3344
|
+
"4XX",
|
3345
|
+
"500",
|
3346
|
+
"5XX",
|
3347
|
+
],
|
3348
|
+
retry_config=retry_config,
|
3349
|
+
)
|
3350
|
+
|
3351
|
+
response_data: Any = None
|
3352
|
+
if utils.match_response(http_res, "200", "application/json"):
|
3353
|
+
return unmarshal_json_response(models.GHSearchResult, http_res)
|
3354
|
+
if utils.match_response(
|
3355
|
+
http_res, ["400", "401", "403", "404", "406"], "application/json"
|
3356
|
+
):
|
3357
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
3358
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
3359
|
+
if utils.match_response(http_res, "500", "application/json"):
|
3360
|
+
response_data = unmarshal_json_response(errors.WSErrorCommonData, http_res)
|
3361
|
+
raise errors.WSErrorCommon(response_data, http_res)
|
3362
|
+
if utils.match_response(http_res, ["415", "4XX"], "*"):
|
3363
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
3364
|
+
raise errors.EgainDefaultError(
|
3365
|
+
"API error occurred", http_res, http_res_text
|
3366
|
+
)
|
3367
|
+
if utils.match_response(http_res, "5XX", "*"):
|
3368
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
3369
|
+
raise errors.EgainDefaultError(
|
3370
|
+
"API error occurred", http_res, http_res_text
|
3371
|
+
)
|
3372
|
+
|
3373
|
+
raise errors.EgainDefaultError("Unexpected response received", http_res)
|