From b032a9089403a5cf44f02bf00d87164e66bca819 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Tue, 7 Jul 2026 08:47:11 +0000 Subject: [PATCH] Generate cdn --- services/cdn/oas_commit | 2 +- .../src/stackit/cdn/models/bucket_backend.py | 22 +++++++++++++---- .../cdn/models/bucket_backend_create.py | 22 +++++++++++++---- .../cdn/models/bucket_backend_patch.py | 24 +++++++++++++++---- .../src/stackit/cdn/models/http_backend.py | 13 ++++++++-- .../stackit/cdn/models/http_backend_create.py | 13 ++++++++-- .../stackit/cdn/models/http_backend_patch.py | 19 ++++++++++++--- .../src/stackit/cdn/models/loki_log_sink.py | 16 ++++++++++--- .../cdn/models/loki_log_sink_create.py | 18 +++++++++++--- .../cdn/models/loki_log_sink_credentials.py | 8 +++---- .../stackit/cdn/models/loki_log_sink_patch.py | 19 ++++++++++++--- 11 files changed, 143 insertions(+), 33 deletions(-) diff --git a/services/cdn/oas_commit b/services/cdn/oas_commit index 4b79dc0b4..dd1b5b856 100644 --- a/services/cdn/oas_commit +++ b/services/cdn/oas_commit @@ -1 +1 @@ -bda6ad3d9e8850526f25eddcb6589fcc7559c625 +cad0d887d9679d3cbf1f8b74968b7a87edf956e2 diff --git a/services/cdn/src/stackit/cdn/models/bucket_backend.py b/services/cdn/src/stackit/cdn/models/bucket_backend.py index b32e23f11..53f275494 100644 --- a/services/cdn/src/stackit/cdn/models/bucket_backend.py +++ b/services/cdn/src/stackit/cdn/models/bucket_backend.py @@ -17,7 +17,7 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -27,11 +27,25 @@ class BucketBackend(BaseModel): BucketBackend """ # noqa: E501 - bucket_url: StrictStr = Field(alias="bucketUrl") - region: StrictStr - type: StrictStr + bucket_url: StrictStr = Field( + description="The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`).", + alias="bucketUrl", + ) + region: StrictStr = Field( + description="The cloud provider region where your storage bucket is located (for example, `us-west-1` for AWS or `eu01` for STACKIT)." + ) + type: StrictStr = Field( + description="Defines the type of content origin. For this schema, it must be set to `bucket`." + ) __properties: ClassVar[List[str]] = ["bucketUrl", "region", "type"] + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["bucket"]): + raise ValueError("must be one of enum values ('bucket')") + return value + model_config = ConfigDict( validate_by_name=True, validate_by_alias=True, diff --git a/services/cdn/src/stackit/cdn/models/bucket_backend_create.py b/services/cdn/src/stackit/cdn/models/bucket_backend_create.py index a7b33580d..e2249de0c 100644 --- a/services/cdn/src/stackit/cdn/models/bucket_backend_create.py +++ b/services/cdn/src/stackit/cdn/models/bucket_backend_create.py @@ -17,7 +17,7 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -29,12 +29,26 @@ class BucketBackendCreate(BaseModel): BucketBackendCreate """ # noqa: E501 - bucket_url: StrictStr = Field(alias="bucketUrl") + bucket_url: StrictStr = Field( + description="The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`).", + alias="bucketUrl", + ) credentials: BucketCredentials - region: StrictStr - type: StrictStr + region: StrictStr = Field( + description="The cloud provider region where your storage bucket is located (for example, `us-west-1` for AWS or `eu01` for STACKIT)." + ) + type: StrictStr = Field( + description="Defines the type of content origin. For this schema, it must be set to `bucket`." + ) __properties: ClassVar[List[str]] = ["bucketUrl", "credentials", "region", "type"] + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["bucket"]): + raise ValueError("must be one of enum values ('bucket')") + return value + model_config = ConfigDict( validate_by_name=True, validate_by_alias=True, diff --git a/services/cdn/src/stackit/cdn/models/bucket_backend_patch.py b/services/cdn/src/stackit/cdn/models/bucket_backend_patch.py index 6c07ee497..3e0c4aec1 100644 --- a/services/cdn/src/stackit/cdn/models/bucket_backend_patch.py +++ b/services/cdn/src/stackit/cdn/models/bucket_backend_patch.py @@ -17,7 +17,7 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -29,12 +29,28 @@ class BucketBackendPatch(BaseModel): BucketBackendPatch """ # noqa: E501 - bucket_url: Optional[StrictStr] = Field(default=None, alias="bucketUrl") + bucket_url: Optional[StrictStr] = Field( + default=None, + description="The fully qualified URL of your cloud storage bucket (for example, `https://s3.eu-central-1.amazonaws.com/my-bucket`).", + alias="bucketUrl", + ) credentials: Optional[BucketCredentials] = None - region: Optional[StrictStr] = None - type: StrictStr + region: Optional[StrictStr] = Field( + default=None, + description="The cloud provider region where your storage bucket is located (for example, `us-west-1` for AWS or `eu01` for STACKIT).", + ) + type: StrictStr = Field( + description="Defines the type of content origin. For this schema, it must be set to `bucket`." + ) __properties: ClassVar[List[str]] = ["bucketUrl", "credentials", "region", "type"] + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["bucket"]): + raise ValueError("must be one of enum values ('bucket')") + return value + model_config = ConfigDict( validate_by_name=True, validate_by_alias=True, diff --git a/services/cdn/src/stackit/cdn/models/http_backend.py b/services/cdn/src/stackit/cdn/models/http_backend.py index 3169f3e63..11100ff1f 100644 --- a/services/cdn/src/stackit/cdn/models/http_backend.py +++ b/services/cdn/src/stackit/cdn/models/http_backend.py @@ -17,7 +17,7 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -38,9 +38,18 @@ class HttpBackend(BaseModel): description="The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234` ", alias="originUrl", ) - type: StrictStr + type: StrictStr = Field( + description="Defines the type of content origin. For this schema, it must be set to `http`." + ) __properties: ClassVar[List[str]] = ["geofencing", "originRequestHeaders", "originUrl", "type"] + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["http"]): + raise ValueError("must be one of enum values ('http')") + return value + model_config = ConfigDict( validate_by_name=True, validate_by_alias=True, diff --git a/services/cdn/src/stackit/cdn/models/http_backend_create.py b/services/cdn/src/stackit/cdn/models/http_backend_create.py index 6db053090..2a27f30e8 100644 --- a/services/cdn/src/stackit/cdn/models/http_backend_create.py +++ b/services/cdn/src/stackit/cdn/models/http_backend_create.py @@ -17,7 +17,7 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -40,9 +40,18 @@ class HttpBackendCreate(BaseModel): description="The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234` ", alias="originUrl", ) - type: StrictStr + type: StrictStr = Field( + description="Defines the type of content origin. For this schema, it must be set to `http`." + ) __properties: ClassVar[List[str]] = ["geofencing", "originRequestHeaders", "originUrl", "type"] + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["http"]): + raise ValueError("must be one of enum values ('http')") + return value + model_config = ConfigDict( validate_by_name=True, validate_by_alias=True, diff --git a/services/cdn/src/stackit/cdn/models/http_backend_patch.py b/services/cdn/src/stackit/cdn/models/http_backend_patch.py index 16fe26275..491f1a08d 100644 --- a/services/cdn/src/stackit/cdn/models/http_backend_patch.py +++ b/services/cdn/src/stackit/cdn/models/http_backend_patch.py @@ -17,7 +17,7 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -36,10 +36,23 @@ class HttpBackendPatch(BaseModel): description="Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text. ", alias="originRequestHeaders", ) - origin_url: Optional[StrictStr] = Field(default=None, alias="originUrl") - type: StrictStr = Field(description="This property is required to determine the used backend type.") + origin_url: Optional[StrictStr] = Field( + default=None, + description="The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234` ", + alias="originUrl", + ) + type: StrictStr = Field( + description="Defines the type of content origin. For this schema, it must be set to `http`." + ) __properties: ClassVar[List[str]] = ["geofencing", "originRequestHeaders", "originUrl", "type"] + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["http"]): + raise ValueError("must be one of enum values ('http')") + return value + model_config = ConfigDict( validate_by_name=True, validate_by_alias=True, diff --git a/services/cdn/src/stackit/cdn/models/loki_log_sink.py b/services/cdn/src/stackit/cdn/models/loki_log_sink.py index 850c09c96..5d7d1abf8 100644 --- a/services/cdn/src/stackit/cdn/models/loki_log_sink.py +++ b/services/cdn/src/stackit/cdn/models/loki_log_sink.py @@ -17,7 +17,7 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -27,10 +27,20 @@ class LokiLogSink(BaseModel): LokiLogSink """ # noqa: E501 - push_url: StrictStr = Field(alias="pushUrl") - type: StrictStr + push_url: StrictStr = Field( + description="The fully qualified URL where the CDN should push logs to your Loki instance (for example, `https://loki.example.com/loki/api/v1/push`).", + alias="pushUrl", + ) + type: StrictStr = Field(description="Defines the type of the log sink.") __properties: ClassVar[List[str]] = ["pushUrl", "type"] + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["loki"]): + raise ValueError("must be one of enum values ('loki')") + return value + model_config = ConfigDict( validate_by_name=True, validate_by_alias=True, diff --git a/services/cdn/src/stackit/cdn/models/loki_log_sink_create.py b/services/cdn/src/stackit/cdn/models/loki_log_sink_create.py index 721f5a86f..c4d1cca65 100644 --- a/services/cdn/src/stackit/cdn/models/loki_log_sink_create.py +++ b/services/cdn/src/stackit/cdn/models/loki_log_sink_create.py @@ -17,7 +17,7 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -30,10 +30,22 @@ class LokiLogSinkCreate(BaseModel): """ # noqa: E501 credentials: LokiLogSinkCredentials - push_url: StrictStr = Field(alias="pushUrl") - type: StrictStr + push_url: StrictStr = Field( + description="The fully qualified URL where the CDN should push logs to your Loki instance (for example, `https://loki.example.com/loki/api/v1/push`).", + alias="pushUrl", + ) + type: StrictStr = Field( + description="Defines the type of the log sink. For Grafana Loki, this must be set to `loki`." + ) __properties: ClassVar[List[str]] = ["credentials", "pushUrl", "type"] + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["loki"]): + raise ValueError("must be one of enum values ('loki')") + return value + model_config = ConfigDict( validate_by_name=True, validate_by_alias=True, diff --git a/services/cdn/src/stackit/cdn/models/loki_log_sink_credentials.py b/services/cdn/src/stackit/cdn/models/loki_log_sink_credentials.py index 7171d31f0..71e98d905 100644 --- a/services/cdn/src/stackit/cdn/models/loki_log_sink_credentials.py +++ b/services/cdn/src/stackit/cdn/models/loki_log_sink_credentials.py @@ -17,18 +17,18 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from pydantic_core import to_jsonable_python from typing_extensions import Self class LokiLogSinkCredentials(BaseModel): """ - LokiLogSinkCredentials + The authentication credentials required for the CDN to push logs to your Loki instance. """ # noqa: E501 - password: StrictStr - username: StrictStr + password: StrictStr = Field(description="The password corresponding to your username.") + username: StrictStr = Field(description="The username used to authenticate against your Loki instance.") __properties: ClassVar[List[str]] = ["password", "username"] model_config = ConfigDict( diff --git a/services/cdn/src/stackit/cdn/models/loki_log_sink_patch.py b/services/cdn/src/stackit/cdn/models/loki_log_sink_patch.py index 1e899963d..2f2eb17e3 100644 --- a/services/cdn/src/stackit/cdn/models/loki_log_sink_patch.py +++ b/services/cdn/src/stackit/cdn/models/loki_log_sink_patch.py @@ -17,7 +17,7 @@ import pprint from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from pydantic_core import to_jsonable_python from typing_extensions import Self @@ -30,10 +30,23 @@ class LokiLogSinkPatch(BaseModel): """ # noqa: E501 credentials: Optional[LokiLogSinkCredentials] = None - push_url: Optional[StrictStr] = Field(default=None, alias="pushUrl") - type: StrictStr + push_url: Optional[StrictStr] = Field( + default=None, + description="The fully qualified URL where the CDN should push logs to your Loki instance (for example, `https://loki.example.com/loki/api/v1/push`).", + alias="pushUrl", + ) + type: StrictStr = Field( + description="Defines the type of the log sink. For Grafana Loki, this must be set to `loki`." + ) __properties: ClassVar[List[str]] = ["credentials", "pushUrl", "type"] + @field_validator("type") + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(["loki"]): + raise ValueError("must be one of enum values ('loki')") + return value + model_config = ConfigDict( validate_by_name=True, validate_by_alias=True,