Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Generator: Update SDK /services/kms#2246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletionsservices/kms/src/stackit/kms/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,6 +28,7 @@
"ApiKeyError",
"ApiAttributeError",
"ApiException",
"AccessScope",
"Algorithm",
"Backend",
"CreateKeyPayload",
Expand All@@ -43,6 +44,7 @@
"KeyList",
"KeyRing",
"KeyRingList",
"Protection",
"Purpose",
"SignPayload",
"SignedData",
Expand DownExpand Up@@ -71,6 +73,7 @@
from stackit.kms.exceptions import OpenApiException as OpenApiException

# import models into sdk package
from stackit.kms.models.access_scope import AccessScope as AccessScope
from stackit.kms.models.algorithm import Algorithm as Algorithm
from stackit.kms.models.backend import Backend as Backend
from stackit.kms.models.create_key_payload import CreateKeyPayload as CreateKeyPayload
Expand All@@ -90,6 +93,7 @@
from stackit.kms.models.key_list import KeyList as KeyList
from stackit.kms.models.key_ring import KeyRing as KeyRing
from stackit.kms.models.key_ring_list import KeyRingList as KeyRingList
from stackit.kms.models.protection import Protection as Protection
from stackit.kms.models.purpose import Purpose as Purpose
from stackit.kms.models.sign_payload import SignPayload as SignPayload
from stackit.kms.models.signed_data import SignedData as SignedData
Expand Down
2 changes: 2 additions & 0 deletionsservices/kms/src/stackit/kms/models/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,7 @@


# import models into model package
from stackit.kms.models.access_scope import AccessScope
from stackit.kms.models.algorithm import Algorithm
from stackit.kms.models.backend import Backend
from stackit.kms.models.create_key_payload import CreateKeyPayload
Expand All@@ -29,6 +30,7 @@
from stackit.kms.models.key_list import KeyList
from stackit.kms.models.key_ring import KeyRing
from stackit.kms.models.key_ring_list import KeyRingList
from stackit.kms.models.protection import Protection
from stackit.kms.models.purpose import Purpose
from stackit.kms.models.sign_payload import SignPayload
from stackit.kms.models.signed_data import SignedData
Expand Down
36 changes: 36 additions & 0 deletionsservices/kms/src/stackit/kms/models/access_scope.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
# coding: utf-8

"""
STACKIT Key Management Service API

This API provides endpoints for managing keys and key rings.

The version of the OpenAPI document: 1beta.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501

from __future__ import annotations

import json
from enum import Enum

from typing_extensions import Self


class AccessScope(str, Enum):
"""
The access scope of the key.
"""

"""
allowed enum values
"""
PUBLIC = "PUBLIC"
SNA = "SNA"

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AccessScope from a JSON string"""
return cls(json.loads(json_str))
2 changes: 1 addition & 1 deletionservices/kms/src/stackit/kms/models/backend.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,7 @@

class Backend(str, Enum):
"""
The backend that is responsible for maintaining this key.
The backend that is responsible for maintaining this key. Deprecated - use `protection`.
"""

"""
Expand Down
17 changes: 16 additions & 1 deletionservices/kms/src/stackit/kms/models/create_key_payload.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,8 +20,10 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing_extensions import Annotated, Self

from stackit.kms.models.access_scope import AccessScope
from stackit.kms.models.algorithm import Algorithm
from stackit.kms.models.backend import Backend
from stackit.kms.models.protection import Protection
from stackit.kms.models.purpose import Purpose


Expand All@@ -30,6 +32,7 @@ class CreateKeyPayload(BaseModel):
CreateKeyPayload
""" # noqa: E501

access_scope: Optional[AccessScope] = AccessScope.PUBLIC
algorithm: Algorithm
backend: Backend
description: Optional[StrictStr] = Field(
Expand All@@ -41,8 +44,18 @@ class CreateKeyPayload(BaseModel):
import_only: Optional[StrictBool] = Field(
default=False, description="States whether versions can be created or only imported.", alias="importOnly"
)
protection: Optional[Protection] = None
purpose: Purpose
__properties: ClassVar[List[str]] = ["algorithm", "backend", "description", "displayName", "importOnly", "purpose"]
__properties: ClassVar[List[str]] = [
"access_scope",
"algorithm",
"backend",
"description",
"displayName",
"importOnly",
"protection",
"purpose",
]

model_config = ConfigDict(
populate_by_name=True,
Expand DownExpand Up@@ -94,11 +107,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate(
{
"access_scope": obj.get("access_scope") if obj.get("access_scope") is not None else AccessScope.PUBLIC,
"algorithm": obj.get("algorithm"),
"backend": obj.get("backend"),
"description": obj.get("description"),
"displayName": obj.get("displayName"),
"importOnly": obj.get("importOnly") if obj.get("importOnly") is not None else False,
"protection": obj.get("protection"),
"purpose": obj.get("purpose"),
}
)
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,9 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing_extensions import Annotated, Self

from stackit.kms.models.access_scope import AccessScope
from stackit.kms.models.backend import Backend
from stackit.kms.models.protection import Protection
from stackit.kms.models.wrapping_algorithm import WrappingAlgorithm
from stackit.kms.models.wrapping_purpose import WrappingPurpose

Expand All@@ -30,6 +32,7 @@ class CreateWrappingKeyPayload(BaseModel):
CreateWrappingKeyPayload
""" # noqa: E501

access_scope: Optional[AccessScope] = AccessScope.PUBLIC
algorithm: WrappingAlgorithm
backend: Backend
description: Optional[StrictStr] = Field(
Expand All@@ -38,8 +41,17 @@ class CreateWrappingKeyPayload(BaseModel):
display_name: Annotated[str, Field(strict=True, max_length=64)] = Field(
description="The display name to distinguish multiple wrapping keys.", alias="displayName"
)
protection: Optional[Protection] = None
purpose: WrappingPurpose
__properties: ClassVar[List[str]] = ["algorithm", "backend", "description", "displayName", "purpose"]
__properties: ClassVar[List[str]] = [
"access_scope",
"algorithm",
"backend",
"description",
"displayName",
"protection",
"purpose",
]

model_config = ConfigDict(
populate_by_name=True,
Expand DownExpand Up@@ -91,10 +103,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate(
{
"access_scope": obj.get("access_scope") if obj.get("access_scope") is not None else AccessScope.PUBLIC,
"algorithm": obj.get("algorithm"),
"backend": obj.get("backend"),
"description": obj.get("description"),
"displayName": obj.get("displayName"),
"protection": obj.get("protection"),
"purpose": obj.get("purpose"),
}
)
Expand Down
8 changes: 8 additions & 0 deletionsservices/kms/src/stackit/kms/models/key.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,8 +28,10 @@
)
from typing_extensions import Annotated, Self

from stackit.kms.models.access_scope import AccessScope
from stackit.kms.models.algorithm import Algorithm
from stackit.kms.models.backend import Backend
from stackit.kms.models.protection import Protection
from stackit.kms.models.purpose import Purpose


Expand All@@ -38,6 +40,7 @@ class Key(BaseModel):
Key
""" # noqa: E501

access_scope: AccessScope
algorithm: Algorithm
backend: Backend
created_at: datetime = Field(
Expand All@@ -61,9 +64,11 @@ class Key(BaseModel):
key_ring_id: StrictStr = Field(
description="The unique id of the key ring this key is assigned to.", alias="keyRingId"
)
protection: Optional[Protection] = None
purpose: Purpose
state: StrictStr = Field(description="The current state of the key.")
__properties: ClassVar[List[str]] = [
"access_scope",
"algorithm",
"backend",
"createdAt",
Expand All@@ -73,6 +78,7 @@ class Key(BaseModel):
"id",
"importOnly",
"keyRingId",
"protection",
"purpose",
"state",
]
Expand DownExpand Up@@ -136,6 +142,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate(
{
"access_scope": obj.get("access_scope") if obj.get("access_scope") is not None else AccessScope.PUBLIC,
"algorithm": obj.get("algorithm"),
"backend": obj.get("backend"),
"createdAt": obj.get("createdAt"),
Expand All@@ -145,6 +152,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"id": obj.get("id"),
"importOnly": obj.get("importOnly") if obj.get("importOnly") is not None else False,
"keyRingId": obj.get("keyRingId"),
"protection": obj.get("protection"),
"purpose": obj.get("purpose"),
"state": obj.get("state"),
}
Expand Down
35 changes: 35 additions & 0 deletionsservices/kms/src/stackit/kms/models/protection.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
# coding: utf-8

"""
STACKIT Key Management Service API

This API provides endpoints for managing keys and key rings.

The version of the OpenAPI document: 1beta.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501

from __future__ import annotations

import json
from enum import Enum

from typing_extensions import Self


class Protection(str, Enum):
"""
The underlying system that is responsible for protecting the key material. Overrides the deprecated 'backend' field.
"""

"""
allowed enum values
"""
SOFTWARE = "software"

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of Protection from a JSON string"""
return cls(json.loads(json_str))
8 changes: 8 additions & 0 deletionsservices/kms/src/stackit/kms/models/wrapping_key.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,9 @@
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing_extensions import Annotated, Self

from stackit.kms.models.access_scope import AccessScope
from stackit.kms.models.backend import Backend
from stackit.kms.models.protection import Protection
from stackit.kms.models.wrapping_algorithm import WrappingAlgorithm
from stackit.kms.models.wrapping_purpose import WrappingPurpose

Expand All@@ -31,6 +33,7 @@ class WrappingKey(BaseModel):
WrappingKey
""" # noqa: E501

access_scope: AccessScope
algorithm: WrappingAlgorithm
backend: Backend
created_at: datetime = Field(
Expand All@@ -47,12 +50,14 @@ class WrappingKey(BaseModel):
key_ring_id: StrictStr = Field(
description="The unique id of the key ring this wrapping key is assigned to.", alias="keyRingId"
)
protection: Optional[Protection] = None
public_key: Optional[StrictStr] = Field(
default=None, description="The public key of the wrapping key.", alias="publicKey"
)
purpose: WrappingPurpose
state: StrictStr = Field(description="The current state of the wrapping key.")
__properties: ClassVar[List[str]] = [
"access_scope",
"algorithm",
"backend",
"createdAt",
Expand All@@ -61,6 +66,7 @@ class WrappingKey(BaseModel):
"expiresAt",
"id",
"keyRingId",
"protection",
"publicKey",
"purpose",
"state",
Expand DownExpand Up@@ -125,6 +131,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate(
{
"access_scope": obj.get("access_scope") if obj.get("access_scope") is not None else AccessScope.PUBLIC,
"algorithm": obj.get("algorithm"),
"backend": obj.get("backend"),
"createdAt": obj.get("createdAt"),
Expand All@@ -133,6 +140,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"expiresAt": obj.get("expiresAt"),
"id": obj.get("id"),
"keyRingId": obj.get("keyRingId"),
"protection": obj.get("protection"),
"publicKey": obj.get("publicKey"),
"purpose": obj.get("purpose"),
"state": obj.get("state"),
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp