Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion services/cdn/oas_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bda6ad3d9e8850526f25eddcb6589fcc7559c625
ddd39041d939e274ff8de621a66ff12e0745763d
22 changes: 18 additions & 4 deletions services/cdn/src/stackit/cdn/models/bucket_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down
22 changes: 18 additions & 4 deletions services/cdn/src/stackit/cdn/models/bucket_backend_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down
24 changes: 20 additions & 4 deletions services/cdn/src/stackit/cdn/models/bucket_backend_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down
13 changes: 11 additions & 2 deletions services/cdn/src/stackit/cdn/models/http_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down
13 changes: 11 additions & 2 deletions services/cdn/src/stackit/cdn/models/http_backend_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down
19 changes: 16 additions & 3 deletions services/cdn/src/stackit/cdn/models/http_backend_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down
16 changes: 13 additions & 3 deletions services/cdn/src/stackit/cdn/models/loki_log_sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down
18 changes: 15 additions & 3 deletions services/cdn/src/stackit/cdn/models/loki_log_sink_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
19 changes: 16 additions & 3 deletions services/cdn/src/stackit/cdn/models/loki_log_sink_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down
Loading