stackit-certificates 1.5.0__tar.gz → 1.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 (27) hide show
  1. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/PKG-INFO +3 -4
  2. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/pyproject.toml +8 -8
  3. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/__init__.py +11 -6
  4. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/api/default_api.py +5 -5
  5. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/api_client.py +5 -6
  6. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/api_response.py +0 -1
  7. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/configuration.py +5 -6
  8. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/exceptions.py +5 -5
  9. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/models/__init__.py +8 -5
  10. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/models/certificates_quota.py +5 -5
  11. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/models/create_certificate_payload.py +5 -5
  12. stackit_certificates-1.7.0/src/stackit/certificates/models/data.py +220 -0
  13. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/models/get_certificate_response.py +20 -7
  14. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/models/get_quota_response.py +5 -5
  15. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/models/google_protobuf_any.py +5 -5
  16. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/models/list_certificates_response.py +5 -5
  17. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/models/quotas.py +5 -5
  18. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/models/status.py +5 -5
  19. stackit_certificates-1.7.0/src/stackit/certificates/models/usage.py +101 -0
  20. stackit_certificates-1.7.0/src/stackit/certificates/models/usage_item.py +91 -0
  21. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/rest.py +5 -6
  22. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/.gitignore +0 -0
  23. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/LICENSE.md +0 -0
  24. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/NOTICE.txt +0 -0
  25. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/README.md +0 -0
  26. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/api/__init__.py +0 -0
  27. {stackit_certificates-1.5.0 → stackit_certificates-1.7.0}/src/stackit/certificates/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackit-certificates
3
- Version: 1.5.0
3
+ Version: 1.7.0
4
4
  Summary: Load Balancer Certificates 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.0,>=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-certificates"
3
- version = "v1.5.0"
3
+ version = "v1.7.0"
4
4
  description = "Load Balancer Certificates API"
5
5
  authors = [{ name = "STACKIT Developer Tools", email = "developer-tools@stackit.cloud" }]
6
- requires-python = ">=3.9,<4.0"
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 = '"""'
@@ -111,7 +111,7 @@ per-file-ignores = """
111
111
  # asserts are fine in tests, tests shouldn't be build optimized
112
112
  ./tests/*: S101,
113
113
  # F841: some variables get generated but may not be used, depending on the api-spec
114
- # E501: long descriptions/string values might lead to lines that are too long
114
+ # E501: long descriptions/string values might lead to lines that are too long
115
115
  ./src/stackit/*/models/*: F841,E501
116
116
  # F841: some variables get generated but may not be used, depending on the api-spec
117
117
  # E501: long descriptions/string values might lead to lines that are too long
@@ -3,17 +3,16 @@
3
3
  # flake8: noqa
4
4
 
5
5
  """
6
- STACKIT Application Load Balancer Certificates API
6
+ STACKIT Application Load Balancer Certificates API
7
7
 
8
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
8
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
9
9
 
10
- The version of the OpenAPI document: 2.0.0
11
- Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+ The version of the OpenAPI document: 2.0.0
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
@@ -30,12 +29,15 @@ __all__ = [
30
29
  "ApiException",
31
30
  "CertificatesQuota",
32
31
  "CreateCertificatePayload",
32
+ "Data",
33
33
  "GetCertificateResponse",
34
34
  "GetQuotaResponse",
35
35
  "GoogleProtobufAny",
36
36
  "ListCertificatesResponse",
37
37
  "Quotas",
38
38
  "Status",
39
+ "Usage",
40
+ "UsageItem",
39
41
  ]
40
42
 
41
43
  # import apis into sdk package
@@ -59,6 +61,7 @@ from stackit.certificates.models.certificates_quota import (
59
61
  from stackit.certificates.models.create_certificate_payload import (
60
62
  CreateCertificatePayload as CreateCertificatePayload,
61
63
  )
64
+ from stackit.certificates.models.data import Data as Data
62
65
  from stackit.certificates.models.get_certificate_response import (
63
66
  GetCertificateResponse as GetCertificateResponse,
64
67
  )
@@ -73,3 +76,5 @@ from stackit.certificates.models.list_certificates_response import (
73
76
  )
74
77
  from stackit.certificates.models.quotas import Quotas as Quotas
75
78
  from stackit.certificates.models.status import Status as Status
79
+ from stackit.certificates.models.usage import Usage as Usage
80
+ from stackit.certificates.models.usage_item import UsageItem as UsageItem
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Application Load Balancer Certificates API
4
+ STACKIT Application Load Balancer Certificates API
5
5
 
6
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0.0
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
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Application Load Balancer Certificates API
4
+ STACKIT Application Load Balancer Certificates API
5
5
 
6
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0.0
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.certificates.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 Application Load Balancer Certificates API
4
+ STACKIT Application Load Balancer Certificates API
5
5
 
6
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0.0
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 Application Load Balancer Certificates API
4
+ STACKIT Application Load Balancer Certificates API
5
5
 
6
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0.0
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,14 +2,14 @@
2
2
 
3
3
  # flake8: noqa
4
4
  """
5
- STACKIT Application Load Balancer Certificates API
5
+ STACKIT Application Load Balancer Certificates API
6
6
 
7
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
8
8
 
9
- The version of the OpenAPI document: 2.0.0
10
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+ The version of the OpenAPI document: 2.0.0
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
@@ -17,6 +17,7 @@ from stackit.certificates.models.certificates_quota import CertificatesQuota
17
17
  from stackit.certificates.models.create_certificate_payload import (
18
18
  CreateCertificatePayload,
19
19
  )
20
+ from stackit.certificates.models.data import Data
20
21
  from stackit.certificates.models.get_certificate_response import GetCertificateResponse
21
22
  from stackit.certificates.models.get_quota_response import GetQuotaResponse
22
23
  from stackit.certificates.models.google_protobuf_any import GoogleProtobufAny
@@ -25,3 +26,5 @@ from stackit.certificates.models.list_certificates_response import (
25
26
  )
26
27
  from stackit.certificates.models.quotas import Quotas
27
28
  from stackit.certificates.models.status import Status
29
+ from stackit.certificates.models.usage import Usage
30
+ from stackit.certificates.models.usage_item import UsageItem
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Application Load Balancer Certificates API
4
+ STACKIT Application Load Balancer Certificates API
5
5
 
6
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0.0
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 Application Load Balancer Certificates API
4
+ STACKIT Application Load Balancer Certificates API
5
5
 
6
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0.0
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,220 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Application Load Balancer Certificates API
5
+
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
+
8
+ The version of the OpenAPI document: 2.0.0
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 typing import Any, ClassVar, Dict, List, Optional, Set
20
+
21
+ from pydantic import (
22
+ BaseModel,
23
+ ConfigDict,
24
+ Field,
25
+ StrictBool,
26
+ StrictStr,
27
+ field_validator,
28
+ )
29
+ from pydantic_core import to_jsonable_python
30
+ from typing_extensions import Annotated, Self
31
+
32
+
33
+ class Data(BaseModel):
34
+ """
35
+ Data
36
+ """ # noqa: E501
37
+
38
+ dns_names: Optional[StrictStr] = Field(
39
+ default=None,
40
+ description="Comma-separated list of all domains and IP addresses the certificate is valid for (Subject Alternative Names).",
41
+ alias="dnsNames",
42
+ )
43
+ extended_key_usage: Optional[StrictStr] = Field(
44
+ default=None,
45
+ description="Comma-separated list of purposes the cert is valid for. 'Server Auth' is required for Load Balancer use.",
46
+ alias="extendedKeyUsage",
47
+ )
48
+ fingerprint_sha1: Optional[Annotated[str, Field(strict=True)]] = Field(
49
+ default=None,
50
+ description="The legacy SHA1 thumbprint. Provided for cross-referencing with older systems and browsers.",
51
+ alias="fingerprintSha1",
52
+ )
53
+ fingerprint_sha256: Optional[Annotated[str, Field(strict=True)]] = Field(
54
+ default=None,
55
+ description="The unique SHA256 hash of the raw certificate bytes. Use this as the primary unique identifier.",
56
+ alias="fingerprintSha256",
57
+ )
58
+ is_ca: Optional[StrictBool] = Field(
59
+ default=None,
60
+ description="Indicates if the certificate is a Certificate Authority, meaning it can sign other certificates.",
61
+ alias="isCa",
62
+ )
63
+ is_self_signed: Optional[StrictBool] = Field(
64
+ default=None,
65
+ description="Indicates if the certificate was signed by its own private key rather than a trusted third-party CA.",
66
+ alias="isSelfSigned",
67
+ )
68
+ issuer_cn: Optional[StrictStr] = Field(
69
+ default=None,
70
+ description="The Common Name of the Certificate Authority (CA) that signed and issued the certificate.",
71
+ alias="issuerCn",
72
+ )
73
+ key_strength: Optional[StrictStr] = Field(
74
+ default=None,
75
+ description="Human-readable summary of the public key's algorithm and bit-length or curve name.",
76
+ alias="keyStrength",
77
+ )
78
+ not_after: Optional[StrictStr] = Field(
79
+ default=None,
80
+ description="The expiration timestamp. After this date, browsers will show security warnings (RFC3339 format).",
81
+ alias="notAfter",
82
+ )
83
+ not_before: Optional[StrictStr] = Field(
84
+ default=None,
85
+ description="The timestamp indicating when the certificate starts being valid (RFC3339 format).",
86
+ alias="notBefore",
87
+ )
88
+ organization: Optional[StrictStr] = Field(
89
+ default=None, description="Organization name associated with the certificate subject."
90
+ )
91
+ public_key_algorithm: Optional[StrictStr] = Field(
92
+ default=None,
93
+ description="The cryptographic algorithm used to generate the public/private key pair.",
94
+ alias="publicKeyAlgorithm",
95
+ )
96
+ serial_number: Optional[StrictStr] = Field(
97
+ default=None,
98
+ description="The unique serial number assigned by the CA, represented in uppercase hexadecimal format.",
99
+ alias="serialNumber",
100
+ )
101
+ signature_algorithm: Optional[StrictStr] = Field(
102
+ default=None, description="The algorithm used by the CA to sign this certificate.", alias="signatureAlgorithm"
103
+ )
104
+ subject_cn: Optional[StrictStr] = Field(
105
+ default=None,
106
+ description="The primary identity of the certificate. Fallback sequence: Common Name -> First DNS Name -> Full Subject String.",
107
+ alias="subjectCn",
108
+ )
109
+ __properties: ClassVar[List[str]] = [
110
+ "dnsNames",
111
+ "extendedKeyUsage",
112
+ "fingerprintSha1",
113
+ "fingerprintSha256",
114
+ "isCa",
115
+ "isSelfSigned",
116
+ "issuerCn",
117
+ "keyStrength",
118
+ "notAfter",
119
+ "notBefore",
120
+ "organization",
121
+ "publicKeyAlgorithm",
122
+ "serialNumber",
123
+ "signatureAlgorithm",
124
+ "subjectCn",
125
+ ]
126
+
127
+ @field_validator("fingerprint_sha1")
128
+ def fingerprint_sha1_validate_regular_expression(cls, value):
129
+ """Validates the regular expression"""
130
+ if value is None:
131
+ return value
132
+
133
+ if not isinstance(value, str):
134
+ value = str(value)
135
+
136
+ if not re.match(r"^[a-fA-F0-9]{40}$", value):
137
+ raise ValueError(r"must validate the regular expression /^[a-fA-F0-9]{40}$/")
138
+ return value
139
+
140
+ @field_validator("fingerprint_sha256")
141
+ def fingerprint_sha256_validate_regular_expression(cls, value):
142
+ """Validates the regular expression"""
143
+ if value is None:
144
+ return value
145
+
146
+ if not isinstance(value, str):
147
+ value = str(value)
148
+
149
+ if not re.match(r"^[a-fA-F0-9]{64}$", value):
150
+ raise ValueError(r"must validate the regular expression /^[a-fA-F0-9]{64}$/")
151
+ return value
152
+
153
+ model_config = ConfigDict(
154
+ validate_by_name=True,
155
+ validate_by_alias=True,
156
+ validate_assignment=True,
157
+ protected_namespaces=(),
158
+ )
159
+
160
+ def to_str(self) -> str:
161
+ """Returns the string representation of the model using alias"""
162
+ return pprint.pformat(self.model_dump(by_alias=True))
163
+
164
+ def to_json(self) -> str:
165
+ """Returns the JSON representation of the model using alias"""
166
+ return json.dumps(to_jsonable_python(self.to_dict()))
167
+
168
+ @classmethod
169
+ def from_json(cls, json_str: str) -> Optional[Self]:
170
+ """Create an instance of Data from a JSON string"""
171
+ return cls.from_dict(json.loads(json_str))
172
+
173
+ def to_dict(self) -> Dict[str, Any]:
174
+ """Return the dictionary representation of the model using alias.
175
+
176
+ This has the following differences from calling pydantic's
177
+ `self.model_dump(by_alias=True)`:
178
+
179
+ * `None` is only added to the output dict for nullable fields that
180
+ were set at model initialization. Other fields with value `None`
181
+ are ignored.
182
+ """
183
+ excluded_fields: Set[str] = set([])
184
+
185
+ _dict = self.model_dump(
186
+ by_alias=True,
187
+ exclude=excluded_fields,
188
+ exclude_none=True,
189
+ )
190
+ return _dict
191
+
192
+ @classmethod
193
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
194
+ """Create an instance of Data from a dict"""
195
+ if obj is None:
196
+ return None
197
+
198
+ if not isinstance(obj, dict):
199
+ return cls.model_validate(obj)
200
+
201
+ _obj = cls.model_validate(
202
+ {
203
+ "dnsNames": obj.get("dnsNames"),
204
+ "extendedKeyUsage": obj.get("extendedKeyUsage"),
205
+ "fingerprintSha1": obj.get("fingerprintSha1"),
206
+ "fingerprintSha256": obj.get("fingerprintSha256"),
207
+ "isCa": obj.get("isCa"),
208
+ "isSelfSigned": obj.get("isSelfSigned"),
209
+ "issuerCn": obj.get("issuerCn"),
210
+ "keyStrength": obj.get("keyStrength"),
211
+ "notAfter": obj.get("notAfter"),
212
+ "notBefore": obj.get("notBefore"),
213
+ "organization": obj.get("organization"),
214
+ "publicKeyAlgorithm": obj.get("publicKeyAlgorithm"),
215
+ "serialNumber": obj.get("serialNumber"),
216
+ "signatureAlgorithm": obj.get("signatureAlgorithm"),
217
+ "subjectCn": obj.get("subjectCn"),
218
+ }
219
+ )
220
+ return _obj
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Application Load Balancer Certificates API
4
+ STACKIT Application Load Balancer Certificates API
5
5
 
6
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0.0
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
@@ -22,23 +22,28 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
22
22
  from pydantic_core import to_jsonable_python
23
23
  from typing_extensions import Annotated, Self
24
24
 
25
+ from stackit.certificates.models.data import Data
26
+ from stackit.certificates.models.usage import Usage
27
+
25
28
 
26
29
  class GetCertificateResponse(BaseModel):
27
30
  """
28
31
  GetCertificateResponse returns name, id and public key
29
32
  """ # noqa: E501
30
33
 
34
+ data: Optional[Data] = None
31
35
  id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="The certificates resource id")
32
36
  labels: Optional[Dict[str, StrictStr]] = Field(
33
37
  default=None,
34
38
  description="Labels represent user-defined metadata as key-value pairs. Label count should not exceed 64 per Certificate. **Key Formatting Rules:** Length: 1-63 characters. Characters: Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. Keys starting with 'stackit-' are system-reserved; users MUST NOT manage them. **Value Formatting Rules:** Length: 0-63 characters (empty string explicitly allowed). Characters (for non-empty values): Must begin and end with [a-zA-Z0-9]. May contain dashes (-), underscores (_), dots (.), and alphanumerics in between. ",
35
39
  )
36
- name: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="TLS certificate name")
40
+ name: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Certificate display name")
37
41
  public_key: Optional[StrictStr] = Field(
38
42
  default=None, description="The PEM encoded public key part", alias="publicKey"
39
43
  )
40
44
  region: Optional[StrictStr] = Field(default=None, description="Region of the LoadBalancer")
41
- __properties: ClassVar[List[str]] = ["id", "labels", "name", "publicKey", "region"]
45
+ usage: Optional[Usage] = None
46
+ __properties: ClassVar[List[str]] = ["data", "id", "labels", "name", "publicKey", "region", "usage"]
42
47
 
43
48
  @field_validator("id")
44
49
  def id_validate_regular_expression(cls, value):
@@ -103,6 +108,12 @@ class GetCertificateResponse(BaseModel):
103
108
  exclude=excluded_fields,
104
109
  exclude_none=True,
105
110
  )
111
+ # override the default output from pydantic by calling `to_dict()` of data
112
+ if self.data:
113
+ _dict["data"] = self.data.to_dict()
114
+ # override the default output from pydantic by calling `to_dict()` of usage
115
+ if self.usage:
116
+ _dict["usage"] = self.usage.to_dict()
106
117
  return _dict
107
118
 
108
119
  @classmethod
@@ -116,11 +127,13 @@ class GetCertificateResponse(BaseModel):
116
127
 
117
128
  _obj = cls.model_validate(
118
129
  {
130
+ "data": Data.from_dict(obj["data"]) if obj.get("data") is not None else None,
119
131
  "id": obj.get("id"),
120
132
  "labels": obj.get("labels"),
121
133
  "name": obj.get("name"),
122
134
  "publicKey": obj.get("publicKey"),
123
135
  "region": obj.get("region"),
136
+ "usage": Usage.from_dict(obj["usage"]) if obj.get("usage") is not None else None,
124
137
  }
125
138
  )
126
139
  return _obj
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Application Load Balancer Certificates API
4
+ STACKIT Application Load Balancer Certificates API
5
5
 
6
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0.0
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 Application Load Balancer Certificates API
4
+ STACKIT Application Load Balancer Certificates API
5
5
 
6
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0.0
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 Application Load Balancer Certificates API
4
+ STACKIT Application Load Balancer Certificates API
5
5
 
6
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0.0
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 Application Load Balancer Certificates API
4
+ STACKIT Application Load Balancer Certificates API
5
5
 
6
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0.0
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 Application Load Balancer Certificates API
4
+ STACKIT Application Load Balancer Certificates API
5
5
 
6
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0.0
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,101 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Application Load Balancer Certificates API
5
+
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
+
8
+ The version of the OpenAPI document: 2.0.0
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, StrictInt
21
+ from pydantic_core import to_jsonable_python
22
+ from typing_extensions import Self
23
+
24
+ from stackit.certificates.models.usage_item import UsageItem
25
+
26
+
27
+ class Usage(BaseModel):
28
+ """
29
+ Usage
30
+ """ # noqa: E501
31
+
32
+ count: Optional[StrictInt] = Field(default=None, description="Number of Load Balancers using this certificate.")
33
+ items: Optional[List[UsageItem]] = Field(
34
+ default=None, description="List of Load Balancers with their associated listeners that use this certificate."
35
+ )
36
+ __properties: ClassVar[List[str]] = ["count", "items"]
37
+
38
+ model_config = ConfigDict(
39
+ validate_by_name=True,
40
+ validate_by_alias=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ return json.dumps(to_jsonable_python(self.to_dict()))
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of Usage from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ """
68
+ excluded_fields: Set[str] = set([])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ # override the default output from pydantic by calling `to_dict()` of each item in items (list)
76
+ _items = []
77
+ if self.items:
78
+ for _item_items in self.items:
79
+ if _item_items:
80
+ _items.append(_item_items.to_dict())
81
+ _dict["items"] = _items
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of Usage from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate(
94
+ {
95
+ "count": obj.get("count"),
96
+ "items": (
97
+ [UsageItem.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None
98
+ ),
99
+ }
100
+ )
101
+ return _obj
@@ -0,0 +1,91 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ STACKIT Application Load Balancer Certificates API
5
+
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
+
8
+ The version of the OpenAPI document: 2.0.0
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, StrictStr
21
+ from pydantic_core import to_jsonable_python
22
+ from typing_extensions import Self
23
+
24
+
25
+ class UsageItem(BaseModel):
26
+ """
27
+ UsageItem
28
+ """ # noqa: E501
29
+
30
+ listener_names: Optional[List[StrictStr]] = Field(
31
+ default=None,
32
+ description="A list of listener names on this Load Balancer that are using the certificate.",
33
+ alias="listenerNames",
34
+ )
35
+ load_balancer_name: Optional[StrictStr] = Field(
36
+ default=None, description="The display name of the Load Balancer.", alias="loadBalancerName"
37
+ )
38
+ __properties: ClassVar[List[str]] = ["listenerNames", "loadBalancerName"]
39
+
40
+ model_config = ConfigDict(
41
+ validate_by_name=True,
42
+ validate_by_alias=True,
43
+ validate_assignment=True,
44
+ protected_namespaces=(),
45
+ )
46
+
47
+ def to_str(self) -> str:
48
+ """Returns the string representation of the model using alias"""
49
+ return pprint.pformat(self.model_dump(by_alias=True))
50
+
51
+ def to_json(self) -> str:
52
+ """Returns the JSON representation of the model using alias"""
53
+ return json.dumps(to_jsonable_python(self.to_dict()))
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of UsageItem from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of UsageItem from a dict"""
82
+ if obj is None:
83
+ return None
84
+
85
+ if not isinstance(obj, dict):
86
+ return cls.model_validate(obj)
87
+
88
+ _obj = cls.model_validate(
89
+ {"listenerNames": obj.get("listenerNames"), "loadBalancerName": obj.get("loadBalancerName")}
90
+ )
91
+ return _obj
@@ -1,14 +1,14 @@
1
1
  # coding: utf-8
2
2
 
3
3
  """
4
- STACKIT Application Load Balancer Certificates API
4
+ STACKIT Application Load Balancer Certificates API
5
5
 
6
- This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
6
+ This API offers the ability to store TLS certificates, which can be used by load balancing servers in STACKIT. They can be between consumer and load balancing server and/or between load balancing server and endpoint server.
7
7
 
8
- The version of the OpenAPI document: 2.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
8
+ The version of the OpenAPI document: 2.0.0
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.certificates.exceptions import ApiException, ApiValueError
23
23
 
24
-
25
24
  RESTResponseType = requests.Response
26
25
 
27
26