ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.204.1

This commit is contained in:
speakeasybot
2024-03-08 01:11:10 +00:00
parent 297fdfa677
commit a19df2f413
40 changed files with 1207 additions and 991 deletions

View File

@@ -41,16 +41,16 @@ class Search:
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
url = base_url + '/hubs/search'
headers = {}
query_params = utils.get_query_params(operations.PerformSearchRequest, request)
headers['Accept'] = 'application/json'
headers['user-agent'] = self.sdk_configuration.user_agent
if callable(self.sdk_configuration.security):
client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
headers, query_params = utils.get_security(self.sdk_configuration.security())
else:
client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
headers, query_params = utils.get_security(self.sdk_configuration.security)
query_params = { **utils.get_query_params(operations.PerformSearchRequest, request), **query_params }
headers['Accept'] = 'application/json'
headers['user-agent'] = self.sdk_configuration.user_agent
client = self.sdk_configuration.client
try:
req = self.sdk_configuration.get_hooks().before_request(
@@ -72,21 +72,23 @@ class Search:
raise result
http_res = result
content_type = http_res.headers.get('Content-Type')
res = operations.PerformSearchResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
res = operations.PerformSearchResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type'), raw_response=http_res)
if http_res.status_code == 200:
pass
elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
elif http_res.status_code == 401:
if utils.match_content_type(content_type, 'application/json'):
if utils.match_content_type(http_res.headers.get('Content-Type'), 'application/json'):
out = utils.unmarshal_json(http_res.text, errors.PerformSearchResponseBody)
out.raw_response = http_res
raise out
else:
content_type = http_res.headers.get('Content-Type')
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
else:
raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res)
return res
@@ -109,16 +111,16 @@ class Search:
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
url = base_url + '/hubs/search/voice'
headers = {}
query_params = utils.get_query_params(operations.PerformVoiceSearchRequest, request)
headers['Accept'] = 'application/json'
headers['user-agent'] = self.sdk_configuration.user_agent
if callable(self.sdk_configuration.security):
client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
headers, query_params = utils.get_security(self.sdk_configuration.security())
else:
client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
headers, query_params = utils.get_security(self.sdk_configuration.security)
query_params = { **utils.get_query_params(operations.PerformVoiceSearchRequest, request), **query_params }
headers['Accept'] = 'application/json'
headers['user-agent'] = self.sdk_configuration.user_agent
client = self.sdk_configuration.client
try:
req = self.sdk_configuration.get_hooks().before_request(
@@ -140,21 +142,23 @@ class Search:
raise result
http_res = result
content_type = http_res.headers.get('Content-Type')
res = operations.PerformVoiceSearchResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
res = operations.PerformVoiceSearchResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type'), raw_response=http_res)
if http_res.status_code == 200:
pass
elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
elif http_res.status_code == 401:
if utils.match_content_type(content_type, 'application/json'):
if utils.match_content_type(http_res.headers.get('Content-Type'), 'application/json'):
out = utils.unmarshal_json(http_res.text, errors.PerformVoiceSearchResponseBody)
out.raw_response = http_res
raise out
else:
content_type = http_res.headers.get('Content-Type')
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
else:
raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res)
return res
@@ -172,16 +176,16 @@ class Search:
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
url = base_url + '/search'
headers = {}
query_params = utils.get_query_params(operations.GetSearchResultsRequest, request)
headers['Accept'] = 'application/json'
headers['user-agent'] = self.sdk_configuration.user_agent
if callable(self.sdk_configuration.security):
client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security())
headers, query_params = utils.get_security(self.sdk_configuration.security())
else:
client = utils.configure_security_client(self.sdk_configuration.client, self.sdk_configuration.security)
headers, query_params = utils.get_security(self.sdk_configuration.security)
query_params = { **utils.get_query_params(operations.GetSearchResultsRequest, request), **query_params }
headers['Accept'] = 'application/json'
headers['user-agent'] = self.sdk_configuration.user_agent
client = self.sdk_configuration.client
try:
req = self.sdk_configuration.get_hooks().before_request(
@@ -203,25 +207,28 @@ class Search:
raise result
http_res = result
content_type = http_res.headers.get('Content-Type')
res = operations.GetSearchResultsResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
res = operations.GetSearchResultsResponse(status_code=http_res.status_code, content_type=http_res.headers.get('Content-Type'), raw_response=http_res)
if http_res.status_code == 200:
if utils.match_content_type(content_type, 'application/json'):
if utils.match_content_type(http_res.headers.get('Content-Type'), 'application/json'):
out = utils.unmarshal_json(http_res.text, Optional[operations.GetSearchResultsResponseBody])
res.object = out
else:
content_type = http_res.headers.get('Content-Type')
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
elif http_res.status_code == 400 or http_res.status_code >= 400 and http_res.status_code < 500 or http_res.status_code >= 500 and http_res.status_code < 600:
raise errors.SDKError('API error occurred', http_res.status_code, http_res.text, http_res)
elif http_res.status_code == 401:
if utils.match_content_type(content_type, 'application/json'):
if utils.match_content_type(http_res.headers.get('Content-Type'), 'application/json'):
out = utils.unmarshal_json(http_res.text, errors.GetSearchResultsResponseBody)
out.raw_response = http_res
raise out
else:
content_type = http_res.headers.get('Content-Type')
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
else:
raise errors.SDKError('unknown status code received', http_res.status_code, http_res.text, http_res)
return res