From 1d43349c45d6d5d2474eddf92a962aa3e2dc475d Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Fri, 4 Jul 2025 09:03:23 +0000 Subject: [PATCH] Generate cdn --- services/cdn/src/stackit/cdn/__init__.py | 184 +++++++++++++----- .../cdn/src/stackit/cdn/api/default_api.py | 106 +++++----- services/cdn/src/stackit/cdn/api_client.py | 23 ++- services/cdn/src/stackit/cdn/configuration.py | 44 +++-- services/cdn/src/stackit/cdn/exceptions.py | 23 ++- .../cdn/src/stackit/cdn/models/__init__.py | 4 +- services/cdn/src/stackit/cdn/models/config.py | 10 +- .../src/stackit/cdn/models/config_backend.py | 136 ------------- .../src/stackit/cdn/models/config_patch.py | 10 +- .../cdn/models/config_patch_backend.py | 136 ------------- .../cdn/models/create_distribution_payload.py | 4 +- .../models/create_distribution_response.py | 4 +- .../src/stackit/cdn/models/custom_domain.py | 4 +- .../models/delete_custom_domain_response.py | 4 +- .../models/delete_distribution_response.py | 4 +- .../src/stackit/cdn/models/distribution.py | 4 +- .../cdn/models/distribution_logs_record.py | 4 +- .../models/distribution_statistics_record.py | 4 +- .../distribution_statistics_record_entry.py | 4 +- .../distribution_statistics_record_regions.py | 4 +- services/cdn/src/stackit/cdn/models/domain.py | 4 +- .../src/stackit/cdn/models/domain_status.py | 2 +- .../src/stackit/cdn/models/error_details.py | 4 +- .../cdn/models/find_cache_paths_response.py | 4 +- .../models/find_cache_paths_response_entry.py | 4 +- .../cdn/models/generic_json_response.py | 4 +- .../cdn/models/get_cache_info_response.py | 4 +- .../get_cache_info_response_history_entry.py | 4 +- .../cdn/models/get_custom_domain_response.py | 6 +- .../cdn/models/get_distribution_response.py | 4 +- .../stackit/cdn/models/get_logs_response.py | 4 +- .../cdn/models/get_statistics_response.py | 4 +- .../src/stackit/cdn/models/http_backend.py | 4 +- .../stackit/cdn/models/http_backend_patch.py | 4 +- .../cdn/models/list_distributions_response.py | 4 +- .../cdn/src/stackit/cdn/models/optimizer.py | 4 +- .../src/stackit/cdn/models/optimizer_patch.py | 4 +- .../cdn/models/patch_distribution_payload.py | 4 +- .../cdn/models/patch_distribution_response.py | 4 +- .../stackit/cdn/models/purge_cache_payload.py | 4 +- .../cdn/models/put_custom_domain_payload.py | 4 +- .../cdn/models/put_custom_domain_response.py | 6 +- services/cdn/src/stackit/cdn/models/region.py | 2 +- .../src/stackit/cdn/models/status_error.py | 4 +- services/cdn/src/stackit/cdn/rest.py | 4 +- 45 files changed, 338 insertions(+), 478 deletions(-) delete mode 100644 services/cdn/src/stackit/cdn/models/config_backend.py delete mode 100644 services/cdn/src/stackit/cdn/models/config_patch_backend.py diff --git a/services/cdn/src/stackit/cdn/__init__.py b/services/cdn/src/stackit/cdn/__init__.py index 8d89dc1ae..87a241e11 100644 --- a/services/cdn/src/stackit/cdn/__init__.py +++ b/services/cdn/src/stackit/cdn/__init__.py @@ -11,73 +11,153 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 __version__ = "1.0.0" +# Define package exports +__all__ = [ + "DefaultApi", + "ApiResponse", + "ApiClient", + "HostConfiguration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "Config", + "ConfigPatch", + "CreateDistributionPayload", + "CreateDistributionResponse", + "CustomDomain", + "DeleteCustomDomainResponse", + "DeleteDistributionResponse", + "Distribution", + "DistributionLogsRecord", + "DistributionStatisticsRecord", + "DistributionStatisticsRecordEntry", + "DistributionStatisticsRecordRegions", + "Domain", + "DomainStatus", + "ErrorDetails", + "FindCachePathsResponse", + "FindCachePathsResponseEntry", + "GenericJSONResponse", + "GetCacheInfoResponse", + "GetCacheInfoResponseHistoryEntry", + "GetCustomDomainResponse", + "GetDistributionResponse", + "GetLogsResponse", + "GetStatisticsResponse", + "HttpBackend", + "HttpBackendPatch", + "ListDistributionsResponse", + "Optimizer", + "OptimizerPatch", + "PatchDistributionPayload", + "PatchDistributionResponse", + "PurgeCachePayload", + "PutCustomDomainPayload", + "PutCustomDomainResponse", + "Region", + "StatusError", +] + # import apis into sdk package -from stackit.cdn.api.default_api import DefaultApi -from stackit.cdn.api_client import ApiClient +from stackit.cdn.api.default_api import DefaultApi as DefaultApi +from stackit.cdn.api_client import ApiClient as ApiClient # import ApiClient -from stackit.cdn.api_response import ApiResponse -from stackit.cdn.configuration import HostConfiguration -from stackit.cdn.exceptions import ( - ApiAttributeError, - ApiException, - ApiKeyError, - ApiTypeError, - ApiValueError, - OpenApiException, -) +from stackit.cdn.api_response import ApiResponse as ApiResponse +from stackit.cdn.configuration import HostConfiguration as HostConfiguration +from stackit.cdn.exceptions import ApiAttributeError as ApiAttributeError +from stackit.cdn.exceptions import ApiException as ApiException +from stackit.cdn.exceptions import ApiKeyError as ApiKeyError +from stackit.cdn.exceptions import ApiTypeError as ApiTypeError +from stackit.cdn.exceptions import ApiValueError as ApiValueError +from stackit.cdn.exceptions import OpenApiException as OpenApiException # import models into sdk package -from stackit.cdn.models.config import Config -from stackit.cdn.models.config_backend import ConfigBackend -from stackit.cdn.models.config_patch import ConfigPatch -from stackit.cdn.models.config_patch_backend import ConfigPatchBackend -from stackit.cdn.models.create_distribution_payload import CreateDistributionPayload -from stackit.cdn.models.create_distribution_response import CreateDistributionResponse -from stackit.cdn.models.custom_domain import CustomDomain -from stackit.cdn.models.delete_custom_domain_response import DeleteCustomDomainResponse -from stackit.cdn.models.delete_distribution_response import DeleteDistributionResponse -from stackit.cdn.models.distribution import Distribution -from stackit.cdn.models.distribution_logs_record import DistributionLogsRecord +from stackit.cdn.models.config import Config as Config +from stackit.cdn.models.config_patch import ConfigPatch as ConfigPatch +from stackit.cdn.models.create_distribution_payload import ( + CreateDistributionPayload as CreateDistributionPayload, +) +from stackit.cdn.models.create_distribution_response import ( + CreateDistributionResponse as CreateDistributionResponse, +) +from stackit.cdn.models.custom_domain import CustomDomain as CustomDomain +from stackit.cdn.models.delete_custom_domain_response import ( + DeleteCustomDomainResponse as DeleteCustomDomainResponse, +) +from stackit.cdn.models.delete_distribution_response import ( + DeleteDistributionResponse as DeleteDistributionResponse, +) +from stackit.cdn.models.distribution import Distribution as Distribution +from stackit.cdn.models.distribution_logs_record import ( + DistributionLogsRecord as DistributionLogsRecord, +) from stackit.cdn.models.distribution_statistics_record import ( - DistributionStatisticsRecord, + DistributionStatisticsRecord as DistributionStatisticsRecord, ) from stackit.cdn.models.distribution_statistics_record_entry import ( - DistributionStatisticsRecordEntry, + DistributionStatisticsRecordEntry as DistributionStatisticsRecordEntry, ) from stackit.cdn.models.distribution_statistics_record_regions import ( - DistributionStatisticsRecordRegions, + DistributionStatisticsRecordRegions as DistributionStatisticsRecordRegions, +) +from stackit.cdn.models.domain import Domain as Domain +from stackit.cdn.models.domain_status import DomainStatus as DomainStatus +from stackit.cdn.models.error_details import ErrorDetails as ErrorDetails +from stackit.cdn.models.find_cache_paths_response import ( + FindCachePathsResponse as FindCachePathsResponse, ) -from stackit.cdn.models.domain import Domain -from stackit.cdn.models.domain_status import DomainStatus -from stackit.cdn.models.error_details import ErrorDetails -from stackit.cdn.models.find_cache_paths_response import FindCachePathsResponse from stackit.cdn.models.find_cache_paths_response_entry import ( - FindCachePathsResponseEntry, + FindCachePathsResponseEntry as FindCachePathsResponseEntry, +) +from stackit.cdn.models.generic_json_response import ( + GenericJSONResponse as GenericJSONResponse, +) +from stackit.cdn.models.get_cache_info_response import ( + GetCacheInfoResponse as GetCacheInfoResponse, ) -from stackit.cdn.models.generic_json_response import GenericJSONResponse -from stackit.cdn.models.get_cache_info_response import GetCacheInfoResponse from stackit.cdn.models.get_cache_info_response_history_entry import ( - GetCacheInfoResponseHistoryEntry, -) -from stackit.cdn.models.get_custom_domain_response import GetCustomDomainResponse -from stackit.cdn.models.get_distribution_response import GetDistributionResponse -from stackit.cdn.models.get_logs_response import GetLogsResponse -from stackit.cdn.models.get_statistics_response import GetStatisticsResponse -from stackit.cdn.models.http_backend import HttpBackend -from stackit.cdn.models.http_backend_patch import HttpBackendPatch -from stackit.cdn.models.list_distributions_response import ListDistributionsResponse -from stackit.cdn.models.optimizer import Optimizer -from stackit.cdn.models.optimizer_patch import OptimizerPatch -from stackit.cdn.models.patch_distribution_payload import PatchDistributionPayload -from stackit.cdn.models.patch_distribution_response import PatchDistributionResponse -from stackit.cdn.models.purge_cache_payload import PurgeCachePayload -from stackit.cdn.models.put_custom_domain_payload import PutCustomDomainPayload -from stackit.cdn.models.put_custom_domain_response import PutCustomDomainResponse -from stackit.cdn.models.region import Region -from stackit.cdn.models.status_error import StatusError + GetCacheInfoResponseHistoryEntry as GetCacheInfoResponseHistoryEntry, +) +from stackit.cdn.models.get_custom_domain_response import ( + GetCustomDomainResponse as GetCustomDomainResponse, +) +from stackit.cdn.models.get_distribution_response import ( + GetDistributionResponse as GetDistributionResponse, +) +from stackit.cdn.models.get_logs_response import GetLogsResponse as GetLogsResponse +from stackit.cdn.models.get_statistics_response import ( + GetStatisticsResponse as GetStatisticsResponse, +) +from stackit.cdn.models.http_backend import HttpBackend as HttpBackend +from stackit.cdn.models.http_backend_patch import HttpBackendPatch as HttpBackendPatch +from stackit.cdn.models.list_distributions_response import ( + ListDistributionsResponse as ListDistributionsResponse, +) +from stackit.cdn.models.optimizer import Optimizer as Optimizer +from stackit.cdn.models.optimizer_patch import OptimizerPatch as OptimizerPatch +from stackit.cdn.models.patch_distribution_payload import ( + PatchDistributionPayload as PatchDistributionPayload, +) +from stackit.cdn.models.patch_distribution_response import ( + PatchDistributionResponse as PatchDistributionResponse, +) +from stackit.cdn.models.purge_cache_payload import ( + PurgeCachePayload as PurgeCachePayload, +) +from stackit.cdn.models.put_custom_domain_payload import ( + PutCustomDomainPayload as PutCustomDomainPayload, +) +from stackit.cdn.models.put_custom_domain_response import ( + PutCustomDomainResponse as PutCustomDomainResponse, +) +from stackit.cdn.models.region import Region as Region +from stackit.cdn.models.status_error import StatusError as StatusError diff --git a/services/cdn/src/stackit/cdn/api/default_api.py b/services/cdn/src/stackit/cdn/api/default_api.py index 6d430383c..8ec311726 100644 --- a/services/cdn/src/stackit/cdn/api/default_api.py +++ b/services/cdn/src/stackit/cdn/api/default_api.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from datetime import datetime from typing import Any, Dict, List, Optional, Tuple, Union @@ -101,7 +101,7 @@ def create_distribution( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_distribution_serialize( project_id=project_id, @@ -169,7 +169,7 @@ def create_distribution_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_distribution_serialize( project_id=project_id, @@ -237,7 +237,7 @@ def create_distribution_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_distribution_serialize( project_id=project_id, @@ -276,7 +276,7 @@ def _create_distribution_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -368,7 +368,7 @@ def delete_custom_domain( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_custom_domain_serialize( project_id=project_id, @@ -443,7 +443,7 @@ def delete_custom_domain_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_custom_domain_serialize( project_id=project_id, @@ -518,7 +518,7 @@ def delete_custom_domain_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_custom_domain_serialize( project_id=project_id, @@ -560,7 +560,7 @@ def _delete_custom_domain_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -652,7 +652,7 @@ def delete_distribution( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_distribution_serialize( project_id=project_id, @@ -728,7 +728,7 @@ def delete_distribution_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_distribution_serialize( project_id=project_id, @@ -804,7 +804,7 @@ def delete_distribution_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_distribution_serialize( project_id=project_id, @@ -844,7 +844,7 @@ def _delete_distribution_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -929,7 +929,7 @@ def find_cache_paths( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._find_cache_paths_serialize( project_id=project_id, @@ -1000,7 +1000,7 @@ def find_cache_paths_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._find_cache_paths_serialize( project_id=project_id, @@ -1071,7 +1071,7 @@ def find_cache_paths_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._find_cache_paths_serialize( project_id=project_id, @@ -1111,7 +1111,7 @@ def _find_cache_paths_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1196,7 +1196,7 @@ def get_cache_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_cache_info_serialize( project_id=project_id, @@ -1267,7 +1267,7 @@ def get_cache_info_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_cache_info_serialize( project_id=project_id, @@ -1338,7 +1338,7 @@ def get_cache_info_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_cache_info_serialize( project_id=project_id, @@ -1378,7 +1378,7 @@ def _get_cache_info_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1463,7 +1463,7 @@ def get_custom_domain( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_custom_domain_serialize( project_id=project_id, @@ -1535,7 +1535,7 @@ def get_custom_domain_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_custom_domain_serialize( project_id=project_id, @@ -1607,7 +1607,7 @@ def get_custom_domain_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_custom_domain_serialize( project_id=project_id, @@ -1648,7 +1648,7 @@ def _get_custom_domain_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1728,7 +1728,7 @@ def get_distribution( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_distribution_serialize( project_id=project_id, @@ -1796,7 +1796,7 @@ def get_distribution_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_distribution_serialize( project_id=project_id, @@ -1864,7 +1864,7 @@ def get_distribution_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_distribution_serialize( project_id=project_id, @@ -1903,7 +1903,7 @@ def _get_distribution_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2020,7 +2020,7 @@ def get_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_logs_serialize( project_id=project_id, @@ -2132,7 +2132,7 @@ def get_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_logs_serialize( project_id=project_id, @@ -2244,7 +2244,7 @@ def get_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_logs_serialize( project_id=project_id, @@ -2294,7 +2294,7 @@ def _get_logs_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2421,7 +2421,7 @@ def get_statistics( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_statistics_serialize( project_id=project_id, @@ -2512,7 +2512,7 @@ def get_statistics_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_statistics_serialize( project_id=project_id, @@ -2603,7 +2603,7 @@ def get_statistics_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_statistics_serialize( project_id=project_id, @@ -2647,7 +2647,7 @@ def _get_statistics_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2765,7 +2765,7 @@ def list_distributions( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_distributions_serialize( project_id=project_id, @@ -2859,7 +2859,7 @@ def list_distributions_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_distributions_serialize( project_id=project_id, @@ -2953,7 +2953,7 @@ def list_distributions_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_distributions_serialize( project_id=project_id, @@ -2997,7 +2997,7 @@ def _list_distributions_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3092,7 +3092,7 @@ def patch_distribution( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._patch_distribution_serialize( project_id=project_id, @@ -3163,7 +3163,7 @@ def patch_distribution_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._patch_distribution_serialize( project_id=project_id, @@ -3234,7 +3234,7 @@ def patch_distribution_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._patch_distribution_serialize( project_id=project_id, @@ -3274,7 +3274,7 @@ def _patch_distribution_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3365,7 +3365,7 @@ def purge_cache( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._purge_cache_serialize( project_id=project_id, @@ -3436,7 +3436,7 @@ def purge_cache_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._purge_cache_serialize( project_id=project_id, @@ -3507,7 +3507,7 @@ def purge_cache_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._purge_cache_serialize( project_id=project_id, @@ -3547,7 +3547,7 @@ def _purge_cache_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3641,7 +3641,7 @@ def put_custom_domain( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._put_custom_domain_serialize( project_id=project_id, @@ -3716,7 +3716,7 @@ def put_custom_domain_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._put_custom_domain_serialize( project_id=project_id, @@ -3791,7 +3791,7 @@ def put_custom_domain_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._put_custom_domain_serialize( project_id=project_id, @@ -3833,7 +3833,7 @@ def _put_custom_domain_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/services/cdn/src/stackit/cdn/api_client.py b/services/cdn/src/stackit/cdn/api_client.py index 17919553a..c292790f4 100644 --- a/services/cdn/src/stackit/cdn/api_client.py +++ b/services/cdn/src/stackit/cdn/api_client.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 import datetime import json @@ -331,6 +331,10 @@ def sanitize_for_serialization(self, obj): else: obj_dict = obj.__dict__ + if isinstance(obj_dict, list): + # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() + return self.sanitize_for_serialization(obj_dict) + return {key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()} def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): @@ -350,12 +354,12 @@ def deserialize(self, response_text: str, response_type: str, content_type: Opti data = json.loads(response_text) except ValueError: data = response_text - elif content_type.startswith("application/json"): + elif re.match(r"^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)", content_type, re.IGNORECASE): if response_text == "": data = "" else: data = json.loads(response_text) - elif content_type.startswith("text/plain"): + elif re.match(r"^text\/[a-z.+-]+\s*(;|$)", content_type, re.IGNORECASE): data = response_text else: raise ApiException(status=0, reason="Unsupported content type: {0}".format(content_type)) @@ -457,7 +461,7 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] if collection_format == "multi": - new_params.extend((k, str(value)) for value in v) + new_params.extend((k, quote(str(value))) for value in v) else: if collection_format == "ssv": delimiter = " " @@ -473,7 +477,10 @@ def parameters_to_url_query(self, params, collection_formats): return "&".join(["=".join(map(str, item)) for item in new_params]) - def files_parameters(self, files: Dict[str, Union[str, bytes]]): + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): """Builds form parameters. :param files: File parameters. @@ -488,6 +495,12 @@ def files_parameters(self, files: Dict[str, Union[str, bytes]]): elif isinstance(v, bytes): filename = k filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue else: raise ValueError("Unsupported file value") mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" diff --git a/services/cdn/src/stackit/cdn/configuration.py b/services/cdn/src/stackit/cdn/configuration.py index 44df57ea4..48372c370 100644 --- a/services/cdn/src/stackit/cdn/configuration.py +++ b/services/cdn/src/stackit/cdn/configuration.py @@ -1,10 +1,5 @@ # coding: utf-8 -import sys - -import os - - """ CDN API @@ -14,7 +9,29 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 + +import sys +from typing import Dict, List, Optional, TypedDict + +from typing_extensions import NotRequired + +import os + + +ServerVariablesT = Dict[str, str] + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] class HostConfiguration: @@ -53,7 +70,7 @@ def __init__( """Ignore operation servers """ - def get_host_settings(self): + def get_host_settings(self) -> List[HostSetting]: """Gets an array of host settings :return: An array of host settings @@ -71,7 +88,12 @@ def get_host_settings(self): } ] - def get_host_from_settings(self, index, variables=None, servers=None): + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT] = None, + servers: Optional[List[HostSetting]] = None, + ) -> str: """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value @@ -111,7 +133,7 @@ def get_host_from_settings(self, index, variables=None, servers=None): and variables.get(variable_name) is not None ): raise ValueError( - "this API does not support setting a region in the the client configuration, " + "this API does not support setting a region in the client configuration, " "please check if the region can be specified as a function parameter" ) used_value = variables.get(variable_name, variable["default_value"]) @@ -130,12 +152,12 @@ def get_host_from_settings(self, index, variables=None, servers=None): return url @property - def host(self): + def host(self) -> str: """Return generated host.""" return self.get_host_from_settings(self.server_index, variables=self.server_variables) @host.setter - def host(self, value): + def host(self, value: str) -> None: """Fix base path.""" self._base_path = value self.server_index = None diff --git a/services/cdn/src/stackit/cdn/exceptions.py b/services/cdn/src/stackit/cdn/exceptions.py index 44646a253..df833711c 100644 --- a/services/cdn/src/stackit/cdn/exceptions.py +++ b/services/cdn/src/stackit/cdn/exceptions.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from typing import Any, Optional @@ -127,7 +127,7 @@ def __init__( if self.body is None: try: self.body = http_resp.data.decode("utf-8") - except Exception: # noqa: S110 + except Exception: pass self.headers = http_resp.getheaders() @@ -151,6 +151,13 @@ def from_response( if http_resp.status == 404: raise NotFoundException(http_resp=http_resp, body=body, data=data) + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + if 500 <= http_resp.status <= 599: raise ServiceException(http_resp=http_resp, body=body, data=data) raise ApiException(http_resp=http_resp, body=body, data=data) @@ -187,6 +194,18 @@ class ServiceException(ApiException): pass +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + + pass + + def render_path(path_to_item): """Returns a string representation of a path""" result = "" diff --git a/services/cdn/src/stackit/cdn/models/__init__.py b/services/cdn/src/stackit/cdn/models/__init__.py index cfbbda198..df8cccc5a 100644 --- a/services/cdn/src/stackit/cdn/models/__init__.py +++ b/services/cdn/src/stackit/cdn/models/__init__.py @@ -10,14 +10,12 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 # import models into model package from stackit.cdn.models.config import Config -from stackit.cdn.models.config_backend import ConfigBackend from stackit.cdn.models.config_patch import ConfigPatch -from stackit.cdn.models.config_patch_backend import ConfigPatchBackend from stackit.cdn.models.create_distribution_payload import CreateDistributionPayload from stackit.cdn.models.create_distribution_response import CreateDistributionResponse from stackit.cdn.models.custom_domain import CustomDomain diff --git a/services/cdn/src/stackit/cdn/models/config.py b/services/cdn/src/stackit/cdn/models/config.py index e5485dcca..959876385 100644 --- a/services/cdn/src/stackit/cdn/models/config.py +++ b/services/cdn/src/stackit/cdn/models/config.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing_extensions import Annotated, Self -from stackit.cdn.models.config_backend import ConfigBackend +from stackit.cdn.models.http_backend import HttpBackend from stackit.cdn.models.optimizer import Optimizer from stackit.cdn.models.region import Region @@ -28,9 +28,9 @@ class Config(BaseModel): """ Config - """ + """ # noqa: E501 - backend: ConfigBackend + backend: HttpBackend blocked_countries: List[StrictStr] = Field( description="Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g., DE, ES, GB). This setting blocks users from the specified countries. ", alias="blockedCountries", @@ -127,7 +127,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "backend": ConfigBackend.from_dict(obj["backend"]) if obj.get("backend") is not None else None, + "backend": HttpBackend.from_dict(obj["backend"]) if obj.get("backend") is not None else None, "blockedCountries": obj.get("blockedCountries"), "blockedIPs": obj.get("blockedIPs"), "defaultCacheDuration": obj.get("defaultCacheDuration"), diff --git a/services/cdn/src/stackit/cdn/models/config_backend.py b/services/cdn/src/stackit/cdn/models/config_backend.py deleted file mode 100644 index 036090fc5..000000000 --- a/services/cdn/src/stackit/cdn/models/config_backend.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - CDN API - - API used to create and manage your CDN distributions. - - 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 docstring might be too long - -from __future__ import annotations - -import json -import pprint -from typing import Any, Dict, Optional, Set, Union - -from pydantic import ( - BaseModel, - ConfigDict, - ValidationError, - field_validator, -) -from typing_extensions import Self - -from stackit.cdn.models.http_backend import HttpBackend - - -CONFIGBACKEND_ONE_OF_SCHEMAS = ["HttpBackend"] - - -class ConfigBackend(BaseModel): - """ - ConfigBackend - """ - - # data type: HttpBackend - oneof_schema_1_validator: Optional[HttpBackend] = None - actual_instance: Optional[Union[HttpBackend]] = None - one_of_schemas: Set[str] = {"HttpBackend"} - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - discriminator_value_class_map: Dict[str, str] = {} - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator("actual_instance") - def actual_instance_must_validate_oneof(cls, v): - instance = ConfigBackend.model_construct() - error_messages = [] - match = 0 - # validate data type: HttpBackend - if not isinstance(v, HttpBackend): - error_messages.append(f"Error! Input type `{type(v)}` is not `HttpBackend`") - else: - match += 1 - if match == 0: - # no match - raise ValueError( - "No match found when setting `actual_instance` in ConfigBackend with oneOf schemas: HttpBackend. Details: " - + ", ".join(error_messages) - ) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into HttpBackend - try: - instance.actual_instance = HttpBackend.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError( - "Multiple matches found when deserializing the JSON string into ConfigBackend with oneOf schemas: HttpBackend. Details: " - + ", ".join(error_messages) - ) - elif match == 0: - # no match - raise ValueError( - "No match found when deserializing the JSON string into ConfigBackend with oneOf schemas: HttpBackend. Details: " - + ", ".join(error_messages) - ) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], HttpBackend]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) diff --git a/services/cdn/src/stackit/cdn/models/config_patch.py b/services/cdn/src/stackit/cdn/models/config_patch.py index d0aee3f69..143e796b0 100644 --- a/services/cdn/src/stackit/cdn/models/config_patch.py +++ b/services/cdn/src/stackit/cdn/models/config_patch.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing_extensions import Annotated, Self -from stackit.cdn.models.config_patch_backend import ConfigPatchBackend +from stackit.cdn.models.http_backend_patch import HttpBackendPatch from stackit.cdn.models.optimizer_patch import OptimizerPatch from stackit.cdn.models.region import Region @@ -28,9 +28,9 @@ class ConfigPatch(BaseModel): """ ConfigPatch - """ + """ # noqa: E501 - backend: Optional[ConfigPatchBackend] = None + backend: Optional[HttpBackendPatch] = None blocked_countries: Optional[List[StrictStr]] = Field( default=None, description="Restricts access to your content based on country. We use the ISO 3166-1 alpha-2 standard for country codes (e.g., DE, ES, GB). This setting blocks users from the specified countries. ", @@ -129,7 +129,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "backend": ConfigPatchBackend.from_dict(obj["backend"]) if obj.get("backend") is not None else None, + "backend": HttpBackendPatch.from_dict(obj["backend"]) if obj.get("backend") is not None else None, "blockedCountries": obj.get("blockedCountries"), "blockedIPs": obj.get("blockedIPs"), "defaultCacheDuration": obj.get("defaultCacheDuration"), diff --git a/services/cdn/src/stackit/cdn/models/config_patch_backend.py b/services/cdn/src/stackit/cdn/models/config_patch_backend.py deleted file mode 100644 index f17156d84..000000000 --- a/services/cdn/src/stackit/cdn/models/config_patch_backend.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - CDN API - - API used to create and manage your CDN distributions. - - 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 docstring might be too long - -from __future__ import annotations - -import json -import pprint -from typing import Any, Dict, Optional, Set, Union - -from pydantic import ( - BaseModel, - ConfigDict, - ValidationError, - field_validator, -) -from typing_extensions import Self - -from stackit.cdn.models.http_backend_patch import HttpBackendPatch - - -CONFIGPATCHBACKEND_ONE_OF_SCHEMAS = ["HttpBackendPatch"] - - -class ConfigPatchBackend(BaseModel): - """ - ConfigPatchBackend - """ - - # data type: HttpBackendPatch - oneof_schema_1_validator: Optional[HttpBackendPatch] = None - actual_instance: Optional[Union[HttpBackendPatch]] = None - one_of_schemas: Set[str] = {"HttpBackendPatch"} - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - discriminator_value_class_map: Dict[str, str] = {} - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator("actual_instance") - def actual_instance_must_validate_oneof(cls, v): - instance = ConfigPatchBackend.model_construct() - error_messages = [] - match = 0 - # validate data type: HttpBackendPatch - if not isinstance(v, HttpBackendPatch): - error_messages.append(f"Error! Input type `{type(v)}` is not `HttpBackendPatch`") - else: - match += 1 - if match == 0: - # no match - raise ValueError( - "No match found when setting `actual_instance` in ConfigPatchBackend with oneOf schemas: HttpBackendPatch. Details: " - + ", ".join(error_messages) - ) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into HttpBackendPatch - try: - instance.actual_instance = HttpBackendPatch.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError( - "Multiple matches found when deserializing the JSON string into ConfigPatchBackend with oneOf schemas: HttpBackendPatch. Details: " - + ", ".join(error_messages) - ) - elif match == 0: - # no match - raise ValueError( - "No match found when deserializing the JSON string into ConfigPatchBackend with oneOf schemas: HttpBackendPatch. Details: " - + ", ".join(error_messages) - ) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], HttpBackendPatch]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) diff --git a/services/cdn/src/stackit/cdn/models/create_distribution_payload.py b/services/cdn/src/stackit/cdn/models/create_distribution_payload.py index 37e3c431d..933962a43 100644 --- a/services/cdn/src/stackit/cdn/models/create_distribution_payload.py +++ b/services/cdn/src/stackit/cdn/models/create_distribution_payload.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class CreateDistributionPayload(BaseModel): """ CreateDistributionPayload - """ + """ # noqa: E501 blocked_countries: Optional[List[StrictStr]] = Field( default=None, diff --git a/services/cdn/src/stackit/cdn/models/create_distribution_response.py b/services/cdn/src/stackit/cdn/models/create_distribution_response.py index 9170e0a30..c9d8fe872 100644 --- a/services/cdn/src/stackit/cdn/models/create_distribution_response.py +++ b/services/cdn/src/stackit/cdn/models/create_distribution_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class CreateDistributionResponse(BaseModel): """ CreateDistributionResponse - """ + """ # noqa: E501 distribution: Distribution __properties: ClassVar[List[str]] = ["distribution"] diff --git a/services/cdn/src/stackit/cdn/models/custom_domain.py b/services/cdn/src/stackit/cdn/models/custom_domain.py index 0dd4f1f69..1fc53bffa 100644 --- a/services/cdn/src/stackit/cdn/models/custom_domain.py +++ b/services/cdn/src/stackit/cdn/models/custom_domain.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class CustomDomain(BaseModel): """ Definition of a custom domain - """ + """ # noqa: E501 errors: Optional[Annotated[List[StatusError], Field(min_length=1)]] = Field( default=None, description="This object is present if the custom domain has errors." diff --git a/services/cdn/src/stackit/cdn/models/delete_custom_domain_response.py b/services/cdn/src/stackit/cdn/models/delete_custom_domain_response.py index a8bd8fb51..9c7c47d0d 100644 --- a/services/cdn/src/stackit/cdn/models/delete_custom_domain_response.py +++ b/services/cdn/src/stackit/cdn/models/delete_custom_domain_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class DeleteCustomDomainResponse(BaseModel): """ Returns the custom domain that was deleted while the deletion has not completed yet. After the deletion was successful the response will be empty. - """ + """ # noqa: E501 custom_domain: Optional[CustomDomain] = Field(default=None, alias="customDomain") __properties: ClassVar[List[str]] = ["customDomain"] diff --git a/services/cdn/src/stackit/cdn/models/delete_distribution_response.py b/services/cdn/src/stackit/cdn/models/delete_distribution_response.py index fe5d21a60..454727737 100644 --- a/services/cdn/src/stackit/cdn/models/delete_distribution_response.py +++ b/services/cdn/src/stackit/cdn/models/delete_distribution_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class DeleteDistributionResponse(BaseModel): """ DeleteDistributionResponse - """ + """ # noqa: E501 distribution: Optional[Distribution] = None __properties: ClassVar[List[str]] = ["distribution"] diff --git a/services/cdn/src/stackit/cdn/models/distribution.py b/services/cdn/src/stackit/cdn/models/distribution.py index be6d41d85..1ad303dd3 100644 --- a/services/cdn/src/stackit/cdn/models/distribution.py +++ b/services/cdn/src/stackit/cdn/models/distribution.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -29,7 +29,7 @@ class Distribution(BaseModel): """ Distribution - """ + """ # noqa: E501 config: Config created_at: datetime = Field( diff --git a/services/cdn/src/stackit/cdn/models/distribution_logs_record.py b/services/cdn/src/stackit/cdn/models/distribution_logs_record.py index 590bc99cc..8444c7a71 100644 --- a/services/cdn/src/stackit/cdn/models/distribution_logs_record.py +++ b/services/cdn/src/stackit/cdn/models/distribution_logs_record.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class DistributionLogsRecord(BaseModel): """ DistributionLogsRecord - """ + """ # noqa: E501 cache_hit: StrictBool = Field(alias="cacheHit") data_center_region: StrictStr = Field(alias="dataCenterRegion") diff --git a/services/cdn/src/stackit/cdn/models/distribution_statistics_record.py b/services/cdn/src/stackit/cdn/models/distribution_statistics_record.py index 38b05879f..97856e86c 100644 --- a/services/cdn/src/stackit/cdn/models/distribution_statistics_record.py +++ b/services/cdn/src/stackit/cdn/models/distribution_statistics_record.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -29,7 +29,7 @@ class DistributionStatisticsRecord(BaseModel): """ Aggregated statistics of a distribution during a time interval - """ + """ # noqa: E501 cached_requests: StrictInt = Field(description="Number of cached requests that were served", alias="cachedRequests") total_requests: StrictInt = Field(description="Total number of requests that were served", alias="totalRequests") diff --git a/services/cdn/src/stackit/cdn/models/distribution_statistics_record_entry.py b/services/cdn/src/stackit/cdn/models/distribution_statistics_record_entry.py index 824784f12..52d72b211 100644 --- a/services/cdn/src/stackit/cdn/models/distribution_statistics_record_entry.py +++ b/services/cdn/src/stackit/cdn/models/distribution_statistics_record_entry.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class DistributionStatisticsRecordEntry(BaseModel): """ DistributionStatisticsRecordEntry - """ + """ # noqa: E501 cached_requests: StrictInt = Field(description="Number of cached requests that were served", alias="cachedRequests") total_requests: StrictInt = Field(description="Total number of requests that were served", alias="totalRequests") diff --git a/services/cdn/src/stackit/cdn/models/distribution_statistics_record_regions.py b/services/cdn/src/stackit/cdn/models/distribution_statistics_record_regions.py index 9c8cb20f8..d3567eee3 100644 --- a/services/cdn/src/stackit/cdn/models/distribution_statistics_record_regions.py +++ b/services/cdn/src/stackit/cdn/models/distribution_statistics_record_regions.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -28,7 +28,7 @@ class DistributionStatisticsRecordRegions(BaseModel): """ Mapping of regions to the metrics for this region for the defined time interval All regions are always present. If no traffic was reported for a region, it will still contain 0-filled properties - """ + """ # noqa: E501 af: DistributionStatisticsRecordEntry = Field(alias="AF") asia: DistributionStatisticsRecordEntry = Field(alias="ASIA") diff --git a/services/cdn/src/stackit/cdn/models/domain.py b/services/cdn/src/stackit/cdn/models/domain.py index ea5108cf1..c05036ef1 100644 --- a/services/cdn/src/stackit/cdn/models/domain.py +++ b/services/cdn/src/stackit/cdn/models/domain.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class Domain(BaseModel): """ Definition of a custom or managed domain without any certificates or keys - """ + """ # noqa: E501 errors: Optional[Annotated[List[StatusError], Field(min_length=1)]] = Field( default=None, description="This object is present if the custom domain has errors." diff --git a/services/cdn/src/stackit/cdn/models/domain_status.py b/services/cdn/src/stackit/cdn/models/domain_status.py index e6c5f51cb..7b8ff562d 100644 --- a/services/cdn/src/stackit/cdn/models/domain_status.py +++ b/services/cdn/src/stackit/cdn/models/domain_status.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations diff --git a/services/cdn/src/stackit/cdn/models/error_details.py b/services/cdn/src/stackit/cdn/models/error_details.py index 21a411005..3b6252066 100644 --- a/services/cdn/src/stackit/cdn/models/error_details.py +++ b/services/cdn/src/stackit/cdn/models/error_details.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class ErrorDetails(BaseModel): """ ErrorDetails - """ + """ # noqa: E501 de: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field( default=None, description="German description of the error" diff --git a/services/cdn/src/stackit/cdn/models/find_cache_paths_response.py b/services/cdn/src/stackit/cdn/models/find_cache_paths_response.py index 281591973..e7c0f2d53 100644 --- a/services/cdn/src/stackit/cdn/models/find_cache_paths_response.py +++ b/services/cdn/src/stackit/cdn/models/find_cache_paths_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -28,7 +28,7 @@ class FindCachePathsResponse(BaseModel): """ FindCachePathsResponse - """ + """ # noqa: E501 response: List[FindCachePathsResponseEntry] __properties: ClassVar[List[str]] = ["response"] diff --git a/services/cdn/src/stackit/cdn/models/find_cache_paths_response_entry.py b/services/cdn/src/stackit/cdn/models/find_cache_paths_response_entry.py index 3a8de4474..630dd2260 100644 --- a/services/cdn/src/stackit/cdn/models/find_cache_paths_response_entry.py +++ b/services/cdn/src/stackit/cdn/models/find_cache_paths_response_entry.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class FindCachePathsResponseEntry(BaseModel): """ FindCachePathsResponseEntry - """ + """ # noqa: E501 path: Annotated[str, Field(min_length=1, strict=True)] = Field( description="Defines one path that was previously used as part of a granular purge" diff --git a/services/cdn/src/stackit/cdn/models/generic_json_response.py b/services/cdn/src/stackit/cdn/models/generic_json_response.py index 69e58e0ca..c93ee9acd 100644 --- a/services/cdn/src/stackit/cdn/models/generic_json_response.py +++ b/services/cdn/src/stackit/cdn/models/generic_json_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class GenericJSONResponse(BaseModel): """ GenericJSONResponse - """ + """ # noqa: E501 details: Optional[List[ErrorDetails]] = Field(default=None, description="Listing of issues with your request") message: Annotated[str, Field(min_length=1, strict=True)] diff --git a/services/cdn/src/stackit/cdn/models/get_cache_info_response.py b/services/cdn/src/stackit/cdn/models/get_cache_info_response.py index 6e3dd6aa3..5df4e1273 100644 --- a/services/cdn/src/stackit/cdn/models/get_cache_info_response.py +++ b/services/cdn/src/stackit/cdn/models/get_cache_info_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -29,7 +29,7 @@ class GetCacheInfoResponse(BaseModel): """ GetCacheInfoResponse - """ + """ # noqa: E501 history: List[GetCacheInfoResponseHistoryEntry] last_purge_time: Optional[datetime] = Field( diff --git a/services/cdn/src/stackit/cdn/models/get_cache_info_response_history_entry.py b/services/cdn/src/stackit/cdn/models/get_cache_info_response_history_entry.py index c41fc70a0..643628a23 100644 --- a/services/cdn/src/stackit/cdn/models/get_cache_info_response_history_entry.py +++ b/services/cdn/src/stackit/cdn/models/get_cache_info_response_history_entry.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class GetCacheInfoResponseHistoryEntry(BaseModel): """ GetCacheInfoResponseHistoryEntry - """ + """ # noqa: E501 occured_at: datetime = Field(alias="occuredAt") occurred_at: datetime = Field(alias="occurredAt") diff --git a/services/cdn/src/stackit/cdn/models/get_custom_domain_response.py b/services/cdn/src/stackit/cdn/models/get_custom_domain_response.py index 7dbb3ea40..547c1f47f 100644 --- a/services/cdn/src/stackit/cdn/models/get_custom_domain_response.py +++ b/services/cdn/src/stackit/cdn/models/get_custom_domain_response.py @@ -9,13 +9,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, field_validator @@ -27,7 +27,7 @@ class GetCustomDomainResponse(BaseModel): """ GetCustomDomainResponse - """ + """ # noqa: E501 custom_domain: CustomDomain = Field(alias="customDomain") domain: Annotated[str, Field(strict=True, max_length=72)] diff --git a/services/cdn/src/stackit/cdn/models/get_distribution_response.py b/services/cdn/src/stackit/cdn/models/get_distribution_response.py index 872d6b11a..d2fd52237 100644 --- a/services/cdn/src/stackit/cdn/models/get_distribution_response.py +++ b/services/cdn/src/stackit/cdn/models/get_distribution_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class GetDistributionResponse(BaseModel): """ GetDistributionResponse - """ + """ # noqa: E501 distribution: Distribution __properties: ClassVar[List[str]] = ["distribution"] diff --git a/services/cdn/src/stackit/cdn/models/get_logs_response.py b/services/cdn/src/stackit/cdn/models/get_logs_response.py index f48372cf6..06478ab4a 100644 --- a/services/cdn/src/stackit/cdn/models/get_logs_response.py +++ b/services/cdn/src/stackit/cdn/models/get_logs_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class GetLogsResponse(BaseModel): """ GetLogsResponse - """ + """ # noqa: E501 logs: List[DistributionLogsRecord] next_page_identifier: Optional[StrictStr] = Field(default=None, alias="nextPageIdentifier") diff --git a/services/cdn/src/stackit/cdn/models/get_statistics_response.py b/services/cdn/src/stackit/cdn/models/get_statistics_response.py index 80f19f3bb..81e608f02 100644 --- a/services/cdn/src/stackit/cdn/models/get_statistics_response.py +++ b/services/cdn/src/stackit/cdn/models/get_statistics_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -28,7 +28,7 @@ class GetStatisticsResponse(BaseModel): """ GetStatisticsResponse - """ + """ # noqa: E501 records: List[DistributionStatisticsRecord] __properties: ClassVar[List[str]] = ["records"] diff --git a/services/cdn/src/stackit/cdn/models/http_backend.py b/services/cdn/src/stackit/cdn/models/http_backend.py index 13741880b..1d96f899d 100644 --- a/services/cdn/src/stackit/cdn/models/http_backend.py +++ b/services/cdn/src/stackit/cdn/models/http_backend.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class HttpBackend(BaseModel): """ HttpBackend - """ + """ # noqa: E501 origin_request_headers: Dict[str, StrictStr] = Field( 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. ", 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 92ce66c65..c6660787a 100644 --- a/services/cdn/src/stackit/cdn/models/http_backend_patch.py +++ b/services/cdn/src/stackit/cdn/models/http_backend_patch.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class HttpBackendPatch(BaseModel): """ A partial HTTP Backend - """ + """ # noqa: E501 origin_request_headers: Optional[Dict[str, StrictStr]] = Field( default=None, diff --git a/services/cdn/src/stackit/cdn/models/list_distributions_response.py b/services/cdn/src/stackit/cdn/models/list_distributions_response.py index 18357b70a..9d08206c9 100644 --- a/services/cdn/src/stackit/cdn/models/list_distributions_response.py +++ b/services/cdn/src/stackit/cdn/models/list_distributions_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class ListDistributionsResponse(BaseModel): """ ListDistributionsResponse - """ + """ # noqa: E501 distributions: List[Distribution] next_page_identifier: Optional[StrictStr] = Field(default=None, alias="nextPageIdentifier") diff --git a/services/cdn/src/stackit/cdn/models/optimizer.py b/services/cdn/src/stackit/cdn/models/optimizer.py index a8505845f..1ab8c33d6 100644 --- a/services/cdn/src/stackit/cdn/models/optimizer.py +++ b/services/cdn/src/stackit/cdn/models/optimizer.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class Optimizer(BaseModel): """ Optimizer is paid feature, a real-time on the fly image manipulation and optimization service that automatically optimizes your images for faster image delivery. - """ + """ # noqa: E501 enabled: StrictBool = Field( description="Determines if the optimizer should be enabled for this distribution and incurs a monthly fee" diff --git a/services/cdn/src/stackit/cdn/models/optimizer_patch.py b/services/cdn/src/stackit/cdn/models/optimizer_patch.py index 15880a00d..76ec4657a 100644 --- a/services/cdn/src/stackit/cdn/models/optimizer_patch.py +++ b/services/cdn/src/stackit/cdn/models/optimizer_patch.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class OptimizerPatch(BaseModel): """ OptimizerPatch - """ + """ # noqa: E501 enabled: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["enabled"] diff --git a/services/cdn/src/stackit/cdn/models/patch_distribution_payload.py b/services/cdn/src/stackit/cdn/models/patch_distribution_payload.py index 3c28729e1..66f9dcfc0 100644 --- a/services/cdn/src/stackit/cdn/models/patch_distribution_payload.py +++ b/services/cdn/src/stackit/cdn/models/patch_distribution_payload.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class PatchDistributionPayload(BaseModel): """ Defines a partial distribution. Set values - """ + """ # noqa: E501 config: Optional[ConfigPatch] = None intent_id: Optional[StrictStr] = Field( diff --git a/services/cdn/src/stackit/cdn/models/patch_distribution_response.py b/services/cdn/src/stackit/cdn/models/patch_distribution_response.py index 84a07fec4..dacb3b984 100644 --- a/services/cdn/src/stackit/cdn/models/patch_distribution_response.py +++ b/services/cdn/src/stackit/cdn/models/patch_distribution_response.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -26,7 +26,7 @@ class PatchDistributionResponse(BaseModel): """ PatchDistributionResponse - """ + """ # noqa: E501 distribution: Distribution __properties: ClassVar[List[str]] = ["distribution"] diff --git a/services/cdn/src/stackit/cdn/models/purge_cache_payload.py b/services/cdn/src/stackit/cdn/models/purge_cache_payload.py index 1753aa674..37e995d31 100644 --- a/services/cdn/src/stackit/cdn/models/purge_cache_payload.py +++ b/services/cdn/src/stackit/cdn/models/purge_cache_payload.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class PurgeCachePayload(BaseModel): """ PurgeCachePayload - """ + """ # noqa: E501 path: Optional[StrictStr] = Field( default=None, diff --git a/services/cdn/src/stackit/cdn/models/put_custom_domain_payload.py b/services/cdn/src/stackit/cdn/models/put_custom_domain_payload.py index 55a129caf..e1b55fc26 100644 --- a/services/cdn/src/stackit/cdn/models/put_custom_domain_payload.py +++ b/services/cdn/src/stackit/cdn/models/put_custom_domain_payload.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class PutCustomDomainPayload(BaseModel): """ PutCustomDomainPayload - """ + """ # noqa: E501 intent_id: Optional[StrictStr] = Field( default=None, diff --git a/services/cdn/src/stackit/cdn/models/put_custom_domain_response.py b/services/cdn/src/stackit/cdn/models/put_custom_domain_response.py index 38990bef4..0384c7be5 100644 --- a/services/cdn/src/stackit/cdn/models/put_custom_domain_response.py +++ b/services/cdn/src/stackit/cdn/models/put_custom_domain_response.py @@ -9,13 +9,13 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations import json import pprint -import re +import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, field_validator @@ -27,7 +27,7 @@ class PutCustomDomainResponse(BaseModel): """ PutCustomDomainResponse - """ + """ # noqa: E501 custom_domain: CustomDomain = Field(alias="customDomain") domain: Annotated[str, Field(strict=True, max_length=72)] diff --git a/services/cdn/src/stackit/cdn/models/region.py b/services/cdn/src/stackit/cdn/models/region.py index 569261283..ef9414770 100644 --- a/services/cdn/src/stackit/cdn/models/region.py +++ b/services/cdn/src/stackit/cdn/models/region.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations diff --git a/services/cdn/src/stackit/cdn/models/status_error.py b/services/cdn/src/stackit/cdn/models/status_error.py index 3153490fd..9883bdd8f 100644 --- a/services/cdn/src/stackit/cdn/models/status_error.py +++ b/services/cdn/src/stackit/cdn/models/status_error.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -24,7 +24,7 @@ class StatusError(BaseModel): """ StatusError - """ + """ # noqa: E501 de: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field( default=None, diff --git a/services/cdn/src/stackit/cdn/rest.py b/services/cdn/src/stackit/cdn/rest.py index e13efe800..394ca0ade 100644 --- a/services/cdn/src/stackit/cdn/rest.py +++ b/services/cdn/src/stackit/cdn/rest.py @@ -9,7 +9,7 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 import io import json @@ -124,7 +124,7 @@ def request(self, method, url, headers=None, body=None, post_params=None, _reque data=body, headers=headers, ) - elif headers["Content-Type"] == "text/plain" and isinstance(body, bool): + elif headers["Content-Type"].startswith("text/") and isinstance(body, bool): request_body = "true" if body else "false" r = self.session.request(method, url, data=request_body, headers=headers) else: