stackit-runcommand 1.0.0__tar.gz → 1.0.2__tar.gz

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.
Files changed (28) hide show
  1. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/PKG-INFO +1 -1
  2. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/pyproject.toml +1 -1
  3. stackit_runcommand-1.0.2/src/stackit/runcommand/__init__.py +86 -0
  4. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/api/default_api.py +21 -21
  5. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/api_client.py +19 -6
  6. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/configuration.py +32 -6
  7. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/exceptions.py +20 -1
  8. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/models/__init__.py +1 -1
  9. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/models/command_details.py +2 -2
  10. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/models/command_template.py +2 -2
  11. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/models/command_template_response.py +2 -2
  12. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/models/command_template_schema.py +2 -2
  13. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/models/commands.py +2 -2
  14. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/models/create_command_payload.py +2 -2
  15. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/models/error_response.py +2 -2
  16. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/models/get_commands_response.py +2 -2
  17. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/models/model_field.py +2 -2
  18. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/models/new_command_response.py +2 -2
  19. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/models/parameters_schema.py +2 -2
  20. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/models/properties.py +2 -2
  21. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/rest.py +2 -2
  22. stackit_runcommand-1.0.0/src/stackit/runcommand/__init__.py +0 -48
  23. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/LICENSE.md +0 -0
  24. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/NOTICE.txt +0 -0
  25. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/README.md +0 -0
  26. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/api/__init__.py +0 -0
  27. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/api_response.py +0 -0
  28. {stackit_runcommand-1.0.0 → stackit_runcommand-1.0.2}/src/stackit/runcommand/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stackit-runcommand
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: STACKIT Run Commands Service API
5
5
  Author: STACKIT Developer Tools
6
6
  Author-email: developer-tools@stackit.cloud
@@ -3,7 +3,7 @@ name = "stackit-runcommand"
3
3
 
4
4
  [tool.poetry]
5
5
  name = "stackit-runcommand"
6
- version = "v1.0.0"
6
+ version = "v1.0.2"
7
7
  authors = [
8
8
  "STACKIT Developer Tools <developer-tools@stackit.cloud>",
9
9
  ]
@@ -0,0 +1,86 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+
5
+ """
6
+ STACKIT Run Commands Service API
7
+
8
+ API endpoints for the STACKIT Run Commands Service API
9
+
10
+ The version of the OpenAPI document: 2.0
11
+ Contact: support@stackit.de
12
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
13
+
14
+ Do not edit the class manually.
15
+ """ # noqa: E501
16
+
17
+
18
+ __version__ = "1.0.0"
19
+
20
+ # Define package exports
21
+ __all__ = [
22
+ "DefaultApi",
23
+ "ApiResponse",
24
+ "ApiClient",
25
+ "HostConfiguration",
26
+ "OpenApiException",
27
+ "ApiTypeError",
28
+ "ApiValueError",
29
+ "ApiKeyError",
30
+ "ApiAttributeError",
31
+ "ApiException",
32
+ "CommandDetails",
33
+ "CommandTemplate",
34
+ "CommandTemplateResponse",
35
+ "CommandTemplateSchema",
36
+ "Commands",
37
+ "CreateCommandPayload",
38
+ "ErrorResponse",
39
+ "GetCommandsResponse",
40
+ "ModelField",
41
+ "NewCommandResponse",
42
+ "ParametersSchema",
43
+ "Properties",
44
+ ]
45
+
46
+ # import apis into sdk package
47
+ from stackit.runcommand.api.default_api import DefaultApi as DefaultApi
48
+ from stackit.runcommand.api_client import ApiClient as ApiClient
49
+
50
+ # import ApiClient
51
+ from stackit.runcommand.api_response import ApiResponse as ApiResponse
52
+ from stackit.runcommand.configuration import HostConfiguration as HostConfiguration
53
+ from stackit.runcommand.exceptions import ApiAttributeError as ApiAttributeError
54
+ from stackit.runcommand.exceptions import ApiException as ApiException
55
+ from stackit.runcommand.exceptions import ApiKeyError as ApiKeyError
56
+ from stackit.runcommand.exceptions import ApiTypeError as ApiTypeError
57
+ from stackit.runcommand.exceptions import ApiValueError as ApiValueError
58
+ from stackit.runcommand.exceptions import OpenApiException as OpenApiException
59
+
60
+ # import models into sdk package
61
+ from stackit.runcommand.models.command_details import CommandDetails as CommandDetails
62
+ from stackit.runcommand.models.command_template import (
63
+ CommandTemplate as CommandTemplate,
64
+ )
65
+ from stackit.runcommand.models.command_template_response import (
66
+ CommandTemplateResponse as CommandTemplateResponse,
67
+ )
68
+ from stackit.runcommand.models.command_template_schema import (
69
+ CommandTemplateSchema as CommandTemplateSchema,
70
+ )
71
+ from stackit.runcommand.models.commands import Commands as Commands
72
+ from stackit.runcommand.models.create_command_payload import (
73
+ CreateCommandPayload as CreateCommandPayload,
74
+ )
75
+ from stackit.runcommand.models.error_response import ErrorResponse as ErrorResponse
76
+ from stackit.runcommand.models.get_commands_response import (
77
+ GetCommandsResponse as GetCommandsResponse,
78
+ )
79
+ from stackit.runcommand.models.model_field import ModelField as ModelField
80
+ from stackit.runcommand.models.new_command_response import (
81
+ NewCommandResponse as NewCommandResponse,
82
+ )
83
+ from stackit.runcommand.models.parameters_schema import (
84
+ ParametersSchema as ParametersSchema,
85
+ )
86
+ from stackit.runcommand.models.properties import Properties as Properties
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  from typing import Any, Dict, List, Optional, Tuple, Union
16
16
 
@@ -91,7 +91,7 @@ class DefaultApi:
91
91
  in the spec for a single request.
92
92
  :type _host_index: int, optional
93
93
  :return: Returns the result object.
94
- """ # noqa: E501 docstring might be too long
94
+ """ # noqa: E501
95
95
 
96
96
  _param = self._create_command_serialize(
97
97
  project_id=project_id,
@@ -166,7 +166,7 @@ class DefaultApi:
166
166
  in the spec for a single request.
167
167
  :type _host_index: int, optional
168
168
  :return: Returns the result object.
169
- """ # noqa: E501 docstring might be too long
169
+ """ # noqa: E501
170
170
 
171
171
  _param = self._create_command_serialize(
172
172
  project_id=project_id,
@@ -241,7 +241,7 @@ class DefaultApi:
241
241
  in the spec for a single request.
242
242
  :type _host_index: int, optional
243
243
  :return: Returns the result object.
244
- """ # noqa: E501 docstring might be too long
244
+ """ # noqa: E501
245
245
 
246
246
  _param = self._create_command_serialize(
247
247
  project_id=project_id,
@@ -283,7 +283,7 @@ class DefaultApi:
283
283
  _query_params: List[Tuple[str, str]] = []
284
284
  _header_params: Dict[str, Optional[str]] = _headers or {}
285
285
  _form_params: List[Tuple[str, str]] = []
286
- _files: Dict[str, Union[str, bytes]] = {}
286
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
287
287
  _body_params: Optional[bytes] = None
288
288
 
289
289
  # process the path parameters
@@ -379,7 +379,7 @@ class DefaultApi:
379
379
  in the spec for a single request.
380
380
  :type _host_index: int, optional
381
381
  :return: Returns the result object.
382
- """ # noqa: E501 docstring might be too long
382
+ """ # noqa: E501
383
383
 
384
384
  _param = self._get_command_serialize(
385
385
  project_id=project_id,
@@ -454,7 +454,7 @@ class DefaultApi:
454
454
  in the spec for a single request.
455
455
  :type _host_index: int, optional
456
456
  :return: Returns the result object.
457
- """ # noqa: E501 docstring might be too long
457
+ """ # noqa: E501
458
458
 
459
459
  _param = self._get_command_serialize(
460
460
  project_id=project_id,
@@ -529,7 +529,7 @@ class DefaultApi:
529
529
  in the spec for a single request.
530
530
  :type _host_index: int, optional
531
531
  :return: Returns the result object.
532
- """ # noqa: E501 docstring might be too long
532
+ """ # noqa: E501
533
533
 
534
534
  _param = self._get_command_serialize(
535
535
  project_id=project_id,
@@ -571,7 +571,7 @@ class DefaultApi:
571
571
  _query_params: List[Tuple[str, str]] = []
572
572
  _header_params: Dict[str, Optional[str]] = _headers or {}
573
573
  _form_params: List[Tuple[str, str]] = []
574
- _files: Dict[str, Union[str, bytes]] = {}
574
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
575
575
  _body_params: Optional[bytes] = None
576
576
 
577
577
  # process the path parameters
@@ -659,7 +659,7 @@ class DefaultApi:
659
659
  in the spec for a single request.
660
660
  :type _host_index: int, optional
661
661
  :return: Returns the result object.
662
- """ # noqa: E501 docstring might be too long
662
+ """ # noqa: E501
663
663
 
664
664
  _param = self._get_command_template_serialize(
665
665
  project_id=project_id,
@@ -734,7 +734,7 @@ class DefaultApi:
734
734
  in the spec for a single request.
735
735
  :type _host_index: int, optional
736
736
  :return: Returns the result object.
737
- """ # noqa: E501 docstring might be too long
737
+ """ # noqa: E501
738
738
 
739
739
  _param = self._get_command_template_serialize(
740
740
  project_id=project_id,
@@ -809,7 +809,7 @@ class DefaultApi:
809
809
  in the spec for a single request.
810
810
  :type _host_index: int, optional
811
811
  :return: Returns the result object.
812
- """ # noqa: E501 docstring might be too long
812
+ """ # noqa: E501
813
813
 
814
814
  _param = self._get_command_template_serialize(
815
815
  project_id=project_id,
@@ -851,7 +851,7 @@ class DefaultApi:
851
851
  _query_params: List[Tuple[str, str]] = []
852
852
  _header_params: Dict[str, Optional[str]] = _headers or {}
853
853
  _form_params: List[Tuple[str, str]] = []
854
- _files: Dict[str, Union[str, bytes]] = {}
854
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
855
855
  _body_params: Optional[bytes] = None
856
856
 
857
857
  # process the path parameters
@@ -935,7 +935,7 @@ class DefaultApi:
935
935
  in the spec for a single request.
936
936
  :type _host_index: int, optional
937
937
  :return: Returns the result object.
938
- """ # noqa: E501 docstring might be too long
938
+ """ # noqa: E501
939
939
 
940
940
  _param = self._list_command_templates_serialize(
941
941
  os_type=os_type,
@@ -1002,7 +1002,7 @@ class DefaultApi:
1002
1002
  in the spec for a single request.
1003
1003
  :type _host_index: int, optional
1004
1004
  :return: Returns the result object.
1005
- """ # noqa: E501 docstring might be too long
1005
+ """ # noqa: E501
1006
1006
 
1007
1007
  _param = self._list_command_templates_serialize(
1008
1008
  os_type=os_type,
@@ -1069,7 +1069,7 @@ class DefaultApi:
1069
1069
  in the spec for a single request.
1070
1070
  :type _host_index: int, optional
1071
1071
  :return: Returns the result object.
1072
- """ # noqa: E501 docstring might be too long
1072
+ """ # noqa: E501
1073
1073
 
1074
1074
  _param = self._list_command_templates_serialize(
1075
1075
  os_type=os_type,
@@ -1104,7 +1104,7 @@ class DefaultApi:
1104
1104
  _query_params: List[Tuple[str, str]] = []
1105
1105
  _header_params: Dict[str, Optional[str]] = _headers or {}
1106
1106
  _form_params: List[Tuple[str, str]] = []
1107
- _files: Dict[str, Union[str, bytes]] = {}
1107
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
1108
1108
  _body_params: Optional[bytes] = None
1109
1109
 
1110
1110
  # process the path parameters
@@ -1185,7 +1185,7 @@ class DefaultApi:
1185
1185
  in the spec for a single request.
1186
1186
  :type _host_index: int, optional
1187
1187
  :return: Returns the result object.
1188
- """ # noqa: E501 docstring might be too long
1188
+ """ # noqa: E501
1189
1189
 
1190
1190
  _param = self._list_commands_serialize(
1191
1191
  project_id=project_id,
@@ -1256,7 +1256,7 @@ class DefaultApi:
1256
1256
  in the spec for a single request.
1257
1257
  :type _host_index: int, optional
1258
1258
  :return: Returns the result object.
1259
- """ # noqa: E501 docstring might be too long
1259
+ """ # noqa: E501
1260
1260
 
1261
1261
  _param = self._list_commands_serialize(
1262
1262
  project_id=project_id,
@@ -1327,7 +1327,7 @@ class DefaultApi:
1327
1327
  in the spec for a single request.
1328
1328
  :type _host_index: int, optional
1329
1329
  :return: Returns the result object.
1330
- """ # noqa: E501 docstring might be too long
1330
+ """ # noqa: E501
1331
1331
 
1332
1332
  _param = self._list_commands_serialize(
1333
1333
  project_id=project_id,
@@ -1367,7 +1367,7 @@ class DefaultApi:
1367
1367
  _query_params: List[Tuple[str, str]] = []
1368
1368
  _header_params: Dict[str, Optional[str]] = _headers or {}
1369
1369
  _form_params: List[Tuple[str, str]] = []
1370
- _files: Dict[str, Union[str, bytes]] = {}
1370
+ _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
1371
1371
  _body_params: Optional[bytes] = None
1372
1372
 
1373
1373
  # process the path parameters
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  import datetime
16
16
  import json
@@ -82,7 +82,7 @@ class ApiClient:
82
82
  self.default_headers[header_name] = header_value
83
83
  self.cookie = cookie
84
84
  # Set default User-Agent.
85
- self.user_agent = "OpenAPI-Generator/1.0.0/python"
85
+ self.user_agent = "stackit-sdk-python/runcommand"
86
86
 
87
87
  def __enter__(self):
88
88
  return self
@@ -332,6 +332,10 @@ class ApiClient:
332
332
  else:
333
333
  obj_dict = obj.__dict__
334
334
 
335
+ if isinstance(obj_dict, list):
336
+ # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() # noqa: E501
337
+ return self.sanitize_for_serialization(obj_dict)
338
+
335
339
  return {key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()}
336
340
 
337
341
  def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
@@ -351,12 +355,12 @@ class ApiClient:
351
355
  data = json.loads(response_text)
352
356
  except ValueError:
353
357
  data = response_text
354
- elif content_type.startswith("application/json"):
358
+ elif re.match(r"^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)", content_type, re.IGNORECASE):
355
359
  if response_text == "":
356
360
  data = ""
357
361
  else:
358
362
  data = json.loads(response_text)
359
- elif content_type.startswith("text/plain"):
363
+ elif re.match(r"^text\/[a-z.+-]+\s*(;|$)", content_type, re.IGNORECASE):
360
364
  data = response_text
361
365
  else:
362
366
  raise ApiException(status=0, reason="Unsupported content type: {0}".format(content_type))
@@ -458,7 +462,7 @@ class ApiClient:
458
462
  if k in collection_formats:
459
463
  collection_format = collection_formats[k]
460
464
  if collection_format == "multi":
461
- new_params.extend((k, str(value)) for value in v)
465
+ new_params.extend((k, quote(str(value))) for value in v)
462
466
  else:
463
467
  if collection_format == "ssv":
464
468
  delimiter = " "
@@ -474,7 +478,10 @@ class ApiClient:
474
478
 
475
479
  return "&".join(["=".join(map(str, item)) for item in new_params])
476
480
 
477
- def files_parameters(self, files: Dict[str, Union[str, bytes]]):
481
+ def files_parameters(
482
+ self,
483
+ files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]],
484
+ ):
478
485
  """Builds form parameters.
479
486
 
480
487
  :param files: File parameters.
@@ -489,6 +496,12 @@ class ApiClient:
489
496
  elif isinstance(v, bytes):
490
497
  filename = k
491
498
  filedata = v
499
+ elif isinstance(v, tuple):
500
+ filename, filedata = v
501
+ elif isinstance(v, list):
502
+ for file_param in v:
503
+ params.extend(self.files_parameters({k: file_param}))
504
+ continue
492
505
  else:
493
506
  raise ValueError("Unsupported file value")
494
507
  mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream"
@@ -10,11 +10,31 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
+
15
+ import sys
16
+ from typing import Dict, List, Optional, TypedDict
17
+
18
+ from typing_extensions import NotRequired
14
19
 
15
20
  import os
16
21
 
17
22
 
23
+ ServerVariablesT = Dict[str, str]
24
+
25
+
26
+ class HostSettingVariable(TypedDict):
27
+ description: str
28
+ default_value: str
29
+ enum_values: List[str]
30
+
31
+
32
+ class HostSetting(TypedDict):
33
+ url: str
34
+ description: str
35
+ variables: NotRequired[Dict[str, HostSettingVariable]]
36
+
37
+
18
38
  class HostConfiguration:
19
39
  def __init__(
20
40
  self,
@@ -30,6 +50,7 @@ class HostConfiguration:
30
50
  "as a function argument instead of being set in the client configuration.\n"
31
51
  "Once all services have migrated, the methods to specify the region in the client configuration "
32
52
  "will be removed.",
53
+ file=sys.stderr,
33
54
  )
34
55
  """Constructor
35
56
  """
@@ -50,7 +71,7 @@ class HostConfiguration:
50
71
  """Ignore operation servers
51
72
  """
52
73
 
53
- def get_host_settings(self):
74
+ def get_host_settings(self) -> List[HostSetting]:
54
75
  """Gets an array of host settings
55
76
 
56
77
  :return: An array of host settings
@@ -68,7 +89,12 @@ class HostConfiguration:
68
89
  }
69
90
  ]
70
91
 
71
- def get_host_from_settings(self, index, variables=None, servers=None):
92
+ def get_host_from_settings(
93
+ self,
94
+ index: Optional[int],
95
+ variables: Optional[ServerVariablesT] = None,
96
+ servers: Optional[List[HostSetting]] = None,
97
+ ) -> str:
72
98
  """Gets host URL based on the index and variables
73
99
  :param index: array index of the host settings
74
100
  :param variables: hash of variable and the corresponding value
@@ -108,7 +134,7 @@ class HostConfiguration:
108
134
  and variables.get(variable_name) is not None
109
135
  ):
110
136
  raise ValueError(
111
- "this API does not support setting a region in the the client configuration, "
137
+ "this API does not support setting a region in the client configuration, "
112
138
  "please check if the region can be specified as a function parameter"
113
139
  )
114
140
  used_value = variables.get(variable_name, variable["default_value"])
@@ -127,12 +153,12 @@ class HostConfiguration:
127
153
  return url
128
154
 
129
155
  @property
130
- def host(self):
156
+ def host(self) -> str:
131
157
  """Return generated host."""
132
158
  return self.get_host_from_settings(self.server_index, variables=self.server_variables)
133
159
 
134
160
  @host.setter
135
- def host(self, value):
161
+ def host(self, value: str) -> None:
136
162
  """Fix base path."""
137
163
  self._base_path = value
138
164
  self.server_index = None
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  from typing import Any, Optional
16
16
 
@@ -152,6 +152,13 @@ class ApiException(OpenApiException):
152
152
  if http_resp.status == 404:
153
153
  raise NotFoundException(http_resp=http_resp, body=body, data=data)
154
154
 
155
+ # Added new conditions for 409 and 422
156
+ if http_resp.status == 409:
157
+ raise ConflictException(http_resp=http_resp, body=body, data=data)
158
+
159
+ if http_resp.status == 422:
160
+ raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
161
+
155
162
  if 500 <= http_resp.status <= 599:
156
163
  raise ServiceException(http_resp=http_resp, body=body, data=data)
157
164
  raise ApiException(http_resp=http_resp, body=body, data=data)
@@ -188,6 +195,18 @@ class ServiceException(ApiException):
188
195
  pass
189
196
 
190
197
 
198
+ class ConflictException(ApiException):
199
+ """Exception for HTTP 409 Conflict."""
200
+
201
+ pass
202
+
203
+
204
+ class UnprocessableEntityException(ApiException):
205
+ """Exception for HTTP 422 Unprocessable Entity."""
206
+
207
+ pass
208
+
209
+
191
210
  def render_path(path_to_item):
192
211
  """Returns a string representation of a path"""
193
212
  result = ""
@@ -11,7 +11,7 @@
11
11
  Generated by OpenAPI Generator (https://openapi-generator.tech)
12
12
 
13
13
  Do not edit the class manually.
14
- """ # noqa: E501 docstring might be too long
14
+ """ # noqa: E501
15
15
 
16
16
 
17
17
  # import models into model package
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
16
16
 
@@ -25,7 +25,7 @@ from typing_extensions import Self
25
25
  class CommandDetails(BaseModel):
26
26
  """
27
27
  CommandDetails
28
- """
28
+ """ # noqa: E501
29
29
 
30
30
  command_template_name: Optional[StrictStr] = Field(default=None, alias="commandTemplateName")
31
31
  command_template_title: Optional[StrictStr] = Field(default=None, alias="commandTemplateTitle")
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
16
16
 
@@ -25,7 +25,7 @@ from typing_extensions import Self
25
25
  class CommandTemplate(BaseModel):
26
26
  """
27
27
  CommandTemplate
28
- """
28
+ """ # noqa: E501
29
29
 
30
30
  name: Optional[StrictStr] = None
31
31
  os_type: Optional[List[StrictStr]] = Field(default=None, alias="osType")
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
16
16
 
@@ -27,7 +27,7 @@ from stackit.runcommand.models.command_template import CommandTemplate
27
27
  class CommandTemplateResponse(BaseModel):
28
28
  """
29
29
  CommandTemplateResponse
30
- """
30
+ """ # noqa: E501
31
31
 
32
32
  items: Optional[List[CommandTemplate]] = None
33
33
  __properties: ClassVar[List[str]] = ["items"]
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
16
16
 
@@ -27,7 +27,7 @@ from stackit.runcommand.models.parameters_schema import ParametersSchema
27
27
  class CommandTemplateSchema(BaseModel):
28
28
  """
29
29
  CommandTemplateSchema
30
- """
30
+ """ # noqa: E501
31
31
 
32
32
  description: Optional[StrictStr] = None
33
33
  name: Optional[StrictStr] = None
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
16
16
 
@@ -25,7 +25,7 @@ from typing_extensions import Self
25
25
  class Commands(BaseModel):
26
26
  """
27
27
  Commands
28
- """
28
+ """ # noqa: E501
29
29
 
30
30
  command_template_name: Optional[StrictStr] = Field(default=None, alias="commandTemplateName")
31
31
  command_template_title: Optional[StrictStr] = Field(default=None, alias="commandTemplateTitle")
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
16
16
 
@@ -25,7 +25,7 @@ from typing_extensions import Self
25
25
  class CreateCommandPayload(BaseModel):
26
26
  """
27
27
  CreateCommandPayload
28
- """
28
+ """ # noqa: E501
29
29
 
30
30
  command_template_name: StrictStr = Field(alias="commandTemplateName")
31
31
  parameters: Optional[Dict[str, StrictStr]] = None
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
16
16
 
@@ -25,7 +25,7 @@ from typing_extensions import Self
25
25
  class ErrorResponse(BaseModel):
26
26
  """
27
27
  ErrorResponse
28
- """
28
+ """ # noqa: E501
29
29
 
30
30
  message: StrictStr = Field(description="Details about the error")
31
31
  status: StrictStr = Field(
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
16
16
 
@@ -27,7 +27,7 @@ from stackit.runcommand.models.commands import Commands
27
27
  class GetCommandsResponse(BaseModel):
28
28
  """
29
29
  GetCommandsResponse
30
- """
30
+ """ # noqa: E501
31
31
 
32
32
  items: Optional[List[Commands]] = None
33
33
  __properties: ClassVar[List[str]] = ["items"]
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
16
16
 
@@ -25,7 +25,7 @@ from typing_extensions import Self
25
25
  class ModelField(BaseModel):
26
26
  """
27
27
  ModelField
28
- """
28
+ """ # noqa: E501
29
29
 
30
30
  default: Optional[StrictStr] = None
31
31
  description: Optional[StrictStr] = None
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
16
16
 
@@ -25,7 +25,7 @@ from typing_extensions import Self
25
25
  class NewCommandResponse(BaseModel):
26
26
  """
27
27
  NewCommandResponse
28
- """
28
+ """ # noqa: E501
29
29
 
30
30
  id: Optional[StrictInt] = None
31
31
  __properties: ClassVar[List[str]] = ["id"]
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
16
16
 
@@ -27,7 +27,7 @@ from stackit.runcommand.models.properties import Properties
27
27
  class ParametersSchema(BaseModel):
28
28
  """
29
29
  ParametersSchema
30
- """
30
+ """ # noqa: E501
31
31
 
32
32
  properties: Optional[Properties] = None
33
33
  __properties: ClassVar[List[str]] = ["properties"]
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  from __future__ import annotations
16
16
 
@@ -27,7 +27,7 @@ from stackit.runcommand.models.model_field import ModelField
27
27
  class Properties(BaseModel):
28
28
  """
29
29
  Properties
30
- """
30
+ """ # noqa: E501
31
31
 
32
32
  confirm_password: Optional[ModelField] = Field(default=None, alias="ConfirmPassword")
33
33
  password: Optional[ModelField] = Field(default=None, alias="Password")
@@ -10,7 +10,7 @@
10
10
  Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
12
  Do not edit the class manually.
13
- """ # noqa: E501 docstring might be too long
13
+ """ # noqa: E501
14
14
 
15
15
  import io
16
16
  import json
@@ -125,7 +125,7 @@ class RESTClientObject:
125
125
  data=body,
126
126
  headers=headers,
127
127
  )
128
- elif headers["Content-Type"] == "text/plain" and isinstance(body, bool):
128
+ elif headers["Content-Type"].startswith("text/") and isinstance(body, bool):
129
129
  request_body = "true" if body else "false"
130
130
  r = self.session.request(method, url, data=request_body, headers=headers)
131
131
  else:
@@ -1,48 +0,0 @@
1
- # coding: utf-8
2
-
3
- # flake8: noqa
4
-
5
- """
6
- STACKIT Run Commands Service API
7
-
8
- API endpoints for the STACKIT Run Commands Service API
9
-
10
- The version of the OpenAPI document: 2.0
11
- Contact: support@stackit.de
12
- Generated by OpenAPI Generator (https://openapi-generator.tech)
13
-
14
- Do not edit the class manually.
15
- """ # noqa: E501 docstring might be too long
16
-
17
-
18
- __version__ = "1.0.0"
19
-
20
- # import apis into sdk package
21
- from stackit.runcommand.api.default_api import DefaultApi
22
- from stackit.runcommand.api_client import ApiClient
23
-
24
- # import ApiClient
25
- from stackit.runcommand.api_response import ApiResponse
26
- from stackit.runcommand.configuration import HostConfiguration
27
- from stackit.runcommand.exceptions import (
28
- ApiAttributeError,
29
- ApiException,
30
- ApiKeyError,
31
- ApiTypeError,
32
- ApiValueError,
33
- OpenApiException,
34
- )
35
-
36
- # import models into sdk package
37
- from stackit.runcommand.models.command_details import CommandDetails
38
- from stackit.runcommand.models.command_template import CommandTemplate
39
- from stackit.runcommand.models.command_template_response import CommandTemplateResponse
40
- from stackit.runcommand.models.command_template_schema import CommandTemplateSchema
41
- from stackit.runcommand.models.commands import Commands
42
- from stackit.runcommand.models.create_command_payload import CreateCommandPayload
43
- from stackit.runcommand.models.error_response import ErrorResponse
44
- from stackit.runcommand.models.get_commands_response import GetCommandsResponse
45
- from stackit.runcommand.models.model_field import ModelField
46
- from stackit.runcommand.models.new_command_response import NewCommandResponse
47
- from stackit.runcommand.models.parameters_schema import ParametersSchema
48
- from stackit.runcommand.models.properties import Properties