stackit-edge 0.5.0__tar.gz → 0.7.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 (31) hide show
  1. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/PKG-INFO +3 -4
  2. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/pyproject.toml +7 -7
  3. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/__init__.py +9 -6
  4. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/api/default_api.py +6 -12
  5. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/api_client.py +5 -6
  6. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/api_response.py +0 -1
  7. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/configuration.py +5 -6
  8. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/exceptions.py +5 -5
  9. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/models/__init__.py +7 -5
  10. stackit_edge-0.7.0/src/stackit/edge/models/acl.py +99 -0
  11. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/models/bad_request.py +5 -5
  12. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/models/create_instance_payload.py +5 -5
  13. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/models/instance.py +13 -5
  14. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/models/instance_list.py +5 -5
  15. stackit_edge-0.7.0/src/stackit/edge/models/ip_allow_list_entry.py +138 -0
  16. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/models/kubeconfig.py +5 -5
  17. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/models/kubernetes_release_list.py +5 -5
  18. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/models/plan.py +5 -5
  19. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/models/plan_list.py +5 -5
  20. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/models/token.py +5 -5
  21. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/models/unauthorized_request.py +5 -5
  22. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/models/update_instance_by_name_payload.py +5 -5
  23. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/models/update_instance_payload.py +5 -5
  24. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/models/user.py +5 -5
  25. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/rest.py +5 -6
  26. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/.gitignore +0 -0
  27. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/LICENSE.md +0 -0
  28. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/NOTICE.txt +0 -0
  29. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/README.md +0 -0
  30. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/api/__init__.py +0 -0
  31. {stackit_edge-0.5.0 → stackit_edge-0.7.0}/src/stackit/edge/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackit-edge
3
- Version: 0.5.0
3
+ Version: 0.7.0
4
4
  Summary: STACKIT Edge Cloud 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
@@ -10,16 +10,15 @@ License-File: NOTICE.txt
10
10
  Classifier: License :: OSI Approved :: Apache Software License
11
11
  Classifier: Operating System :: OS Independent
12
12
  Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.9
14
13
  Classifier: Programming Language :: Python :: 3.10
15
14
  Classifier: Programming Language :: Python :: 3.11
16
15
  Classifier: Programming Language :: Python :: 3.12
17
16
  Classifier: Programming Language :: Python :: 3.13
18
17
  Classifier: Programming Language :: Python :: 3.14
19
- Requires-Python: <4,>=3.9
18
+ Requires-Python: <4.0,>=3.10
20
19
  Requires-Dist: pydantic>=2.9.2
21
20
  Requires-Dist: python-dateutil>=2.9.0.post0
22
- Requires-Dist: requests>=2.32.3
21
+ Requires-Dist: requests>=2.33.0
23
22
  Requires-Dist: stackit-core>=0.0.1a
24
23
  Description-Content-Type: text/markdown
25
24
 
@@ -1,15 +1,14 @@
1
1
  [project]
2
2
  name = "stackit-edge"
3
- version = "v0.5.0"
3
+ version = "v0.7.0"
4
4
  description = "STACKIT Edge Cloud API"
5
5
  authors = [{ name = "STACKIT Developer Tools", email = "developer-tools@stackit.cloud" }]
6
- requires-python = ">=3.9,<4"
6
+ requires-python = ">=3.10,<4.0"
7
7
  readme = "README.md"
8
8
  classifiers = [
9
9
  "Programming Language :: Python :: 3",
10
10
  "License :: OSI Approved :: Apache Software License",
11
11
  "Operating System :: OS Independent",
12
- "Programming Language :: Python :: 3.9",
13
12
  "Programming Language :: Python :: 3.10",
14
13
  "Programming Language :: Python :: 3.11",
15
14
  "Programming Language :: Python :: 3.12",
@@ -18,7 +17,7 @@ classifiers = [
18
17
  ]
19
18
  dependencies = [
20
19
  "stackit-core>=0.0.1a",
21
- "requests>=2.32.3",
20
+ "requests>=2.33.0",
22
21
  "pydantic>=2.9.2",
23
22
  "python-dateutil>=2.9.0.post0",
24
23
  ]
@@ -29,8 +28,8 @@ Issues = "https://github.com/stackitcloud/stackit-sdk-python/issues"
29
28
 
30
29
  [dependency-groups]
31
30
  dev = [
32
- "black>=24.8.0",
33
- "pytest>=8.3.3",
31
+ "black>=26.3.1",
32
+ "pytest>=9.1.1",
34
33
  "flake8>=5.0.3 ; python_full_version < '3.12'",
35
34
  "flake8>=6.0.1 ; python_full_version >= '3.12'",
36
35
  "flake8-black>=0.3.6",
@@ -102,7 +101,8 @@ show-source = false
102
101
  max-line-length = 120
103
102
  # E203,W503 and E704 are incompatible with the formatter black
104
103
  # W291 needs to be disabled because some doc-strings get generated with trailing whitespace but black won't re-format comments
105
- ignore = ["E203", "W503", "E704", "W291"]
104
+ # fixing B042 in upstream exceptions.mustache would be a breaking change
105
+ ignore = ["E203", "W503", "E704", "W291", "B042"]
106
106
  inline-quotes = '"'
107
107
  docstring-quotes = '"""'
108
108
  multiline-quotes = '"""'
@@ -3,17 +3,16 @@
3
3
  # flake8: noqa
4
4
 
5
5
  """
6
- STACKIT Edge Cloud API
6
+ STACKIT Edge Cloud API
7
7
 
8
- This API provides endpoints for managing STACKIT Edge Cloud instances.
8
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
9
9
 
10
- The version of the OpenAPI document: 1beta1
11
- Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+ The version of the OpenAPI document: 1beta1
11
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
12
12
 
13
- Do not edit the class manually.
13
+ Do not edit the class manually.
14
14
  """ # noqa: E501
15
15
 
16
-
17
16
  __version__ = "1.0.0"
18
17
 
19
18
  # Define package exports
@@ -28,10 +27,12 @@ __all__ = [
28
27
  "ApiKeyError",
29
28
  "ApiAttributeError",
30
29
  "ApiException",
30
+ "Acl",
31
31
  "BadRequest",
32
32
  "CreateInstancePayload",
33
33
  "Instance",
34
34
  "InstanceList",
35
+ "IpAllowListEntry",
35
36
  "Kubeconfig",
36
37
  "KubernetesReleaseList",
37
38
  "Plan",
@@ -58,12 +59,14 @@ from stackit.edge.exceptions import ApiValueError as ApiValueError
58
59
  from stackit.edge.exceptions import OpenApiException as OpenApiException
59
60
 
60
61
  # import models into sdk package
62
+ from stackit.edge.models.acl import Acl as Acl
61
63
  from stackit.edge.models.bad_request import BadRequest as BadRequest
62
64
  from stackit.edge.models.create_instance_payload import (
63
65
  CreateInstancePayload as CreateInstancePayload,
64
66
  )
65
67
  from stackit.edge.models.instance import Instance as Instance
66
68
  from stackit.edge.models.instance_list import InstanceList as InstanceList
69
+ from stackit.edge.models.ip_allow_list_entry import IpAllowListEntry as IpAllowListEntry
67
70
  from stackit.edge.models.kubeconfig import Kubeconfig as Kubeconfig
68
71
  from stackit.edge.models.kubernetes_release_list import (
69
72
  KubernetesReleaseList as KubernetesReleaseList,
@@ -1,26 +1,20 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from typing import Any, Dict, List, Optional, Tuple, Union
15
15
  from uuid import UUID
16
16
 
17
- from pydantic import (
18
- Field,
19
- StrictFloat,
20
- StrictInt,
21
- StrictStr,
22
- validate_call,
23
- )
17
+ from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
24
18
  from stackit.core.configuration import Configuration
25
19
  from typing_extensions import Annotated
26
20
 
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  import datetime
@@ -36,7 +36,6 @@ from stackit.edge.exceptions import (
36
36
  ApiException,
37
37
  )
38
38
 
39
-
40
39
  RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]]
41
40
 
42
41
 
@@ -6,7 +6,6 @@ from typing import Generic, Mapping, Optional, TypeVar
6
6
 
7
7
  from pydantic import BaseModel, Field, StrictBytes, StrictInt
8
8
 
9
-
10
9
  T = TypeVar("T")
11
10
 
12
11
 
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  import sys
@@ -18,7 +18,6 @@ from typing_extensions import NotRequired
18
18
 
19
19
  import os
20
20
 
21
-
22
21
  ServerVariablesT = Dict[str, str]
23
22
 
24
23
 
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from typing import Any, Optional
@@ -2,21 +2,23 @@
2
2
 
3
3
  # flake8: noqa
4
4
  """
5
- STACKIT Edge Cloud API
5
+ STACKIT Edge Cloud API
6
6
 
7
- This API provides endpoints for managing STACKIT Edge Cloud instances.
7
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
8
8
 
9
- The version of the OpenAPI document: 1beta1
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+ The version of the OpenAPI document: 1beta1
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
 
12
- Do not edit the class manually.
12
+ Do not edit the class manually.
13
13
  """ # noqa: E501
14
14
 
15
15
  # import models into model package
16
+ from stackit.edge.models.acl import Acl
16
17
  from stackit.edge.models.bad_request import BadRequest
17
18
  from stackit.edge.models.create_instance_payload import CreateInstancePayload
18
19
  from stackit.edge.models.instance import Instance
19
20
  from stackit.edge.models.instance_list import InstanceList
21
+ from stackit.edge.models.ip_allow_list_entry import IpAllowListEntry
20
22
  from stackit.edge.models.kubeconfig import Kubeconfig
21
23
  from stackit.edge.models.kubernetes_release_list import KubernetesReleaseList
22
24
  from stackit.edge.models.plan import Plan
@@ -0,0 +1,99 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Edge Cloud API
5
+
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
+
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from __future__ import annotations
15
+
16
+ import json
17
+ import pprint
18
+ from typing import Any, ClassVar, Dict, List, Optional, Set
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field
21
+ from pydantic_core import to_jsonable_python
22
+ from typing_extensions import Self
23
+
24
+ from stackit.edge.models.ip_allow_list_entry import IpAllowListEntry
25
+
26
+
27
+ class Acl(BaseModel):
28
+ """
29
+ The ACL config for the instances API.
30
+ """ # noqa: E501
31
+
32
+ ip_allow_list: Optional[List[IpAllowListEntry]] = Field(default=None, alias="ipAllowList")
33
+ __properties: ClassVar[List[str]] = ["ipAllowList"]
34
+
35
+ model_config = ConfigDict(
36
+ validate_by_name=True,
37
+ validate_by_alias=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.model_dump(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ return json.dumps(to_jsonable_python(self.to_dict()))
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> Optional[Self]:
52
+ """Create an instance of Acl from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self) -> Dict[str, Any]:
56
+ """Return the dictionary representation of the model using alias.
57
+
58
+ This has the following differences from calling pydantic's
59
+ `self.model_dump(by_alias=True)`:
60
+
61
+ * `None` is only added to the output dict for nullable fields that
62
+ were set at model initialization. Other fields with value `None`
63
+ are ignored.
64
+ """
65
+ excluded_fields: Set[str] = set([])
66
+
67
+ _dict = self.model_dump(
68
+ by_alias=True,
69
+ exclude=excluded_fields,
70
+ exclude_none=True,
71
+ )
72
+ # override the default output from pydantic by calling `to_dict()` of each item in ip_allow_list (list)
73
+ _items = []
74
+ if self.ip_allow_list:
75
+ for _item_ip_allow_list in self.ip_allow_list:
76
+ if _item_ip_allow_list:
77
+ _items.append(_item_ip_allow_list.to_dict())
78
+ _dict["ipAllowList"] = _items
79
+ return _dict
80
+
81
+ @classmethod
82
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
83
+ """Create an instance of Acl from a dict"""
84
+ if obj is None:
85
+ return None
86
+
87
+ if not isinstance(obj, dict):
88
+ return cls.model_validate(obj)
89
+
90
+ _obj = cls.model_validate(
91
+ {
92
+ "ipAllowList": (
93
+ [IpAllowListEntry.from_dict(_item) for _item in obj["ipAllowList"]]
94
+ if obj.get("ipAllowList") is not None
95
+ else None
96
+ )
97
+ }
98
+ )
99
+ return _obj
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -24,12 +24,15 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
24
24
  from pydantic_core import to_jsonable_python
25
25
  from typing_extensions import Annotated, Self
26
26
 
27
+ from stackit.edge.models.acl import Acl
28
+
27
29
 
28
30
  class Instance(BaseModel):
29
31
  """
30
32
  Instance
31
33
  """ # noqa: E501
32
34
 
35
+ acl: Optional[Acl] = None
33
36
  created: datetime = Field(description="The date and time the creation of the instance was triggered.")
34
37
  description: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(
35
38
  default=None, description="A user chosen description to distinguish multiple instances."
@@ -44,6 +47,7 @@ class Instance(BaseModel):
44
47
  plan_id: UUID = Field(description="Service Plan configures the size of the Instance.", alias="planId")
45
48
  status: StrictStr = Field(description="The current status of the instance.")
46
49
  __properties: ClassVar[List[str]] = [
50
+ "acl",
47
51
  "created",
48
52
  "description",
49
53
  "displayName",
@@ -110,6 +114,9 @@ class Instance(BaseModel):
110
114
  exclude=excluded_fields,
111
115
  exclude_none=True,
112
116
  )
117
+ # override the default output from pydantic by calling `to_dict()` of acl
118
+ if self.acl:
119
+ _dict["acl"] = self.acl.to_dict()
113
120
  return _dict
114
121
 
115
122
  @classmethod
@@ -123,6 +130,7 @@ class Instance(BaseModel):
123
130
 
124
131
  _obj = cls.model_validate(
125
132
  {
133
+ "acl": Acl.from_dict(obj["acl"]) if obj.get("acl") is not None else None,
126
134
  "created": obj.get("created"),
127
135
  "description": obj.get("description"),
128
136
  "displayName": obj.get("displayName"),
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -0,0 +1,138 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Edge Cloud API
5
+
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
+
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from __future__ import annotations
15
+
16
+ import json
17
+ import pprint
18
+ import re # noqa: F401
19
+ from datetime import datetime
20
+ from typing import Any, ClassVar, Dict, List, Optional, Set
21
+ from uuid import UUID
22
+
23
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
24
+ from pydantic_core import to_jsonable_python
25
+ from typing_extensions import Annotated, Self
26
+
27
+
28
+ class IpAllowListEntry(BaseModel):
29
+ """
30
+ IpAllowListEntry
31
+ """ # noqa: E501
32
+
33
+ created_at: Optional[datetime] = Field(
34
+ default=None, description="ISO-8601 timestamp of when the entry was created.", alias="createdAt"
35
+ )
36
+ description: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field(
37
+ default=None, description="Some description of the entry."
38
+ )
39
+ ip_range: StrictStr = Field(description="The IP CIDR range for the ACL entry.", alias="ipRange")
40
+ updated_at: Optional[datetime] = Field(
41
+ default=None, description="ISO-8601 timestamp of when the entry was last updated.", alias="updatedAt"
42
+ )
43
+ uuid: UUID = Field(
44
+ description="The unique identifier for the ipAllowListEntry entry. This value is immutable, used to identify entries for updates, and cannot be changed after creation."
45
+ )
46
+ __properties: ClassVar[List[str]] = ["createdAt", "description", "ipRange", "updatedAt", "uuid"]
47
+
48
+ @field_validator("created_at", mode="before")
49
+ def created_at_change_year_zero_to_one(cls, value):
50
+ """Workaround which prevents year 0 issue"""
51
+ if isinstance(value, str):
52
+ # Check for year "0000" at the beginning of the string
53
+ # This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
54
+ if value.startswith("0000-01-01T") and re.match(
55
+ r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
56
+ ):
57
+ # Workaround: Replace "0000" with "0001"
58
+ return "0001" + value[4:] # Take "0001" and append the rest of the string
59
+ return value
60
+
61
+ @field_validator("updated_at", mode="before")
62
+ def updated_at_change_year_zero_to_one(cls, value):
63
+ """Workaround which prevents year 0 issue"""
64
+ if isinstance(value, str):
65
+ # Check for year "0000" at the beginning of the string
66
+ # This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
67
+ if value.startswith("0000-01-01T") and re.match(
68
+ r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
69
+ ):
70
+ # Workaround: Replace "0000" with "0001"
71
+ return "0001" + value[4:] # Take "0001" and append the rest of the string
72
+ return value
73
+
74
+ model_config = ConfigDict(
75
+ validate_by_name=True,
76
+ validate_by_alias=True,
77
+ validate_assignment=True,
78
+ protected_namespaces=(),
79
+ )
80
+
81
+ def to_str(self) -> str:
82
+ """Returns the string representation of the model using alias"""
83
+ return pprint.pformat(self.model_dump(by_alias=True))
84
+
85
+ def to_json(self) -> str:
86
+ """Returns the JSON representation of the model using alias"""
87
+ return json.dumps(to_jsonable_python(self.to_dict()))
88
+
89
+ @classmethod
90
+ def from_json(cls, json_str: str) -> Optional[Self]:
91
+ """Create an instance of IpAllowListEntry from a JSON string"""
92
+ return cls.from_dict(json.loads(json_str))
93
+
94
+ def to_dict(self) -> Dict[str, Any]:
95
+ """Return the dictionary representation of the model using alias.
96
+
97
+ This has the following differences from calling pydantic's
98
+ `self.model_dump(by_alias=True)`:
99
+
100
+ * `None` is only added to the output dict for nullable fields that
101
+ were set at model initialization. Other fields with value `None`
102
+ are ignored.
103
+ * OpenAPI `readOnly` fields are excluded.
104
+ * OpenAPI `readOnly` fields are excluded.
105
+ """
106
+ excluded_fields: Set[str] = set(
107
+ [
108
+ "created_at",
109
+ "updated_at",
110
+ ]
111
+ )
112
+
113
+ _dict = self.model_dump(
114
+ by_alias=True,
115
+ exclude=excluded_fields,
116
+ exclude_none=True,
117
+ )
118
+ return _dict
119
+
120
+ @classmethod
121
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
122
+ """Create an instance of IpAllowListEntry from a dict"""
123
+ if obj is None:
124
+ return None
125
+
126
+ if not isinstance(obj, dict):
127
+ return cls.model_validate(obj)
128
+
129
+ _obj = cls.model_validate(
130
+ {
131
+ "createdAt": obj.get("createdAt"),
132
+ "description": obj.get("description"),
133
+ "ipRange": obj.get("ipRange"),
134
+ "updatedAt": obj.get("updatedAt"),
135
+ "uuid": obj.get("uuid"),
136
+ }
137
+ )
138
+ return _obj
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  from __future__ import annotations
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Edge Cloud API
4
+ STACKIT Edge Cloud API
5
5
 
6
- This API provides endpoints for managing STACKIT Edge Cloud instances.
6
+ This API provides endpoints for managing STACKIT Edge Cloud instances.
7
7
 
8
- The version of the OpenAPI document: 1beta1
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 1beta1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
10
 
11
- Do not edit the class manually.
11
+ Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
14
  import io
@@ -21,7 +21,6 @@ from stackit.core.configuration import Configuration
21
21
 
22
22
  from stackit.edge.exceptions import ApiException, ApiValueError
23
23
 
24
-
25
24
  RESTResponseType = requests.Response
26
25
 
27
26
 
File without changes
File without changes
File without changes
File without changes