stackit-telemetryrouter 0.1.0__tar.gz → 0.2.0__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 (43) hide show
  1. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/PKG-INFO +1 -1
  2. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/pyproject.toml +1 -1
  3. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/api_client.py +15 -17
  4. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/access_token_base_request.py +7 -3
  5. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/access_token_base_response.py +7 -3
  6. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/config_filter.py +4 -3
  7. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/config_filter_attributes.py +4 -3
  8. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/create_access_token_payload.py +7 -3
  9. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/create_access_token_response.py +7 -3
  10. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/create_destination_payload.py +7 -3
  11. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/create_telemetry_router_payload.py +7 -3
  12. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/destination_config.py +4 -3
  13. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/destination_config_open_telemetry.py +4 -3
  14. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/destination_config_open_telemetry_basic_auth.py +4 -3
  15. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/destination_config_s3.py +4 -3
  16. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/destination_config_s3_access_key.py +4 -3
  17. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/destination_response.py +7 -3
  18. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/get_access_token_response.py +7 -3
  19. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/list_access_tokens_response.py +4 -3
  20. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/list_destinations_response.py +4 -3
  21. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/list_telemetry_routers_response.py +4 -3
  22. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/response4xx.py +4 -3
  23. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/telemetry_router_response.py +7 -3
  24. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/update_access_token_payload.py +7 -3
  25. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/update_access_token_response.py +7 -3
  26. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/update_destination_payload.py +7 -3
  27. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/update_telemetry_router_payload.py +7 -3
  28. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/.gitignore +0 -0
  29. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/LICENSE.md +0 -0
  30. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/NOTICE.txt +0 -0
  31. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/README.md +0 -0
  32. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/__init__.py +0 -0
  33. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/api/__init__.py +0 -0
  34. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/api/default_api.py +0 -0
  35. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/api_response.py +0 -0
  36. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/configuration.py +0 -0
  37. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/exceptions.py +0 -0
  38. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/__init__.py +0 -0
  39. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/config_filter_level.py +0 -0
  40. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/config_filter_matcher.py +0 -0
  41. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/models/destination_config_type.py +0 -0
  42. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/py.typed +0 -0
  43. {stackit_telemetryrouter-0.1.0 → stackit_telemetryrouter-0.2.0}/src/stackit/telemetryrouter/rest.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackit-telemetryrouter
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: STACKIT Telemetry Router API
5
5
  Project-URL: Homepage, https://github.com/stackitcloud/stackit-sdk-python
6
6
  Project-URL: Issues, https://github.com/stackitcloud/stackit-sdk-python/issues
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "stackit-telemetryrouter"
3
- version = "v0.1.0"
3
+ version = "v0.2.0"
4
4
  description = "STACKIT Telemetry Router API"
5
5
  authors = [{name = "STACKIT Developer Tools", email = "developer-tools@stackit.cloud"}]
6
6
  requires-python = ">=3.9,<4.0"
@@ -66,6 +66,7 @@ class ApiClient:
66
66
  "date": datetime.date,
67
67
  "datetime": datetime.datetime,
68
68
  "decimal": decimal.Decimal,
69
+ "UUID": uuid.UUID,
69
70
  "object": object,
70
71
  }
71
72
  _pool = None
@@ -265,7 +266,7 @@ class ApiClient:
265
266
  response_text = None
266
267
  return_data = None
267
268
  try:
268
- if response_type == "bytearray":
269
+ if response_type in ("bytearray", "bytes"):
269
270
  return_data = response_data.data
270
271
  elif response_type == "file":
271
272
  return_data = self.__deserialize_file(response_data)
@@ -326,25 +327,20 @@ class ApiClient:
326
327
  return obj.isoformat()
327
328
  elif isinstance(obj, decimal.Decimal):
328
329
  return str(obj)
329
-
330
330
  elif isinstance(obj, dict):
331
- obj_dict = obj
331
+ return {key: self.sanitize_for_serialization(val) for key, val in obj.items()}
332
+
333
+ # Convert model obj to dict except
334
+ # attributes `openapi_types`, `attribute_map`
335
+ # and attributes which value is not None.
336
+ # Convert attribute name to json key in
337
+ # model definition for request.
338
+ if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): # noqa: B009
339
+ obj_dict = obj.to_dict()
332
340
  else:
333
- # Convert model obj to dict except
334
- # attributes `openapi_types`, `attribute_map`
335
- # and attributes which value is not None.
336
- # Convert attribute name to json key in
337
- # model definition for request.
338
- if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): # noqa: B009
339
- obj_dict = obj.to_dict()
340
- else:
341
- obj_dict = obj.__dict__
342
-
343
- if isinstance(obj_dict, list):
344
- # 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
345
- return self.sanitize_for_serialization(obj_dict)
341
+ obj_dict = obj.__dict__
346
342
 
347
- return {key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()}
343
+ return self.sanitize_for_serialization(obj_dict)
348
344
 
349
345
  def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
350
346
  """Deserializes response into an object.
@@ -417,6 +413,8 @@ class ApiClient:
417
413
  return self.__deserialize_datetime(data)
418
414
  elif klass is decimal.Decimal:
419
415
  return decimal.Decimal(data)
416
+ elif klass is uuid.UUID:
417
+ return uuid.UUID(data)
420
418
  elif issubclass(klass, Enum):
421
419
  return self.__deserialize_enum(data, klass)
422
420
  else:
@@ -19,6 +19,7 @@ import re # noqa: F401
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict, Field, field_validator
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Annotated, Self
23
24
 
24
25
 
@@ -42,12 +43,16 @@ class AccessTokenBaseRequest(BaseModel):
42
43
  @field_validator("display_name")
43
44
  def display_name_validate_regular_expression(cls, value):
44
45
  """Validates the regular expression"""
46
+ if not isinstance(value, str):
47
+ value = str(value)
48
+
45
49
  if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 \-]*$", value):
46
50
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 \-]*$/")
47
51
  return value
48
52
 
49
53
  model_config = ConfigDict(
50
- populate_by_name=True,
54
+ validate_by_name=True,
55
+ validate_by_alias=True,
51
56
  validate_assignment=True,
52
57
  protected_namespaces=(),
53
58
  )
@@ -58,8 +63,7 @@ class AccessTokenBaseRequest(BaseModel):
58
63
 
59
64
  def to_json(self) -> str:
60
65
  """Returns the JSON representation of the model using alias"""
61
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
62
- return json.dumps(self.to_dict())
66
+ return json.dumps(to_jsonable_python(self.to_dict()))
63
67
 
64
68
  @classmethod
65
69
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -21,6 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
21
21
  from uuid import UUID
22
22
 
23
23
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
24
+ from pydantic_core import to_jsonable_python
24
25
  from typing_extensions import Annotated, Self
25
26
 
26
27
 
@@ -48,6 +49,9 @@ class AccessTokenBaseResponse(BaseModel):
48
49
  @field_validator("display_name")
49
50
  def display_name_validate_regular_expression(cls, value):
50
51
  """Validates the regular expression"""
52
+ if not isinstance(value, str):
53
+ value = str(value)
54
+
51
55
  if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 ]*$", value):
52
56
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 ]*$/")
53
57
  return value
@@ -73,7 +77,8 @@ class AccessTokenBaseResponse(BaseModel):
73
77
  return value
74
78
 
75
79
  model_config = ConfigDict(
76
- populate_by_name=True,
80
+ validate_by_name=True,
81
+ validate_by_alias=True,
77
82
  validate_assignment=True,
78
83
  protected_namespaces=(),
79
84
  )
@@ -84,8 +89,7 @@ class AccessTokenBaseResponse(BaseModel):
84
89
 
85
90
  def to_json(self) -> str:
86
91
  """Returns the JSON representation of the model using alias"""
87
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
88
- return json.dumps(self.to_dict())
92
+ return json.dumps(to_jsonable_python(self.to_dict()))
89
93
 
90
94
  @classmethod
91
95
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Annotated, Self
22
23
 
23
24
  from stackit.telemetryrouter.models.config_filter_attributes import (
@@ -34,7 +35,8 @@ class ConfigFilter(BaseModel):
34
35
  __properties: ClassVar[List[str]] = ["attributes"]
35
36
 
36
37
  model_config = ConfigDict(
37
- populate_by_name=True,
38
+ validate_by_name=True,
39
+ validate_by_alias=True,
38
40
  validate_assignment=True,
39
41
  protected_namespaces=(),
40
42
  )
@@ -45,8 +47,7 @@ class ConfigFilter(BaseModel):
45
47
 
46
48
  def to_json(self) -> str:
47
49
  """Returns the JSON representation of the model using alias"""
48
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
49
- return json.dumps(self.to_dict())
50
+ return json.dumps(to_jsonable_python(self.to_dict()))
50
51
 
51
52
  @classmethod
52
53
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Annotated, Self
22
23
 
23
24
  from stackit.telemetryrouter.models.config_filter_level import ConfigFilterLevel
@@ -38,7 +39,8 @@ class ConfigFilterAttributes(BaseModel):
38
39
  __properties: ClassVar[List[str]] = ["key", "level", "matcher", "values"]
39
40
 
40
41
  model_config = ConfigDict(
41
- populate_by_name=True,
42
+ validate_by_name=True,
43
+ validate_by_alias=True,
42
44
  validate_assignment=True,
43
45
  protected_namespaces=(),
44
46
  )
@@ -49,8 +51,7 @@ class ConfigFilterAttributes(BaseModel):
49
51
 
50
52
  def to_json(self) -> str:
51
53
  """Returns the JSON representation of the model using alias"""
52
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
- return json.dumps(self.to_dict())
54
+ return json.dumps(to_jsonable_python(self.to_dict()))
54
55
 
55
56
  @classmethod
56
57
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -19,6 +19,7 @@ import re # noqa: F401
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict, Field, field_validator
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Annotated, Self
23
24
 
24
25
 
@@ -42,12 +43,16 @@ class CreateAccessTokenPayload(BaseModel):
42
43
  @field_validator("display_name")
43
44
  def display_name_validate_regular_expression(cls, value):
44
45
  """Validates the regular expression"""
46
+ if not isinstance(value, str):
47
+ value = str(value)
48
+
45
49
  if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 \-]*$", value):
46
50
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 \-]*$/")
47
51
  return value
48
52
 
49
53
  model_config = ConfigDict(
50
- populate_by_name=True,
54
+ validate_by_name=True,
55
+ validate_by_alias=True,
51
56
  validate_assignment=True,
52
57
  protected_namespaces=(),
53
58
  )
@@ -58,8 +63,7 @@ class CreateAccessTokenPayload(BaseModel):
58
63
 
59
64
  def to_json(self) -> str:
60
65
  """Returns the JSON representation of the model using alias"""
61
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
62
- return json.dumps(self.to_dict())
66
+ return json.dumps(to_jsonable_python(self.to_dict()))
63
67
 
64
68
  @classmethod
65
69
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -21,6 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
21
21
  from uuid import UUID
22
22
 
23
23
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
24
+ from pydantic_core import to_jsonable_python
24
25
  from typing_extensions import Annotated, Self
25
26
 
26
27
 
@@ -57,6 +58,9 @@ class CreateAccessTokenResponse(BaseModel):
57
58
  @field_validator("display_name")
58
59
  def display_name_validate_regular_expression(cls, value):
59
60
  """Validates the regular expression"""
61
+ if not isinstance(value, str):
62
+ value = str(value)
63
+
60
64
  if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 ]*$", value):
61
65
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 ]*$/")
62
66
  return value
@@ -82,7 +86,8 @@ class CreateAccessTokenResponse(BaseModel):
82
86
  return value
83
87
 
84
88
  model_config = ConfigDict(
85
- populate_by_name=True,
89
+ validate_by_name=True,
90
+ validate_by_alias=True,
86
91
  validate_assignment=True,
87
92
  protected_namespaces=(),
88
93
  )
@@ -93,8 +98,7 @@ class CreateAccessTokenResponse(BaseModel):
93
98
 
94
99
  def to_json(self) -> str:
95
100
  """Returns the JSON representation of the model using alias"""
96
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
97
- return json.dumps(self.to_dict())
101
+ return json.dumps(to_jsonable_python(self.to_dict()))
98
102
 
99
103
  @classmethod
100
104
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -19,6 +19,7 @@ import re # noqa: F401
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict, Field, field_validator
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Annotated, Self
23
24
 
24
25
  from stackit.telemetryrouter.models.destination_config import DestinationConfig
@@ -42,12 +43,16 @@ class CreateDestinationPayload(BaseModel):
42
43
  @field_validator("display_name")
43
44
  def display_name_validate_regular_expression(cls, value):
44
45
  """Validates the regular expression"""
46
+ if not isinstance(value, str):
47
+ value = str(value)
48
+
45
49
  if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 \-]*$", value):
46
50
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 \-]*$/")
47
51
  return value
48
52
 
49
53
  model_config = ConfigDict(
50
- populate_by_name=True,
54
+ validate_by_name=True,
55
+ validate_by_alias=True,
51
56
  validate_assignment=True,
52
57
  protected_namespaces=(),
53
58
  )
@@ -58,8 +63,7 @@ class CreateDestinationPayload(BaseModel):
58
63
 
59
64
  def to_json(self) -> str:
60
65
  """Returns the JSON representation of the model using alias"""
61
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
62
- return json.dumps(self.to_dict())
66
+ return json.dumps(to_jsonable_python(self.to_dict()))
63
67
 
64
68
  @classmethod
65
69
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -19,6 +19,7 @@ import re # noqa: F401
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict, Field, field_validator
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Annotated, Self
23
24
 
24
25
  from stackit.telemetryrouter.models.config_filter import ConfigFilter
@@ -42,12 +43,16 @@ class CreateTelemetryRouterPayload(BaseModel):
42
43
  @field_validator("display_name")
43
44
  def display_name_validate_regular_expression(cls, value):
44
45
  """Validates the regular expression"""
46
+ if not isinstance(value, str):
47
+ value = str(value)
48
+
45
49
  if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 \-]*$", value):
46
50
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 \-]*$/")
47
51
  return value
48
52
 
49
53
  model_config = ConfigDict(
50
- populate_by_name=True,
54
+ validate_by_name=True,
55
+ validate_by_alias=True,
51
56
  validate_assignment=True,
52
57
  protected_namespaces=(),
53
58
  )
@@ -58,8 +63,7 @@ class CreateTelemetryRouterPayload(BaseModel):
58
63
 
59
64
  def to_json(self) -> str:
60
65
  """Returns the JSON representation of the model using alias"""
61
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
62
- return json.dumps(self.to_dict())
66
+ return json.dumps(to_jsonable_python(self.to_dict()))
63
67
 
64
68
  @classmethod
65
69
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
  from stackit.telemetryrouter.models.config_filter import ConfigFilter
@@ -40,7 +41,8 @@ class DestinationConfig(BaseModel):
40
41
  __properties: ClassVar[List[str]] = ["configType", "filter", "openTelemetry", "s3"]
41
42
 
42
43
  model_config = ConfigDict(
43
- populate_by_name=True,
44
+ validate_by_name=True,
45
+ validate_by_alias=True,
44
46
  validate_assignment=True,
45
47
  protected_namespaces=(),
46
48
  )
@@ -51,8 +53,7 @@ class DestinationConfig(BaseModel):
51
53
 
52
54
  def to_json(self) -> str:
53
55
  """Returns the JSON representation of the model using alias"""
54
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
55
- return json.dumps(self.to_dict())
56
+ return json.dumps(to_jsonable_python(self.to_dict()))
56
57
 
57
58
  @classmethod
58
59
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Annotated, Self
22
23
 
23
24
  from stackit.telemetryrouter.models.destination_config_open_telemetry_basic_auth import (
@@ -38,7 +39,8 @@ class DestinationConfigOpenTelemetry(BaseModel):
38
39
  __properties: ClassVar[List[str]] = ["basicAuth", "bearerToken", "uri"]
39
40
 
40
41
  model_config = ConfigDict(
41
- populate_by_name=True,
42
+ validate_by_name=True,
43
+ validate_by_alias=True,
42
44
  validate_assignment=True,
43
45
  protected_namespaces=(),
44
46
  )
@@ -49,8 +51,7 @@ class DestinationConfigOpenTelemetry(BaseModel):
49
51
 
50
52
  def to_json(self) -> str:
51
53
  """Returns the JSON representation of the model using alias"""
52
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
- return json.dumps(self.to_dict())
54
+ return json.dumps(to_jsonable_python(self.to_dict()))
54
55
 
55
56
  @classmethod
56
57
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Annotated, Self
22
23
 
23
24
 
@@ -31,7 +32,8 @@ class DestinationConfigOpenTelemetryBasicAuth(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["password", "username"]
32
33
 
33
34
  model_config = ConfigDict(
34
- populate_by_name=True,
35
+ validate_by_name=True,
36
+ validate_by_alias=True,
35
37
  validate_assignment=True,
36
38
  protected_namespaces=(),
37
39
  )
@@ -42,8 +44,7 @@ class DestinationConfigOpenTelemetryBasicAuth(BaseModel):
42
44
 
43
45
  def to_json(self) -> str:
44
46
  """Returns the JSON representation of the model using alias"""
45
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
- return json.dumps(self.to_dict())
47
+ return json.dumps(to_jsonable_python(self.to_dict()))
47
48
 
48
49
  @classmethod
49
50
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Annotated, Self
22
23
 
23
24
  from stackit.telemetryrouter.models.destination_config_s3_access_key import (
@@ -38,7 +39,8 @@ class DestinationConfigS3(BaseModel):
38
39
  __properties: ClassVar[List[str]] = ["accessKey", "bucket", "endpoint"]
39
40
 
40
41
  model_config = ConfigDict(
41
- populate_by_name=True,
42
+ validate_by_name=True,
43
+ validate_by_alias=True,
42
44
  validate_assignment=True,
43
45
  protected_namespaces=(),
44
46
  )
@@ -49,8 +51,7 @@ class DestinationConfigS3(BaseModel):
49
51
 
50
52
  def to_json(self) -> str:
51
53
  """Returns the JSON representation of the model using alias"""
52
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
- return json.dumps(self.to_dict())
54
+ return json.dumps(to_jsonable_python(self.to_dict()))
54
55
 
55
56
  @classmethod
56
57
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Annotated, Self
22
23
 
23
24
 
@@ -31,7 +32,8 @@ class DestinationConfigS3AccessKey(BaseModel):
31
32
  __properties: ClassVar[List[str]] = ["id", "secret"]
32
33
 
33
34
  model_config = ConfigDict(
34
- populate_by_name=True,
35
+ validate_by_name=True,
36
+ validate_by_alias=True,
35
37
  validate_assignment=True,
36
38
  protected_namespaces=(),
37
39
  )
@@ -42,8 +44,7 @@ class DestinationConfigS3AccessKey(BaseModel):
42
44
 
43
45
  def to_json(self) -> str:
44
46
  """Returns the JSON representation of the model using alias"""
45
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
- return json.dumps(self.to_dict())
47
+ return json.dumps(to_jsonable_python(self.to_dict()))
47
48
 
48
49
  @classmethod
49
50
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -21,6 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
21
21
  from uuid import UUID
22
22
 
23
23
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
24
+ from pydantic_core import to_jsonable_python
24
25
  from typing_extensions import Annotated, Self
25
26
 
26
27
  from stackit.telemetryrouter.models.destination_config import DestinationConfig
@@ -76,6 +77,9 @@ class DestinationResponse(BaseModel):
76
77
  @field_validator("display_name")
77
78
  def display_name_validate_regular_expression(cls, value):
78
79
  """Validates the regular expression"""
80
+ if not isinstance(value, str):
81
+ value = str(value)
82
+
79
83
  if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 \-]*$", value):
80
84
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 \-]*$/")
81
85
  return value
@@ -88,7 +92,8 @@ class DestinationResponse(BaseModel):
88
92
  return value
89
93
 
90
94
  model_config = ConfigDict(
91
- populate_by_name=True,
95
+ validate_by_name=True,
96
+ validate_by_alias=True,
92
97
  validate_assignment=True,
93
98
  protected_namespaces=(),
94
99
  )
@@ -99,8 +104,7 @@ class DestinationResponse(BaseModel):
99
104
 
100
105
  def to_json(self) -> str:
101
106
  """Returns the JSON representation of the model using alias"""
102
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
103
- return json.dumps(self.to_dict())
107
+ return json.dumps(to_jsonable_python(self.to_dict()))
104
108
 
105
109
  @classmethod
106
110
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -21,6 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
21
21
  from uuid import UUID
22
22
 
23
23
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
24
+ from pydantic_core import to_jsonable_python
24
25
  from typing_extensions import Annotated, Self
25
26
 
26
27
 
@@ -48,6 +49,9 @@ class GetAccessTokenResponse(BaseModel):
48
49
  @field_validator("display_name")
49
50
  def display_name_validate_regular_expression(cls, value):
50
51
  """Validates the regular expression"""
52
+ if not isinstance(value, str):
53
+ value = str(value)
54
+
51
55
  if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 ]*$", value):
52
56
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 ]*$/")
53
57
  return value
@@ -73,7 +77,8 @@ class GetAccessTokenResponse(BaseModel):
73
77
  return value
74
78
 
75
79
  model_config = ConfigDict(
76
- populate_by_name=True,
80
+ validate_by_name=True,
81
+ validate_by_alias=True,
77
82
  validate_assignment=True,
78
83
  protected_namespaces=(),
79
84
  )
@@ -84,8 +89,7 @@ class GetAccessTokenResponse(BaseModel):
84
89
 
85
90
  def to_json(self) -> str:
86
91
  """Returns the JSON representation of the model using alias"""
87
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
88
- return json.dumps(self.to_dict())
92
+ return json.dumps(to_jsonable_python(self.to_dict()))
89
93
 
90
94
  @classmethod
91
95
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
  from stackit.telemetryrouter.models.get_access_token_response import (
@@ -37,7 +38,8 @@ class ListAccessTokensResponse(BaseModel):
37
38
  __properties: ClassVar[List[str]] = ["accessTokens", "nextPageToken"]
38
39
 
39
40
  model_config = ConfigDict(
40
- populate_by_name=True,
41
+ validate_by_name=True,
42
+ validate_by_alias=True,
41
43
  validate_assignment=True,
42
44
  protected_namespaces=(),
43
45
  )
@@ -48,8 +50,7 @@ class ListAccessTokensResponse(BaseModel):
48
50
 
49
51
  def to_json(self) -> str:
50
52
  """Returns the JSON representation of the model using alias"""
51
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
- return json.dumps(self.to_dict())
53
+ return json.dumps(to_jsonable_python(self.to_dict()))
53
54
 
54
55
  @classmethod
55
56
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
  from stackit.telemetryrouter.models.destination_response import DestinationResponse
@@ -35,7 +36,8 @@ class ListDestinationsResponse(BaseModel):
35
36
  __properties: ClassVar[List[str]] = ["destinations", "nextPageToken"]
36
37
 
37
38
  model_config = ConfigDict(
38
- populate_by_name=True,
39
+ validate_by_name=True,
40
+ validate_by_alias=True,
39
41
  validate_assignment=True,
40
42
  protected_namespaces=(),
41
43
  )
@@ -46,8 +48,7 @@ class ListDestinationsResponse(BaseModel):
46
48
 
47
49
  def to_json(self) -> str:
48
50
  """Returns the JSON representation of the model using alias"""
49
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
- return json.dumps(self.to_dict())
51
+ return json.dumps(to_jsonable_python(self.to_dict()))
51
52
 
52
53
  @classmethod
53
54
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
  from stackit.telemetryrouter.models.telemetry_router_response import (
@@ -37,7 +38,8 @@ class ListTelemetryRoutersResponse(BaseModel):
37
38
  __properties: ClassVar[List[str]] = ["nextPageToken", "telemetryRouters"]
38
39
 
39
40
  model_config = ConfigDict(
40
- populate_by_name=True,
41
+ validate_by_name=True,
42
+ validate_by_alias=True,
41
43
  validate_assignment=True,
42
44
  protected_namespaces=(),
43
45
  )
@@ -48,8 +50,7 @@ class ListTelemetryRoutersResponse(BaseModel):
48
50
 
49
51
  def to_json(self) -> str:
50
52
  """Returns the JSON representation of the model using alias"""
51
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
- return json.dumps(self.to_dict())
53
+ return json.dumps(to_jsonable_python(self.to_dict()))
53
54
 
54
55
  @classmethod
55
56
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -18,6 +18,7 @@ import pprint
18
18
  from typing import Any, ClassVar, Dict, List, Optional, Set
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
+ from pydantic_core import to_jsonable_python
21
22
  from typing_extensions import Self
22
23
 
23
24
 
@@ -30,7 +31,8 @@ class Response4xx(BaseModel):
30
31
  __properties: ClassVar[List[str]] = ["message"]
31
32
 
32
33
  model_config = ConfigDict(
33
- populate_by_name=True,
34
+ validate_by_name=True,
35
+ validate_by_alias=True,
34
36
  validate_assignment=True,
35
37
  protected_namespaces=(),
36
38
  )
@@ -41,8 +43,7 @@ class Response4xx(BaseModel):
41
43
 
42
44
  def to_json(self) -> str:
43
45
  """Returns the JSON representation of the model using alias"""
44
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
45
- return json.dumps(self.to_dict())
46
+ return json.dumps(to_jsonable_python(self.to_dict()))
46
47
 
47
48
  @classmethod
48
49
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -21,6 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
21
21
  from uuid import UUID
22
22
 
23
23
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
24
+ from pydantic_core import to_jsonable_python
24
25
  from typing_extensions import Annotated, Self
25
26
 
26
27
  from stackit.telemetryrouter.models.config_filter import ConfigFilter
@@ -61,6 +62,9 @@ class TelemetryRouterResponse(BaseModel):
61
62
  @field_validator("display_name")
62
63
  def display_name_validate_regular_expression(cls, value):
63
64
  """Validates the regular expression"""
65
+ if not isinstance(value, str):
66
+ value = str(value)
67
+
64
68
  if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 \-]*$", value):
65
69
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 \-]*$/")
66
70
  return value
@@ -73,7 +77,8 @@ class TelemetryRouterResponse(BaseModel):
73
77
  return value
74
78
 
75
79
  model_config = ConfigDict(
76
- populate_by_name=True,
80
+ validate_by_name=True,
81
+ validate_by_alias=True,
77
82
  validate_assignment=True,
78
83
  protected_namespaces=(),
79
84
  )
@@ -84,8 +89,7 @@ class TelemetryRouterResponse(BaseModel):
84
89
 
85
90
  def to_json(self) -> str:
86
91
  """Returns the JSON representation of the model using alias"""
87
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
88
- return json.dumps(self.to_dict())
92
+ return json.dumps(to_jsonable_python(self.to_dict()))
89
93
 
90
94
  @classmethod
91
95
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -19,6 +19,7 @@ import re # noqa: F401
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict, Field, field_validator
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Annotated, Self
23
24
 
24
25
 
@@ -39,12 +40,16 @@ class UpdateAccessTokenPayload(BaseModel):
39
40
  if value is None:
40
41
  return value
41
42
 
43
+ if not isinstance(value, str):
44
+ value = str(value)
45
+
42
46
  if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 \-]*$", value):
43
47
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 \-]*$/")
44
48
  return value
45
49
 
46
50
  model_config = ConfigDict(
47
- populate_by_name=True,
51
+ validate_by_name=True,
52
+ validate_by_alias=True,
48
53
  validate_assignment=True,
49
54
  protected_namespaces=(),
50
55
  )
@@ -55,8 +60,7 @@ class UpdateAccessTokenPayload(BaseModel):
55
60
 
56
61
  def to_json(self) -> str:
57
62
  """Returns the JSON representation of the model using alias"""
58
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
59
- return json.dumps(self.to_dict())
63
+ return json.dumps(to_jsonable_python(self.to_dict()))
60
64
 
61
65
  @classmethod
62
66
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -21,6 +21,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Set
21
21
  from uuid import UUID
22
22
 
23
23
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
24
+ from pydantic_core import to_jsonable_python
24
25
  from typing_extensions import Annotated, Self
25
26
 
26
27
 
@@ -48,6 +49,9 @@ class UpdateAccessTokenResponse(BaseModel):
48
49
  @field_validator("display_name")
49
50
  def display_name_validate_regular_expression(cls, value):
50
51
  """Validates the regular expression"""
52
+ if not isinstance(value, str):
53
+ value = str(value)
54
+
51
55
  if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 ]*$", value):
52
56
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 ]*$/")
53
57
  return value
@@ -73,7 +77,8 @@ class UpdateAccessTokenResponse(BaseModel):
73
77
  return value
74
78
 
75
79
  model_config = ConfigDict(
76
- populate_by_name=True,
80
+ validate_by_name=True,
81
+ validate_by_alias=True,
77
82
  validate_assignment=True,
78
83
  protected_namespaces=(),
79
84
  )
@@ -84,8 +89,7 @@ class UpdateAccessTokenResponse(BaseModel):
84
89
 
85
90
  def to_json(self) -> str:
86
91
  """Returns the JSON representation of the model using alias"""
87
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
88
- return json.dumps(self.to_dict())
92
+ return json.dumps(to_jsonable_python(self.to_dict()))
89
93
 
90
94
  @classmethod
91
95
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -19,6 +19,7 @@ import re # noqa: F401
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict, Field, field_validator
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Annotated, Self
23
24
 
24
25
  from stackit.telemetryrouter.models.destination_config import DestinationConfig
@@ -47,12 +48,16 @@ class UpdateDestinationPayload(BaseModel):
47
48
  if value is None:
48
49
  return value
49
50
 
51
+ if not isinstance(value, str):
52
+ value = str(value)
53
+
50
54
  if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 \-]*$", value):
51
55
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 \-]*$/")
52
56
  return value
53
57
 
54
58
  model_config = ConfigDict(
55
- populate_by_name=True,
59
+ validate_by_name=True,
60
+ validate_by_alias=True,
56
61
  validate_assignment=True,
57
62
  protected_namespaces=(),
58
63
  )
@@ -63,8 +68,7 @@ class UpdateDestinationPayload(BaseModel):
63
68
 
64
69
  def to_json(self) -> str:
65
70
  """Returns the JSON representation of the model using alias"""
66
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
67
- return json.dumps(self.to_dict())
71
+ return json.dumps(to_jsonable_python(self.to_dict()))
68
72
 
69
73
  @classmethod
70
74
  def from_json(cls, json_str: str) -> Optional[Self]:
@@ -19,6 +19,7 @@ import re # noqa: F401
19
19
  from typing import Any, ClassVar, Dict, List, Optional, Set
20
20
 
21
21
  from pydantic import BaseModel, ConfigDict, Field, field_validator
22
+ from pydantic_core import to_jsonable_python
22
23
  from typing_extensions import Annotated, Self
23
24
 
24
25
  from stackit.telemetryrouter.models.config_filter import ConfigFilter
@@ -47,12 +48,16 @@ class UpdateTelemetryRouterPayload(BaseModel):
47
48
  if value is None:
48
49
  return value
49
50
 
51
+ if not isinstance(value, str):
52
+ value = str(value)
53
+
50
54
  if not re.match(r"^[a-zA-Z0-9][a-zA-Z0-9 \-]*$", value):
51
55
  raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9][a-zA-Z0-9 \-]*$/")
52
56
  return value
53
57
 
54
58
  model_config = ConfigDict(
55
- populate_by_name=True,
59
+ validate_by_name=True,
60
+ validate_by_alias=True,
56
61
  validate_assignment=True,
57
62
  protected_namespaces=(),
58
63
  )
@@ -63,8 +68,7 @@ class UpdateTelemetryRouterPayload(BaseModel):
63
68
 
64
69
  def to_json(self) -> str:
65
70
  """Returns the JSON representation of the model using alias"""
66
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
67
- return json.dumps(self.to_dict())
71
+ return json.dumps(to_jsonable_python(self.to_dict()))
68
72
 
69
73
  @classmethod
70
74
  def from_json(cls, json_str: str) -> Optional[Self]: