From 51929cea36ef2951e4ac52506cd97049ff0ce70f Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Thu, 23 Jul 2026 09:25:20 +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..1538b64bb 100644 --- a/services/cdn/oas_commit +++ b/services/cdn/oas_commit @@ -1 +1 @@ -bda6ad3d9e8850526f25eddcb6589fcc7559c625 +d5bd75f47f4b364fa6f71663efb4ba41ec703ac8 diff --git a/services/cdn/src/stackit/cdn/models/bucket_backend.py b/services/cdn/src/stackit/cdn/models/bucket_backend.py index 03217a281..69abfba38 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 07192e025..50d7a00ce 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 9a8304a39..1da643d4f 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 590299cb5..dd4312152 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 ea10bf10e..0af37a6e3 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 94af3c665..8b27f8f6e 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 22efdbb9b..9d8e414ec 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 6c1c1dc98..bdaf90af6 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 0520c1f73..ebdce87c9 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 97fcb2b69..6679af9fc 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,