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

@@ -26,20 +26,20 @@ class Updater:
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
url = base_url + '/updater/status'
headers = {}
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)
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(
hook_ctx,
requests_http.Request('GET', url, headers=headers).prepare(),
requests_http.Request('GET', url, params=query_params, headers=headers).prepare(),
)
http_res = client.send(req)
except Exception as e:
@@ -56,25 +56,28 @@ class Updater:
raise result
http_res = result
content_type = http_res.headers.get('Content-Type')
res = operations.GetUpdateStatusResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
res = operations.GetUpdateStatusResponse(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.GetUpdateStatusResponseBody])
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.GetUpdateStatusResponseBody)
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
@@ -92,16 +95,16 @@ class Updater:
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
url = base_url + '/updater/check'
headers = {}
query_params = utils.get_query_params(operations.CheckForUpdatesRequest, 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.CheckForUpdatesRequest, 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(
@@ -123,21 +126,23 @@ class Updater:
raise result
http_res = result
content_type = http_res.headers.get('Content-Type')
res = operations.CheckForUpdatesResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
res = operations.CheckForUpdatesResponse(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.CheckForUpdatesResponseBody)
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
@@ -156,16 +161,16 @@ class Updater:
base_url = utils.template_url(*self.sdk_configuration.get_server_details())
url = base_url + '/updater/apply'
headers = {}
query_params = utils.get_query_params(operations.ApplyUpdatesRequest, 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.ApplyUpdatesRequest, 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(
@@ -187,21 +192,23 @@ class Updater:
raise result
http_res = result
content_type = http_res.headers.get('Content-Type')
res = operations.ApplyUpdatesResponse(status_code=http_res.status_code, content_type=content_type, raw_response=http_res)
res = operations.ApplyUpdatesResponse(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 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.ApplyUpdatesResponseBody)
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